This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2021-03-02T02:37:26.635Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sprite tempSprite; | |
SpriteRenderer changeSprite; | |
void Update(){ | |
changeSprite = gameObject.GetComponent<SpriteRenderer>(); | |
switch(type){ | |
case 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void putToFloor(){ | |
RaycastHit2D hit = Physics2D.Raycast(transform.position, -Vector3.up); | |
if (hit.collider != null) | |
{ | |
transform.position = hit.point; | |
Debug.Log ("Putting here: "+transform.position); | |
} | |
Debug.Log ("Found nothing to hit: " + hit.point); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// c# companion script | |
// SpriteUVToShader.cs -------------------------------------------------------------------------------------------------------------------------------- // | |
// Save you your project, add to your SpriteRenderer gameObject | |
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
[ExecuteInEditMode] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// threshold for mask can be controlled using vertex color alpha (useful for spriteRenderers or particle systems) | |
// _MainTex: alpha of this texture is used as a mask | |
// _EmissionTex: usually rgb noise texture, adjust it's scaling if needed | |
// color remap and oscilation for each channel of emission can be modified in _EmStrobeBFALR, _EmStrobeBFALG, _EmStrobeBFALB | |
// Base: base amplitude of brightness oscilation | |
// Freq: frequency of oscilation | |
// Ampl: amplitude of oscilation | |
// L: how much _EmissionTex affects this color | |
Shader "StandardWMask" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class logoAssembler : MonoBehaviour { | |
[SerializeField] bool debugMe; | |
[SerializeField] bool remakePixels; | |
[SerializeField] bool autoPlay; | |
[SerializeField][Range(0,10)] float autoDur = 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class treeThing { | |
// tree design: all the changable variables in one place! | |
struct treeStyle { | |
// skipping stuff like how many branches per tree, sticks per branch.. | |
// sticks | |
Vector2 stickAngleJagMM; // how jaggy the branches are (min-max) | |
Vector2 stickLengthMM; // how long the sticks are (min-max) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Mathfx | |
{ | |
public static void normalizePoints(ref List<Vector2> path) { | |
float length = 0; | |
List<float> lengths = UnityEngine.Pool.GenericPool<List<float>>.Get(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class pipeGenerator : MonoBehaviour | |
{ | |
[SerializeField] Mesh straightMesh; | |
[SerializeField] Mesh elbowMesh; | |
[Space] | |
[SerializeField] Vector3[] pathPoints; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// original from https://forum.unity3d.com/threads/share-volume-fog-shader.147323/ | |
Shader "Effect/SphereFog" { | |
Properties { | |
_FogColor ("Fog Color", Color) = (1,1,1,1) | |
[space] | |
_Density ("Density", Float) = 1 | |
_Power ("Power/gamma", Float) = 4 | |
_Offset ("Offset", Range(-.1,.1)) = -0.003 | |
[space] | |
_NearbyOffset ("Nearby Offset", Float) = -1 |
OlderNewer