This file contains hidden or 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
| --!strict | |
| --!native | |
| --Polychrome effect - tag MeshParts with "Polychrome" | |
| --Rewrites an editable image with some precalculate buffers each frame (because raw editableimages are memory capped!) | |
| --Default values use about 30mb, but you can easily reduce/increase this with these two variables | |
| --Try and be sane :) | |
| local size : number = 128 | |
| local frameCount : number = 500 |
This file contains hidden or 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.Generic; | |
| using UnityEngine; | |
| public class SineWaveInstanced : MonoBehaviour { | |
| #region Fields | |
| public GameObject sample; | |
| public Mesh mesh; | |
| public Material material; |
This file contains hidden or 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 PrimeTween; | |
| using UnityEngine; | |
| using UnityEngine.Pool; | |
| using UnityUtils; | |
| public class DamageNumberSpawner : MonoBehaviour { | |
| [SerializeField] WorldSpaceUIDocument uiDocumentPrefab; | |
| [SerializeField] float positionRandomness = 0.2f; | |
| IObjectPool<WorldSpaceUIDocument> uiDocumentPool; |
This file contains hidden or 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.Generic; | |
| using UnityEngine; | |
| using UnityEngine.AI; | |
| using TMPro; | |
| public struct Node { | |
| public Vector3 position; | |
| public bool isWalkable; | |
| public Node(Vector3 position, bool isWalkable = false) { |
This file contains hidden or 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; | |
| using UnityEngine; | |
| public enum ValueType { Int, Float, Bool, String, Vector3 } | |
| [Serializable] | |
| public struct AnyValue { | |
| public ValueType type; | |
| // Storage for different types of values |
This file contains hidden or 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; | |
| using System.Reflection; | |
| using UnityEditor; | |
| using UnityEngine; | |
| public static class PackageManagerHelper { | |
| const string ServicesNamespace = "UnityEditor.PackageManager.UI.Internal"; | |
| /// <summary> | |
| /// Resolves a PackageManager service by its interface name. |
This file contains hidden or 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 UnityEditor; | |
| using UnityEngine; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Reflection; | |
| [InitializeOnLoad] | |
| public static class HierarchyIconDrawer { | |
| static readonly Texture2D requiredIcon = AssetDatabase.LoadAssetAtPath<Texture2D>("Assets/_Project/Art/RequiredIcon.png"); |
This file contains hidden or 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
| #if UNITY_EDITOR | |
| using UnityEditor; | |
| #endif | |
| using UnityEngine; | |
| [AddComponentMenu("Comment")] | |
| public class CommentComponent : MonoBehaviour | |
| { | |
| #if UNITY_EDITOR | |
| [SerializeField] |
This file contains hidden or 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 UnityEditor; | |
| using UnityEngine; | |
| using UnityEngine.LowLevel; | |
| using System.Linq; | |
| using System.Threading; | |
| namespace EditorUtils { | |
| // | |
| // Serializable settings |
This file contains hidden or 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
| /* | |
| Based on the Anti-aliased Euclidean distance transform described by Stefan Gustavson and | |
| Robin Strand. For further information, see https://contourtextures.wikidot.com/ and | |
| https://web.archive.org/web/20220503051209/https://weber.itn.liu.se/~stegu/edtaa/ | |
| The algorithm is an adapted version of Stefan Gustavson's code, it inherits the copyright | |
| statement below, which applies to this file only. | |
| The rewrite with Unity Burst support makes the execution 40 times faster by default, | |
| and 75 times faster if the passed in textures are both of type TextureFormat.RGBAFloat. |
NewerOlder