Skip to content

Instantly share code, notes, and snippets.

@Roland09
Roland09 / UnityGuidRegenerator.cs
Created October 5, 2022 01:42 — forked from ZimM-LostPolygon/UnityGuidRegenerator.cs
Unity asset GUIDs regenerator
// Drop into Assets/Editor, use "Tools/Regenerate asset GUIDs"
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEditor;
namespace UnityGuidRegenerator {
public class UnityGuidRegeneratorMenu {
@Roland09
Roland09 / NightLight.cs
Created August 23, 2020 09:44 — forked from HolyFot/NightLight.cs
Enviro Scripts
using UnityEngine;
using System.Collections.Generic;
public class NightLight : MonoBehaviour
{
[SerializeField] public List<GameObject> objects;
public bool isNight = false;
private void Awake()
{
@Roland09
Roland09 / MaterialAnalysis.cs
Created August 6, 2020 08:49
Unity Material and Shader Logging
using System;
using UnityEditor;
using UnityEngine;
using static UnityEditor.ShaderUtil;
namespace DeveloperTools
{
public static class MaterialAnalysis
{
static readonly IFormatProvider Formatter = new System.Globalization.CultureInfo("en-US");
@Roland09
Roland09 / Main.java
Last active March 30, 2016 02:15
Bouncing Balls Example
package application;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import javafx.animation.AnimationTimer;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
@Roland09
Roland09 / Algorithm.java
Created February 18, 2016 05:43
Prototype for moving agents along scanlines
package application;
import java.util.ArrayList;
import java.util.List;
public class Algorithm {
public List<Line> createScanLines( Mover sprite) {
PVector location = sprite.getLocation();
@Roland09
Roland09 / Algorithm.java
Created February 13, 2016 15:54
Line of Sight Demo
package application;
import java.util.ArrayList;
import java.util.List;
public class Algorithm {
/**
* Sweep around the given circle with the given distance and create the scan lines
* @param startX
@Roland09
Roland09 / Attractor.java
Created July 26, 2015 07:08
Particle system with a GUI for parameter modification.
package application;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.text.Text;
import javafx.scene.text.TextBoundsType;
/**
@Roland09
Roland09 / Attractor.java
Created July 24, 2015 19:22
Particle system which uses imageview nodes with coloradjust
package application;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.text.Text;
import javafx.scene.text.TextBoundsType;
/**
@Roland09
Roland09 / Attractor.java
Created July 24, 2015 17:59
Particle system using precalculated images which are drawn on a Canvas.
package application;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.text.Text;
import javafx.scene.text.TextBoundsType;
/**
@Roland09
Roland09 / Main.java
Last active January 30, 2020 20:17
Sprite dynamics using Vector calculation. Example where everything attracts everything, as described in the excellent book The Nature of Code by Daniel Shiffman
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import javafx.animation.AnimationTimer;
import javafx.application.Application;
import javafx.geometry.Point2D;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Pane;