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
| // https://forum.unity.com/threads/how-to-import-user-defined-attributes-from-fbx-files.409877/ | |
| using UnityEngine; | |
| using UnityEditor; | |
| using System.IO; | |
| class CustomImportProcessor : AssetPostprocessor { | |
| void OnPostprocessGameObjectWithUserProperties(GameObject go, string[] names, System.Object[] values) { | |
| ModelImporter importer = (ModelImporter)assetImporter; | |
| var asset_name = Path.GetFileName(importer.assetPath); | |
| Debug.LogFormat("OnPostprocessGameObjectWithUserProperties(go = {0}) asset = {1}", go.name, asset_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 System.Reflection; | |
| using UnityEditor; | |
| using UnityEngine; | |
| /// <summary> | |
| /// Toggles the Inspector lock state and the Constrain Proportions lock state. | |
| /// </summary> | |
| public static class LockInspector { | |
| static readonly MethodInfo flipLocked; | |
| static readonly PropertyInfo constrainProportions; |
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 UnityEngine; | |
| using System.IO; | |
| using System; | |
| public static class RenderTextureExtensions | |
| { | |
| private static DefaultDictionary<RenderTexture, Texture2D> _cachedTextures = new DefaultDictionary<RenderTexture, Texture2D>(); |
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
| // NOTE: The 'SimpleHarmonicMotion.cs' is here: https://gist.github.com/SolarianZ/78f9b22d9663d77b6e6c1b0c60cc6322 | |
| // You need to change `System.Numerics.Vector3` to `UnityEngine.Vector3` in SimpleHarmonicMotion.cs | |
| using UnityEngine; | |
| #if UNITY_EDITOR | |
| using UnityEditor; | |
| #endif | |
| [DisallowMultipleComponent] | |
| public class BoneVibrator : MonoBehaviour |
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.Collections.Generic; | |
| using System.IO; | |
| using System.Threading.Tasks; | |
| using UnityEditor; | |
| using UnityEditor.PackageManager; | |
| using UnityEditor.PackageManager.Requests; | |
| using UnityEngine; | |
| using static System.Environment; |
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.Collections.Generic; | |
| using Cysharp.Threading.Tasks; | |
| using Unity.Services.Authentication; | |
| using Unity.Services.Core; | |
| using Unity.Services.Multiplayer; | |
| using UnityEngine; | |
| using UnityUtils; | |
| public class SessionManager : Singleton<SessionManager> { |
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
| #pragma kernel CSMain | |
| RWTexture2D<float> heatmapTexture; | |
| float2 texSize; | |
| StructuredBuffer<float2> enemyPositions; | |
| int enemyCount; | |
| [numthreads(8, 8, 1)] | |
| void CSMain(uint3 id : SV_DispatchThreadID) |
OlderNewer