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.Runtime.CompilerServices; | |
static class HashUtils { | |
[MethodImpl(MethodImplOptions.AggressiveInlining)] | |
public static int CombineWith(this int hash1, int hash2) => (hash1 * 397) ^ hash2; | |
} |
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
static RenderTexture TopDownPreview(GameObject prefab, RenderTexture rt, Camera Camera, Transform Root) { | |
var instance = Object.Instantiate(prefab, Root); | |
instance.hideFlags = HideFlags.DontSave; | |
Camera.targetTexture = rt; | |
Camera.Render(); | |
Object.DestroyImmediate(instance); | |
Camera.targetTexture = null; | |
return rt; | |
} |
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
async Routine EnabledDisabledFlow() { | |
while (true) { | |
await Routine.Yield; | |
if (!enabled) | |
await Routine.TryAwait(() => enabled) | |
.Configure(child: DisabledFlow()); | |
await Routine.TryAwait(() => !enabled) | |
.Configure(child: EnabledFlow()); |
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.IO; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine.UIElements; | |
class PathApi { | |
public string MonoPath; | |
public string Dir() { |
OlderNewer