├── .gitignore ├── .idea └── .idea.UnityUtil │ └── .idea │ ├── .gitignore │ ├── encodings.xml │ ├── indexLayout.xml │ └── vcs.xml ├── .vsconfig ├── Assets ├── Example.meta ├── Example │ ├── Camera.meta │ ├── Camera │ │ ├── MaterialImageEffectSample.mat │ │ ├── MaterialImageEffectSample.mat.meta │ │ ├── MaterialImageEffectSample.shader │ │ └── MaterialImageEffectSample.shader.meta │ ├── Geometry.meta │ ├── Geometry │ │ ├── LineSegmentGpuTest.compute │ │ ├── LineSegmentGpuTest.compute.meta │ │ ├── LineSegmentGpuTest.cs │ │ ├── LineSegmentGpuTest.cs.meta │ │ ├── LineSegmentTest.cs │ │ └── LineSegmentTest.cs.meta │ ├── Transform.meta │ └── Transform │ │ ├── NoChildAutoDestroySampleGenerateChild.cs │ │ └── NoChildAutoDestroySampleGenerateChild.cs.meta ├── Scenes.meta └── Scenes │ ├── LineSegmentGpuTest.unity │ ├── LineSegmentGpuTest.unity.meta │ ├── LineSegmentTest.unity │ ├── LineSegmentTest.unity.meta │ ├── MaterialImageEffect.unity │ ├── MaterialImageEffect.unity.meta │ ├── NoChildAutoDestroy.unity │ └── NoChildAutoDestroy.unity.meta ├── Packages ├── ga.fuquna.unityutil │ ├── Animation.meta │ ├── Animation │ │ ├── AnimatorExtension.cs │ │ ├── AnimatorExtension.cs.meta │ │ ├── AnimatorStarter.cs │ │ ├── AnimatorStarter.cs.meta │ │ ├── RandomAnimatorController.cs │ │ ├── RandomAnimatorController.cs.meta │ │ ├── RandomStartAnimator.cs │ │ ├── RandomStartAnimator.cs.meta │ │ ├── ScaledCurve.cs │ │ └── ScaledCurve.cs.meta │ ├── Camera.meta │ ├── Camera │ │ ├── ApplyTexToCamera.cs │ │ ├── ApplyTexToCamera.cs.meta │ │ ├── CameraTargetTexture.cs │ │ ├── CameraTargetTexture.cs.meta │ │ ├── CameraTexture.cs │ │ ├── CameraTexture.cs.meta │ │ ├── CaptureFrameBuffer.cs │ │ ├── CaptureFrameBuffer.cs.meta │ │ ├── CopyMainCamera.cs │ │ ├── CopyMainCamera.cs.meta │ │ ├── MaterialImageEffect.cs │ │ ├── MaterialImageEffect.cs.meta │ │ ├── MultiCameraToCamera.cs │ │ ├── MultiCameraToCamera.cs.meta │ │ ├── MultiCameraToCamera.mat │ │ ├── MultiCameraToCamera.mat.meta │ │ ├── TexBlend.shader │ │ └── TexBlend.shader.meta │ ├── Extension.meta │ ├── Extension │ │ ├── BoundsExtension.cs │ │ ├── BoundsExtension.cs.meta │ │ ├── Collision2DExtension.cs │ │ ├── Collision2DExtension.cs.meta │ │ ├── ColorExtension.cs │ │ ├── ColorExtension.cs.meta │ │ ├── ComputeShaderExtension.cs │ │ ├── ComputeShaderExtension.cs.meta │ │ ├── EnumExtension.cs │ │ ├── EnumExtension.cs.meta │ │ ├── EnumerableExtension.cs │ │ ├── EnumerableExtension.cs.meta │ │ ├── GameObjectExtension.cs │ │ ├── GameObjectExtension.cs.meta │ │ ├── MaterialPropertyBlockExtension.cs │ │ ├── MaterialPropertyBlockExtension.cs.meta │ │ ├── MonoBehaviorExtension.cs │ │ ├── MonoBehaviorExtension.cs.meta │ │ ├── RectExtension.cs │ │ ├── RectExtension.cs.meta │ │ ├── TransformExtension.cs │ │ ├── TransformExtension.cs.meta │ │ ├── VectorExtension.cs │ │ └── VectorExtension.cs.meta │ ├── Geometry.meta │ ├── Geometry │ │ ├── LineSegment.cs │ │ ├── LineSegment.cs.meta │ │ ├── LineSegment.hlsl │ │ ├── LineSegment.hlsl.meta │ │ ├── Primitive2D.cs │ │ └── Primitive2D.cs.meta │ ├── Logic.meta │ ├── Logic │ │ ├── AudioSourceOnEditor.cs │ │ ├── AudioSourceOnEditor.cs.meta │ │ ├── Easing.cs │ │ ├── Easing.cs.meta │ │ ├── KeepTimeFlag.cs │ │ ├── KeepTimeFlag.cs.meta │ │ ├── OverrideSingletonMonoBehaviour.cs │ │ ├── OverrideSingletonMonoBehaviour.cs.meta │ │ ├── Rational.cs │ │ ├── Rational.cs.meta │ │ ├── SingletonMonoBehaviour.cs │ │ ├── SingletonMonoBehaviour.cs.meta │ │ ├── StateMachine.cs │ │ └── StateMachine.cs.meta │ ├── Random.meta │ ├── Random │ │ ├── CustomRandom.cs │ │ ├── CustomRandom.cs.meta │ │ ├── Rand.cs │ │ ├── Rand.cs.meta │ │ ├── RandomForMaterialPropertyBlock.meta │ │ └── RandomForMaterialPropertyBlock │ │ │ ├── RandomForMaterialProperty.cs │ │ │ ├── RandomForMaterialProperty.cs.meta │ │ │ ├── RandomHSVForMaterialProperty.cs │ │ │ └── RandomHSVForMaterialProperty.cs.meta │ ├── Shaders.meta │ ├── Shaders │ │ ├── Additive.mat │ │ ├── Additive.mat.meta │ │ ├── Additive.shader │ │ ├── Additive.shader.meta │ │ ├── Tone.cginc │ │ └── Tone.cginc.meta │ ├── Texture.meta │ ├── Texture │ │ ├── TextureUtil.cs │ │ └── TextureUtil.cs.meta │ ├── Transform.meta │ ├── Transform │ │ ├── AutoRot.cs │ │ ├── AutoRot.cs.meta │ │ ├── NoChildAutoDestroy.cs │ │ └── NoChildAutoDestroy.cs.meta │ ├── UnityUtil.asmdef │ ├── UnityUtil.asmdef.meta │ ├── package.json │ └── package.json.meta ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── MemorySettings.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── SceneTemplateSettings.json ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | *.app 63 | 64 | # Crashlytics generated file 65 | crashlytics-build.properties 66 | 67 | # Packed Addressables 68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 69 | 70 | # Temporary auto-generated Android Assets 71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 72 | /[Aa]ssets/[Ss]treamingAssets/aa/* -------------------------------------------------------------------------------- /.idea/.idea.UnityUtil/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Rider ignored files 5 | /modules.xml 6 | /contentModel.xml 7 | /projectSettingsUpdater.xml 8 | /.idea.UnityUtil.iml 9 | # Editor-based HTTP Client requests 10 | /httpRequests/ 11 | # Datasource local storage ignored files 12 | /dataSources/ 13 | /dataSources.local.xml 14 | # GitHub Copilot persisted chat sessions 15 | /copilot/chatSessions 16 | -------------------------------------------------------------------------------- /.idea/.idea.UnityUtil/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/.idea.UnityUtil/.idea/indexLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/.idea.UnityUtil/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.VisualStudio.Workload.ManagedGame" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /Assets/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75caaae291c6de74f8241863b844704d 3 | folderAsset: yes 4 | timeCreated: 1476351914 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Example/Camera.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e673bc8a199deb645b76443e0d031fac 3 | folderAsset: yes 4 | timeCreated: 1476689833 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Example/Camera/MaterialImageEffectSample.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: MaterialImageEffectSample 10 | m_Shader: {fileID: 4800000, guid: d86c4d09891397445accbbafbe0ff195, type: 3} 11 | m_ShaderKeywords: _EMISSION 12 | m_LightmapFlags: 1 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 1, b: 1, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Example/Camera/MaterialImageEffectSample.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2040432807788aa42a96278888dcdec9 3 | timeCreated: 1476689890 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Camera/MaterialImageEffectSample.shader: -------------------------------------------------------------------------------- 1 | // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' 2 | 3 | Shader "Hidden/MaterialImageEffectSample" 4 | { 5 | Properties 6 | { 7 | _MainTex ("Texture", 2D) = "white" {} 8 | } 9 | SubShader 10 | { 11 | // No culling or depth 12 | Cull Off ZWrite Off ZTest Always 13 | 14 | Pass 15 | { 16 | CGPROGRAM 17 | #pragma vertex vert 18 | #pragma fragment frag 19 | 20 | #include "UnityCG.cginc" 21 | 22 | struct appdata 23 | { 24 | float4 vertex : POSITION; 25 | float2 uv : TEXCOORD0; 26 | }; 27 | 28 | struct v2f 29 | { 30 | float2 uv : TEXCOORD0; 31 | float4 vertex : SV_POSITION; 32 | }; 33 | 34 | v2f vert (appdata v) 35 | { 36 | v2f o; 37 | o.vertex = UnityObjectToClipPos(v.vertex); 38 | o.uv = v.uv; 39 | return o; 40 | } 41 | 42 | sampler2D _MainTex; 43 | 44 | fixed4 frag (v2f i) : SV_Target 45 | { 46 | fixed4 col = tex2D(_MainTex, i.uv); 47 | // just invert the colors 48 | col = 1 - col; 49 | return col; 50 | } 51 | ENDCG 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Assets/Example/Camera/MaterialImageEffectSample.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d86c4d09891397445accbbafbe0ff195 3 | timeCreated: 1476689910 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Example/Geometry.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c1bddec43d58b84da3501ccb72ce69f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/Geometry/LineSegmentGpuTest.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMain 2 | 3 | #include "Packages/ga.fuquna.unityutil/Geometry/LineSegment.hlsl" 4 | 5 | struct Output 6 | { 7 | int hasHit; 8 | float2 hitPoint; 9 | float2 closestPoint0; 10 | float2 closestPoint1; 11 | float distance0; 12 | float distance1; 13 | int isLeft0; 14 | int isLeft1; 15 | }; 16 | 17 | float2 _Point; 18 | StructuredBuffer _LineSegmentBuffer; 19 | RWStructuredBuffer _OutputBuffer; 20 | 21 | 22 | [numthreads(1,1,1)] 23 | void CSMain () 24 | { 25 | LineSegment line0 = _LineSegmentBuffer[0]; 26 | LineSegment line1 = _LineSegmentBuffer[1]; 27 | 28 | float2 hitPoint; 29 | bool hit = CalcIntersection(line0, line1, hitPoint); 30 | 31 | 32 | float2 closestPoint0 = LineClosestPoint(_Point, line0); 33 | float2 closestPoint1 = LineClosestPoint(_Point, line1); 34 | 35 | 36 | float distance0 = LineDistance(_Point, line0); 37 | float distance1 = LineDistance(_Point, line1); 38 | 39 | 40 | float isLeft0 = IsLeft(_Point, line0); 41 | float isLeft1 = IsLeft(_Point, line1); 42 | 43 | 44 | Output output = (Output)0; 45 | output.hasHit = hit ? 1 : 0; 46 | output.hitPoint = hitPoint; 47 | output.closestPoint0 = closestPoint0; 48 | output.closestPoint1 = closestPoint1; 49 | output.distance0 = distance0; 50 | output.distance1 = distance1; 51 | output.isLeft0 = isLeft0; 52 | output.isLeft1 = isLeft1; 53 | 54 | _OutputBuffer[0] = output; 55 | } 56 | -------------------------------------------------------------------------------- /Assets/Example/Geometry/LineSegmentGpuTest.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5bb44cf373339846b8747f65445997e 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Example/Geometry/LineSegmentGpuTest.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using Unity.Collections; 3 | using UnityEditor; 4 | using UnityEngine; 5 | using UnityEngine.Serialization; 6 | 7 | namespace UnityUtil.Example 8 | { 9 | // [ExecuteAlways] 10 | public class LineSegmentGpuTest : MonoBehaviour 11 | { 12 | private static class CsParam 13 | { 14 | public static readonly int Point = Shader.PropertyToID("_Point"); 15 | public static readonly int LineSegmentBuffer = Shader.PropertyToID("_LineSegmentBuffer"); 16 | public static readonly int OutputBuffer = Shader.PropertyToID("_OutputBuffer"); 17 | } 18 | 19 | private struct Output 20 | { 21 | public int hasHit; 22 | public Vector2 hitPoint; 23 | public Vector2 closestPoint0; 24 | public Vector2 closestPoint1; 25 | public float distance0; 26 | public float distance1; 27 | public int isLeft0; 28 | public int isLeft1; 29 | } 30 | 31 | 32 | [FormerlySerializedAs("_computeShader")] public ComputeShader computeShader; 33 | 34 | [FormerlySerializedAs("line0_start")] public Transform line0Start; 35 | [FormerlySerializedAs("line0_end")] public Transform line0End; 36 | [FormerlySerializedAs("line1_start")] public Transform line1Start; 37 | [FormerlySerializedAs("line1_end")] public Transform line1End; 38 | 39 | [FormerlySerializedAs("point")] public Transform targetPoint; 40 | 41 | private int _kernelIndex = -1; 42 | private GraphicsBuffer _lineSegmentBuffer; 43 | private GraphicsBuffer _outputBuffer; 44 | 45 | 46 | private void OnDrawGizmos() 47 | { 48 | var point = targetPoint.position; 49 | 50 | var line0 = new LineSegment() { start = line0Start.position, end = line0End.position }; 51 | var line1 = new LineSegment() { start = line1Start.position, end = line1End.position }; 52 | 53 | DispatchComputeShader(point, line0, line1); 54 | 55 | var outputArray = new Output[1]; 56 | _outputBuffer.GetData(outputArray); 57 | var output = outputArray[0]; 58 | 59 | 60 | // line0 61 | Gizmos.color = Color.red; 62 | Gizmos.DrawLine(line0.start, line0.end); 63 | 64 | // line1 65 | Gizmos.color = Color.blue; 66 | Gizmos.DrawLine(line1.start, line1.end); 67 | 68 | // intersection line0,line1 69 | if (output.hasHit > 0) 70 | { 71 | Gizmos.color = Color.yellow; 72 | Gizmos.DrawWireSphere(output.hitPoint, 0.3f); 73 | } 74 | 75 | 76 | // closet point 77 | Gizmos.color = Color.gray; 78 | Gizmos.DrawLine(output.closestPoint0, point); 79 | Gizmos.DrawLine(output.closestPoint1, point); 80 | 81 | 82 | #if UNITY_EDITOR 83 | Handles.Label(point, $"Distance: {output.distance0},{output.distance1}"); 84 | Handles.Label(point - Vector3.up* 0.2f, $"IsLeft: {output.isLeft0},{output.isLeft1}"); 85 | #endif 86 | } 87 | 88 | private void DispatchComputeShader(Vector2 point, LineSegment line0, LineSegment line1) 89 | { 90 | if (_kernelIndex < 0) 91 | { 92 | _kernelIndex = computeShader.FindKernel("CSMain"); 93 | } 94 | 95 | _lineSegmentBuffer ??= new GraphicsBuffer(GraphicsBuffer.Target.Structured, 2, Marshal.SizeOf()); 96 | _outputBuffer ??= new GraphicsBuffer(GraphicsBuffer.Target.Structured, 1, Marshal.SizeOf()); 97 | 98 | 99 | var array = new NativeArray(2, Allocator.Temp); 100 | array[0] = line0; 101 | array[1] = line1; 102 | _lineSegmentBuffer.SetData(array); 103 | array.Dispose(); 104 | 105 | computeShader.SetFloats(CsParam.Point, point.x, point.y); 106 | computeShader.SetBuffer(_kernelIndex, CsParam.LineSegmentBuffer, _lineSegmentBuffer); 107 | computeShader.SetBuffer(_kernelIndex, CsParam.OutputBuffer, _outputBuffer); 108 | 109 | computeShader.Dispatch(_kernelIndex, 1, 1, 1); 110 | } 111 | } 112 | } -------------------------------------------------------------------------------- /Assets/Example/Geometry/LineSegmentGpuTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3dcd008fe8d44c4ba713ba11a3ba5f0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Geometry/LineSegmentTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace UnityUtil.Example 6 | { 7 | [ExecuteAlways] 8 | public class LineSegmentTest : MonoBehaviour 9 | { 10 | public Transform line0_start; 11 | public Transform line0_end; 12 | public Transform line1_start; 13 | public Transform line1_end; 14 | 15 | public Transform point; 16 | 17 | private void OnDrawGizmos() 18 | { 19 | var pos = point.position; 20 | 21 | var line0 = new LineSegment() { start = line0_start.position, end = line0_end.position }; 22 | var line1 = new LineSegment() { start = line1_start.position, end = line1_end.position }; 23 | 24 | 25 | // line0 26 | Gizmos.color = Color.red; 27 | Gizmos.DrawLine(line0.start, line0.end); 28 | 29 | // line1 30 | Gizmos.color = Color.blue; 31 | Gizmos.DrawLine(line1.start, line1.end); 32 | 33 | // intersection line0,line1 34 | var intersection = LineSegment.CalcIntersection(line0, line1); 35 | if ( intersection != null) 36 | { 37 | Gizmos.color = Color.yellow; 38 | Gizmos.DrawWireSphere(intersection.Value, 0.3f); 39 | } 40 | 41 | // closet point 42 | Gizmos.color = Color.gray; 43 | var cpos0 = line0.ClosestPoint(pos); 44 | var cpos1 = line1.ClosestPoint(pos); 45 | Gizmos.DrawLine(cpos0, pos); 46 | Gizmos.DrawLine(cpos1, pos); 47 | 48 | 49 | // normal from pos 50 | Gizmos.color = Color.green; 51 | var normal0 = line0.CalcNormal(pos); 52 | var normal1 = line1.CalcNormal(pos); 53 | 54 | Gizmos.DrawRay(pos, -normal0); 55 | Gizmos.DrawRay(pos, -normal1); 56 | 57 | 58 | #if UNITY_EDITOR 59 | var dist0 = line0.Distance(pos); 60 | var dist1 = line1.Distance(pos); 61 | UnityEditor.Handles.Label(pos, $"Distance: {dist0},{dist1}"); 62 | 63 | var left0 = line0.IsLeft(pos); 64 | var left1 = line1.IsLeft(pos); 65 | UnityEditor.Handles.Label(pos - Vector3.up* 0.2f, $"IsLeft: {left0},{left1}"); 66 | #endif 67 | } 68 | } 69 | 70 | } -------------------------------------------------------------------------------- /Assets/Example/Geometry/LineSegmentTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 465de3856986b9c4f8e6287ce887d895 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Example/Transform.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a4012166ab138a45a807905d6a0ee78 3 | folderAsset: yes 4 | timeCreated: 1476351930 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Example/Transform/NoChildAutoDestroySampleGenerateChild.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | 4 | namespace UnityUtil.Example 5 | { 6 | public class NoChildAutoDestroySampleGenerateChild : MonoBehaviour 7 | { 8 | public float delay = 1f; 9 | 10 | void Start() 11 | { 12 | StartCoroutine(DelayGenerateChild()); 13 | } 14 | 15 | 16 | IEnumerator DelayGenerateChild() 17 | { 18 | yield return new WaitForSeconds(delay); 19 | var go = new GameObject(); 20 | go.transform.SetParent(transform); 21 | } 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /Assets/Example/Transform/NoChildAutoDestroySampleGenerateChild.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36a28207f2b51484891bd1d39ece0358 3 | timeCreated: 1476352116 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a86136125ea12a428fe89e125e93b77 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/LineSegmentGpuTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f25388e383e4374b8ca1e8bb2e55bd7 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/LineSegmentTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e538cabb82812846a94ed5944912bf8 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/MaterialImageEffect.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 1 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFiltering: 0 81 | m_PVRFilteringMode: 1 82 | m_PVRCulling: 1 83 | m_PVRFilteringGaussRadiusDirect: 1 84 | m_PVRFilteringGaussRadiusIndirect: 5 85 | m_PVRFilteringGaussRadiusAO: 2 86 | m_PVRFilteringAtrousColorSigma: 1 87 | m_PVRFilteringAtrousNormalSigma: 1 88 | m_PVRFilteringAtrousPositionSigma: 1 89 | m_LightingDataAsset: {fileID: 0} 90 | m_UseShadowmask: 0 91 | --- !u!196 &4 92 | NavMeshSettings: 93 | serializedVersion: 2 94 | m_ObjectHideFlags: 0 95 | m_BuildSettings: 96 | serializedVersion: 2 97 | agentTypeID: 0 98 | agentRadius: 0.5 99 | agentHeight: 2 100 | agentSlope: 45 101 | agentClimb: 0.4 102 | ledgeDropHeight: 0 103 | maxJumpAcrossDistance: 0 104 | minRegionArea: 2 105 | manualCellSize: 0 106 | cellSize: 0.16666667 107 | manualTileSize: 0 108 | tileSize: 256 109 | accuratePlacement: 0 110 | m_NavMeshData: {fileID: 0} 111 | --- !u!1 &404296851 112 | GameObject: 113 | m_ObjectHideFlags: 0 114 | m_PrefabParentObject: {fileID: 0} 115 | m_PrefabInternal: {fileID: 0} 116 | serializedVersion: 5 117 | m_Component: 118 | - component: {fileID: 404296853} 119 | - component: {fileID: 404296852} 120 | m_Layer: 0 121 | m_Name: Directional Light 122 | m_TagString: Untagged 123 | m_Icon: {fileID: 0} 124 | m_NavMeshLayer: 0 125 | m_StaticEditorFlags: 0 126 | m_IsActive: 1 127 | --- !u!108 &404296852 128 | Light: 129 | m_ObjectHideFlags: 0 130 | m_PrefabParentObject: {fileID: 0} 131 | m_PrefabInternal: {fileID: 0} 132 | m_GameObject: {fileID: 404296851} 133 | m_Enabled: 1 134 | serializedVersion: 8 135 | m_Type: 1 136 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 137 | m_Intensity: 1 138 | m_Range: 10 139 | m_SpotAngle: 30 140 | m_CookieSize: 10 141 | m_Shadows: 142 | m_Type: 2 143 | m_Resolution: -1 144 | m_CustomResolution: -1 145 | m_Strength: 1 146 | m_Bias: 0.05 147 | m_NormalBias: 0.4 148 | m_NearPlane: 0.2 149 | m_Cookie: {fileID: 0} 150 | m_DrawHalo: 0 151 | m_Flare: {fileID: 0} 152 | m_RenderMode: 0 153 | m_CullingMask: 154 | serializedVersion: 2 155 | m_Bits: 4294967295 156 | m_Lightmapping: 4 157 | m_AreaSize: {x: 1, y: 1} 158 | m_BounceIntensity: 1 159 | m_ColorTemperature: 6570 160 | m_UseColorTemperature: 0 161 | m_ShadowRadius: 0 162 | m_ShadowAngle: 0 163 | --- !u!4 &404296853 164 | Transform: 165 | m_ObjectHideFlags: 0 166 | m_PrefabParentObject: {fileID: 0} 167 | m_PrefabInternal: {fileID: 0} 168 | m_GameObject: {fileID: 404296851} 169 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 170 | m_LocalPosition: {x: 0, y: 3, z: 0} 171 | m_LocalScale: {x: 1, y: 1, z: 1} 172 | m_Children: [] 173 | m_Father: {fileID: 0} 174 | m_RootOrder: 1 175 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 176 | --- !u!1 &497555124 177 | GameObject: 178 | m_ObjectHideFlags: 0 179 | m_PrefabParentObject: {fileID: 0} 180 | m_PrefabInternal: {fileID: 0} 181 | serializedVersion: 5 182 | m_Component: 183 | - component: {fileID: 497555129} 184 | - component: {fileID: 497555128} 185 | - component: {fileID: 497555127} 186 | - component: {fileID: 497555126} 187 | - component: {fileID: 497555125} 188 | - component: {fileID: 497555130} 189 | m_Layer: 0 190 | m_Name: Main Camera 191 | m_TagString: MainCamera 192 | m_Icon: {fileID: 0} 193 | m_NavMeshLayer: 0 194 | m_StaticEditorFlags: 0 195 | m_IsActive: 1 196 | --- !u!81 &497555125 197 | AudioListener: 198 | m_ObjectHideFlags: 0 199 | m_PrefabParentObject: {fileID: 0} 200 | m_PrefabInternal: {fileID: 0} 201 | m_GameObject: {fileID: 497555124} 202 | m_Enabled: 1 203 | --- !u!124 &497555126 204 | Behaviour: 205 | m_ObjectHideFlags: 0 206 | m_PrefabParentObject: {fileID: 0} 207 | m_PrefabInternal: {fileID: 0} 208 | m_GameObject: {fileID: 497555124} 209 | m_Enabled: 1 210 | --- !u!92 &497555127 211 | Behaviour: 212 | m_ObjectHideFlags: 0 213 | m_PrefabParentObject: {fileID: 0} 214 | m_PrefabInternal: {fileID: 0} 215 | m_GameObject: {fileID: 497555124} 216 | m_Enabled: 1 217 | --- !u!20 &497555128 218 | Camera: 219 | m_ObjectHideFlags: 0 220 | m_PrefabParentObject: {fileID: 0} 221 | m_PrefabInternal: {fileID: 0} 222 | m_GameObject: {fileID: 497555124} 223 | m_Enabled: 1 224 | serializedVersion: 2 225 | m_ClearFlags: 1 226 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 227 | m_NormalizedViewPortRect: 228 | serializedVersion: 2 229 | x: 0 230 | y: 0 231 | width: 1 232 | height: 1 233 | near clip plane: 0.3 234 | far clip plane: 1000 235 | field of view: 60 236 | orthographic: 0 237 | orthographic size: 5 238 | m_Depth: -1 239 | m_CullingMask: 240 | serializedVersion: 2 241 | m_Bits: 4294967295 242 | m_RenderingPath: -1 243 | m_TargetTexture: {fileID: 0} 244 | m_TargetDisplay: 0 245 | m_TargetEye: 3 246 | m_HDR: 0 247 | m_AllowMSAA: 1 248 | m_ForceIntoRT: 0 249 | m_OcclusionCulling: 1 250 | m_StereoConvergence: 10 251 | m_StereoSeparation: 0.022 252 | m_StereoMirrorMode: 0 253 | --- !u!4 &497555129 254 | Transform: 255 | m_ObjectHideFlags: 0 256 | m_PrefabParentObject: {fileID: 0} 257 | m_PrefabInternal: {fileID: 0} 258 | m_GameObject: {fileID: 497555124} 259 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 260 | m_LocalPosition: {x: 0, y: 1, z: -10} 261 | m_LocalScale: {x: 1, y: 1, z: 1} 262 | m_Children: [] 263 | m_Father: {fileID: 0} 264 | m_RootOrder: 0 265 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 266 | --- !u!114 &497555130 267 | MonoBehaviour: 268 | m_ObjectHideFlags: 0 269 | m_PrefabParentObject: {fileID: 0} 270 | m_PrefabInternal: {fileID: 0} 271 | m_GameObject: {fileID: 497555124} 272 | m_Enabled: 1 273 | m_EditorHideFlags: 0 274 | m_Script: {fileID: 11500000, guid: 4385fc775e82dbc44910ac6c2b4d5caf, type: 3} 275 | m_Name: 276 | m_EditorClassIdentifier: 277 | _material: {fileID: 2100000, guid: 2040432807788aa42a96278888dcdec9, type: 2} 278 | _lod: 0 279 | _destoryMaterial: 0 280 | -------------------------------------------------------------------------------- /Assets/Scenes/MaterialImageEffect.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7ab8f6e5d6c14b41bc479a8e44144f8 3 | timeCreated: 1476689872 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/NoChildAutoDestroy.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 1 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFiltering: 0 81 | m_PVRFilteringMode: 1 82 | m_PVRCulling: 1 83 | m_PVRFilteringGaussRadiusDirect: 1 84 | m_PVRFilteringGaussRadiusIndirect: 5 85 | m_PVRFilteringGaussRadiusAO: 2 86 | m_PVRFilteringAtrousColorSigma: 1 87 | m_PVRFilteringAtrousNormalSigma: 1 88 | m_PVRFilteringAtrousPositionSigma: 1 89 | m_LightingDataAsset: {fileID: 0} 90 | m_UseShadowmask: 0 91 | --- !u!196 &4 92 | NavMeshSettings: 93 | serializedVersion: 2 94 | m_ObjectHideFlags: 0 95 | m_BuildSettings: 96 | serializedVersion: 2 97 | agentTypeID: 0 98 | agentRadius: 0.5 99 | agentHeight: 2 100 | agentSlope: 45 101 | agentClimb: 0.4 102 | ledgeDropHeight: 0 103 | maxJumpAcrossDistance: 0 104 | minRegionArea: 2 105 | manualCellSize: 0 106 | cellSize: 0.16666667 107 | manualTileSize: 0 108 | tileSize: 256 109 | accuratePlacement: 0 110 | m_NavMeshData: {fileID: 0} 111 | --- !u!1 &883007269 112 | GameObject: 113 | m_ObjectHideFlags: 0 114 | m_PrefabParentObject: {fileID: 0} 115 | m_PrefabInternal: {fileID: 0} 116 | serializedVersion: 5 117 | m_Component: 118 | - component: {fileID: 883007275} 119 | - component: {fileID: 883007274} 120 | - component: {fileID: 883007273} 121 | - component: {fileID: 883007272} 122 | - component: {fileID: 883007271} 123 | - component: {fileID: 883007270} 124 | m_Layer: 0 125 | m_Name: GenerateChild 126 | m_TagString: Untagged 127 | m_Icon: {fileID: 0} 128 | m_NavMeshLayer: 0 129 | m_StaticEditorFlags: 0 130 | m_IsActive: 1 131 | --- !u!114 &883007270 132 | MonoBehaviour: 133 | m_ObjectHideFlags: 0 134 | m_PrefabParentObject: {fileID: 0} 135 | m_PrefabInternal: {fileID: 0} 136 | m_GameObject: {fileID: 883007269} 137 | m_Enabled: 1 138 | m_EditorHideFlags: 0 139 | m_Script: {fileID: 11500000, guid: 36a28207f2b51484891bd1d39ece0358, type: 3} 140 | m_Name: 141 | m_EditorClassIdentifier: 142 | delay: 1 143 | --- !u!114 &883007271 144 | MonoBehaviour: 145 | m_ObjectHideFlags: 0 146 | m_PrefabParentObject: {fileID: 0} 147 | m_PrefabInternal: {fileID: 0} 148 | m_GameObject: {fileID: 883007269} 149 | m_Enabled: 1 150 | m_EditorHideFlags: 0 151 | m_Script: {fileID: 11500000, guid: 405d790cf500b6a42b1d8f2a297cf331, type: 3} 152 | m_Name: 153 | m_EditorClassIdentifier: 154 | waitChildGenerate: 1 155 | --- !u!23 &883007272 156 | MeshRenderer: 157 | m_ObjectHideFlags: 0 158 | m_PrefabParentObject: {fileID: 0} 159 | m_PrefabInternal: {fileID: 0} 160 | m_GameObject: {fileID: 883007269} 161 | m_Enabled: 1 162 | m_CastShadows: 1 163 | m_ReceiveShadows: 1 164 | m_MotionVectors: 1 165 | m_LightProbeUsage: 1 166 | m_ReflectionProbeUsage: 1 167 | m_Materials: 168 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 169 | m_StaticBatchInfo: 170 | firstSubMesh: 0 171 | subMeshCount: 0 172 | m_StaticBatchRoot: {fileID: 0} 173 | m_ProbeAnchor: {fileID: 0} 174 | m_LightProbeVolumeOverride: {fileID: 0} 175 | m_ScaleInLightmap: 1 176 | m_PreserveUVs: 1 177 | m_IgnoreNormalsForChartDetection: 0 178 | m_ImportantGI: 0 179 | m_SelectedEditorRenderState: 3 180 | m_MinimumChartSize: 4 181 | m_AutoUVMaxDistance: 0.5 182 | m_AutoUVMaxAngle: 89 183 | m_LightmapParameters: {fileID: 0} 184 | m_SortingLayerID: 0 185 | m_SortingLayer: 0 186 | m_SortingOrder: 0 187 | --- !u!65 &883007273 188 | BoxCollider: 189 | m_ObjectHideFlags: 0 190 | m_PrefabParentObject: {fileID: 0} 191 | m_PrefabInternal: {fileID: 0} 192 | m_GameObject: {fileID: 883007269} 193 | m_Material: {fileID: 0} 194 | m_IsTrigger: 0 195 | m_Enabled: 1 196 | serializedVersion: 2 197 | m_Size: {x: 1, y: 1, z: 1} 198 | m_Center: {x: 0, y: 0, z: 0} 199 | --- !u!33 &883007274 200 | MeshFilter: 201 | m_ObjectHideFlags: 0 202 | m_PrefabParentObject: {fileID: 0} 203 | m_PrefabInternal: {fileID: 0} 204 | m_GameObject: {fileID: 883007269} 205 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 206 | --- !u!4 &883007275 207 | Transform: 208 | m_ObjectHideFlags: 0 209 | m_PrefabParentObject: {fileID: 0} 210 | m_PrefabInternal: {fileID: 0} 211 | m_GameObject: {fileID: 883007269} 212 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 213 | m_LocalPosition: {x: 5, y: 0, z: 0} 214 | m_LocalScale: {x: 1, y: 1, z: 1} 215 | m_Children: [] 216 | m_Father: {fileID: 0} 217 | m_RootOrder: 4 218 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 219 | --- !u!1 &1011000697 220 | GameObject: 221 | m_ObjectHideFlags: 0 222 | m_PrefabParentObject: {fileID: 0} 223 | m_PrefabInternal: {fileID: 0} 224 | serializedVersion: 5 225 | m_Component: 226 | - component: {fileID: 1011000702} 227 | - component: {fileID: 1011000701} 228 | - component: {fileID: 1011000700} 229 | - component: {fileID: 1011000699} 230 | - component: {fileID: 1011000698} 231 | m_Layer: 0 232 | m_Name: HasChild 233 | m_TagString: Untagged 234 | m_Icon: {fileID: 0} 235 | m_NavMeshLayer: 0 236 | m_StaticEditorFlags: 0 237 | m_IsActive: 1 238 | --- !u!114 &1011000698 239 | MonoBehaviour: 240 | m_ObjectHideFlags: 0 241 | m_PrefabParentObject: {fileID: 0} 242 | m_PrefabInternal: {fileID: 0} 243 | m_GameObject: {fileID: 1011000697} 244 | m_Enabled: 1 245 | m_EditorHideFlags: 0 246 | m_Script: {fileID: 11500000, guid: 405d790cf500b6a42b1d8f2a297cf331, type: 3} 247 | m_Name: 248 | m_EditorClassIdentifier: 249 | waitChildGenerate: 0 250 | --- !u!23 &1011000699 251 | MeshRenderer: 252 | m_ObjectHideFlags: 0 253 | m_PrefabParentObject: {fileID: 0} 254 | m_PrefabInternal: {fileID: 0} 255 | m_GameObject: {fileID: 1011000697} 256 | m_Enabled: 1 257 | m_CastShadows: 1 258 | m_ReceiveShadows: 1 259 | m_MotionVectors: 1 260 | m_LightProbeUsage: 1 261 | m_ReflectionProbeUsage: 1 262 | m_Materials: 263 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 264 | m_StaticBatchInfo: 265 | firstSubMesh: 0 266 | subMeshCount: 0 267 | m_StaticBatchRoot: {fileID: 0} 268 | m_ProbeAnchor: {fileID: 0} 269 | m_LightProbeVolumeOverride: {fileID: 0} 270 | m_ScaleInLightmap: 1 271 | m_PreserveUVs: 1 272 | m_IgnoreNormalsForChartDetection: 0 273 | m_ImportantGI: 0 274 | m_SelectedEditorRenderState: 3 275 | m_MinimumChartSize: 4 276 | m_AutoUVMaxDistance: 0.5 277 | m_AutoUVMaxAngle: 89 278 | m_LightmapParameters: {fileID: 0} 279 | m_SortingLayerID: 0 280 | m_SortingLayer: 0 281 | m_SortingOrder: 0 282 | --- !u!65 &1011000700 283 | BoxCollider: 284 | m_ObjectHideFlags: 0 285 | m_PrefabParentObject: {fileID: 0} 286 | m_PrefabInternal: {fileID: 0} 287 | m_GameObject: {fileID: 1011000697} 288 | m_Material: {fileID: 0} 289 | m_IsTrigger: 0 290 | m_Enabled: 1 291 | serializedVersion: 2 292 | m_Size: {x: 1, y: 1, z: 1} 293 | m_Center: {x: 0, y: 0, z: 0} 294 | --- !u!33 &1011000701 295 | MeshFilter: 296 | m_ObjectHideFlags: 0 297 | m_PrefabParentObject: {fileID: 0} 298 | m_PrefabInternal: {fileID: 0} 299 | m_GameObject: {fileID: 1011000697} 300 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 301 | --- !u!4 &1011000702 302 | Transform: 303 | m_ObjectHideFlags: 0 304 | m_PrefabParentObject: {fileID: 0} 305 | m_PrefabInternal: {fileID: 0} 306 | m_GameObject: {fileID: 1011000697} 307 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 308 | m_LocalPosition: {x: 0, y: 0, z: 0} 309 | m_LocalScale: {x: 1, y: 1, z: 1} 310 | m_Children: 311 | - {fileID: 1081341979} 312 | m_Father: {fileID: 0} 313 | m_RootOrder: 3 314 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 315 | --- !u!1 &1081341978 316 | GameObject: 317 | m_ObjectHideFlags: 0 318 | m_PrefabParentObject: {fileID: 0} 319 | m_PrefabInternal: {fileID: 0} 320 | serializedVersion: 5 321 | m_Component: 322 | - component: {fileID: 1081341979} 323 | m_Layer: 0 324 | m_Name: GameObject 325 | m_TagString: Untagged 326 | m_Icon: {fileID: 0} 327 | m_NavMeshLayer: 0 328 | m_StaticEditorFlags: 0 329 | m_IsActive: 1 330 | --- !u!4 &1081341979 331 | Transform: 332 | m_ObjectHideFlags: 0 333 | m_PrefabParentObject: {fileID: 0} 334 | m_PrefabInternal: {fileID: 0} 335 | m_GameObject: {fileID: 1081341978} 336 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 337 | m_LocalPosition: {x: 0, y: 0, z: 0} 338 | m_LocalScale: {x: 1, y: 1, z: 1} 339 | m_Children: [] 340 | m_Father: {fileID: 1011000702} 341 | m_RootOrder: 0 342 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 343 | --- !u!1 &1132261452 344 | GameObject: 345 | m_ObjectHideFlags: 0 346 | m_PrefabParentObject: {fileID: 0} 347 | m_PrefabInternal: {fileID: 0} 348 | serializedVersion: 5 349 | m_Component: 350 | - component: {fileID: 1132261454} 351 | - component: {fileID: 1132261453} 352 | m_Layer: 0 353 | m_Name: Directional Light 354 | m_TagString: Untagged 355 | m_Icon: {fileID: 0} 356 | m_NavMeshLayer: 0 357 | m_StaticEditorFlags: 0 358 | m_IsActive: 1 359 | --- !u!108 &1132261453 360 | Light: 361 | m_ObjectHideFlags: 0 362 | m_PrefabParentObject: {fileID: 0} 363 | m_PrefabInternal: {fileID: 0} 364 | m_GameObject: {fileID: 1132261452} 365 | m_Enabled: 1 366 | serializedVersion: 8 367 | m_Type: 1 368 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 369 | m_Intensity: 1 370 | m_Range: 10 371 | m_SpotAngle: 30 372 | m_CookieSize: 10 373 | m_Shadows: 374 | m_Type: 2 375 | m_Resolution: -1 376 | m_CustomResolution: -1 377 | m_Strength: 1 378 | m_Bias: 0.05 379 | m_NormalBias: 0.4 380 | m_NearPlane: 0.2 381 | m_Cookie: {fileID: 0} 382 | m_DrawHalo: 0 383 | m_Flare: {fileID: 0} 384 | m_RenderMode: 0 385 | m_CullingMask: 386 | serializedVersion: 2 387 | m_Bits: 4294967295 388 | m_Lightmapping: 4 389 | m_AreaSize: {x: 1, y: 1} 390 | m_BounceIntensity: 1 391 | m_ColorTemperature: 6570 392 | m_UseColorTemperature: 0 393 | m_ShadowRadius: 0 394 | m_ShadowAngle: 0 395 | --- !u!4 &1132261454 396 | Transform: 397 | m_ObjectHideFlags: 0 398 | m_PrefabParentObject: {fileID: 0} 399 | m_PrefabInternal: {fileID: 0} 400 | m_GameObject: {fileID: 1132261452} 401 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 402 | m_LocalPosition: {x: 0, y: 3, z: 0} 403 | m_LocalScale: {x: 1, y: 1, z: 1} 404 | m_Children: [] 405 | m_Father: {fileID: 0} 406 | m_RootOrder: 1 407 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 408 | --- !u!1 &1790766135 409 | GameObject: 410 | m_ObjectHideFlags: 0 411 | m_PrefabParentObject: {fileID: 0} 412 | m_PrefabInternal: {fileID: 0} 413 | serializedVersion: 5 414 | m_Component: 415 | - component: {fileID: 1790766140} 416 | - component: {fileID: 1790766139} 417 | - component: {fileID: 1790766138} 418 | - component: {fileID: 1790766137} 419 | - component: {fileID: 1790766136} 420 | m_Layer: 0 421 | m_Name: Main Camera 422 | m_TagString: MainCamera 423 | m_Icon: {fileID: 0} 424 | m_NavMeshLayer: 0 425 | m_StaticEditorFlags: 0 426 | m_IsActive: 1 427 | --- !u!81 &1790766136 428 | AudioListener: 429 | m_ObjectHideFlags: 0 430 | m_PrefabParentObject: {fileID: 0} 431 | m_PrefabInternal: {fileID: 0} 432 | m_GameObject: {fileID: 1790766135} 433 | m_Enabled: 1 434 | --- !u!124 &1790766137 435 | Behaviour: 436 | m_ObjectHideFlags: 0 437 | m_PrefabParentObject: {fileID: 0} 438 | m_PrefabInternal: {fileID: 0} 439 | m_GameObject: {fileID: 1790766135} 440 | m_Enabled: 1 441 | --- !u!92 &1790766138 442 | Behaviour: 443 | m_ObjectHideFlags: 0 444 | m_PrefabParentObject: {fileID: 0} 445 | m_PrefabInternal: {fileID: 0} 446 | m_GameObject: {fileID: 1790766135} 447 | m_Enabled: 1 448 | --- !u!20 &1790766139 449 | Camera: 450 | m_ObjectHideFlags: 0 451 | m_PrefabParentObject: {fileID: 0} 452 | m_PrefabInternal: {fileID: 0} 453 | m_GameObject: {fileID: 1790766135} 454 | m_Enabled: 1 455 | serializedVersion: 2 456 | m_ClearFlags: 1 457 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 458 | m_NormalizedViewPortRect: 459 | serializedVersion: 2 460 | x: 0 461 | y: 0 462 | width: 1 463 | height: 1 464 | near clip plane: 0.3 465 | far clip plane: 1000 466 | field of view: 60 467 | orthographic: 0 468 | orthographic size: 5 469 | m_Depth: -1 470 | m_CullingMask: 471 | serializedVersion: 2 472 | m_Bits: 4294967295 473 | m_RenderingPath: -1 474 | m_TargetTexture: {fileID: 0} 475 | m_TargetDisplay: 0 476 | m_TargetEye: 3 477 | m_HDR: 0 478 | m_AllowMSAA: 1 479 | m_ForceIntoRT: 0 480 | m_OcclusionCulling: 1 481 | m_StereoConvergence: 10 482 | m_StereoSeparation: 0.022 483 | m_StereoMirrorMode: 0 484 | --- !u!4 &1790766140 485 | Transform: 486 | m_ObjectHideFlags: 0 487 | m_PrefabParentObject: {fileID: 0} 488 | m_PrefabInternal: {fileID: 0} 489 | m_GameObject: {fileID: 1790766135} 490 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 491 | m_LocalPosition: {x: 0, y: 1, z: -10} 492 | m_LocalScale: {x: 1, y: 1, z: 1} 493 | m_Children: [] 494 | m_Father: {fileID: 0} 495 | m_RootOrder: 0 496 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 497 | --- !u!1 &2073825453 498 | GameObject: 499 | m_ObjectHideFlags: 0 500 | m_PrefabParentObject: {fileID: 0} 501 | m_PrefabInternal: {fileID: 0} 502 | serializedVersion: 5 503 | m_Component: 504 | - component: {fileID: 2073825458} 505 | - component: {fileID: 2073825457} 506 | - component: {fileID: 2073825456} 507 | - component: {fileID: 2073825455} 508 | - component: {fileID: 2073825454} 509 | m_Layer: 0 510 | m_Name: HasNoChild 511 | m_TagString: Untagged 512 | m_Icon: {fileID: 0} 513 | m_NavMeshLayer: 0 514 | m_StaticEditorFlags: 0 515 | m_IsActive: 1 516 | --- !u!114 &2073825454 517 | MonoBehaviour: 518 | m_ObjectHideFlags: 0 519 | m_PrefabParentObject: {fileID: 0} 520 | m_PrefabInternal: {fileID: 0} 521 | m_GameObject: {fileID: 2073825453} 522 | m_Enabled: 1 523 | m_EditorHideFlags: 0 524 | m_Script: {fileID: 11500000, guid: 405d790cf500b6a42b1d8f2a297cf331, type: 3} 525 | m_Name: 526 | m_EditorClassIdentifier: 527 | waitChildGenerate: 0 528 | --- !u!23 &2073825455 529 | MeshRenderer: 530 | m_ObjectHideFlags: 0 531 | m_PrefabParentObject: {fileID: 0} 532 | m_PrefabInternal: {fileID: 0} 533 | m_GameObject: {fileID: 2073825453} 534 | m_Enabled: 1 535 | m_CastShadows: 1 536 | m_ReceiveShadows: 1 537 | m_MotionVectors: 1 538 | m_LightProbeUsage: 1 539 | m_ReflectionProbeUsage: 1 540 | m_Materials: 541 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 542 | m_StaticBatchInfo: 543 | firstSubMesh: 0 544 | subMeshCount: 0 545 | m_StaticBatchRoot: {fileID: 0} 546 | m_ProbeAnchor: {fileID: 0} 547 | m_LightProbeVolumeOverride: {fileID: 0} 548 | m_ScaleInLightmap: 1 549 | m_PreserveUVs: 1 550 | m_IgnoreNormalsForChartDetection: 0 551 | m_ImportantGI: 0 552 | m_SelectedEditorRenderState: 3 553 | m_MinimumChartSize: 4 554 | m_AutoUVMaxDistance: 0.5 555 | m_AutoUVMaxAngle: 89 556 | m_LightmapParameters: {fileID: 0} 557 | m_SortingLayerID: 0 558 | m_SortingLayer: 0 559 | m_SortingOrder: 0 560 | --- !u!65 &2073825456 561 | BoxCollider: 562 | m_ObjectHideFlags: 0 563 | m_PrefabParentObject: {fileID: 0} 564 | m_PrefabInternal: {fileID: 0} 565 | m_GameObject: {fileID: 2073825453} 566 | m_Material: {fileID: 0} 567 | m_IsTrigger: 0 568 | m_Enabled: 1 569 | serializedVersion: 2 570 | m_Size: {x: 1, y: 1, z: 1} 571 | m_Center: {x: 0, y: 0, z: 0} 572 | --- !u!33 &2073825457 573 | MeshFilter: 574 | m_ObjectHideFlags: 0 575 | m_PrefabParentObject: {fileID: 0} 576 | m_PrefabInternal: {fileID: 0} 577 | m_GameObject: {fileID: 2073825453} 578 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 579 | --- !u!4 &2073825458 580 | Transform: 581 | m_ObjectHideFlags: 0 582 | m_PrefabParentObject: {fileID: 0} 583 | m_PrefabInternal: {fileID: 0} 584 | m_GameObject: {fileID: 2073825453} 585 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 586 | m_LocalPosition: {x: -5, y: 0, z: 0} 587 | m_LocalScale: {x: 1, y: 1, z: 1} 588 | m_Children: [] 589 | m_Father: {fileID: 0} 590 | m_RootOrder: 2 591 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 592 | -------------------------------------------------------------------------------- /Assets/Scenes/NoChildAutoDestroy.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 456a13c50adb5ad4c8550ca50f65fb6a 3 | timeCreated: 1476352246 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Animation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd82f72ddcfcfd24691befe077cdba4f 3 | folderAsset: yes 4 | timeCreated: 1470054080 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Animation/AnimatorExtension.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Linq; 4 | 5 | public static class AnimatorExtension { 6 | 7 | public static bool IsStateFinished(this Animator a, string layerAndStateName, bool playIfNot = false) 8 | { 9 | var info = a.GetCurrentAnimatorStateInfo(0); 10 | bool isState = info.IsName(layerAndStateName); 11 | if ( !isState && playIfNot ){ 12 | a.Play(layerAndStateName); 13 | } 14 | 15 | return( isState && (info.normalizedTime >= 1f)); 16 | } 17 | 18 | public static bool IsState(this Animator a, string layerAndStateName) 19 | { 20 | var info = a.GetCurrentAnimatorStateInfo(0); 21 | return info.IsName(layerAndStateName); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Animation/AnimatorExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1bbd9391d6b327d43855114a51182d09 3 | timeCreated: 1470054086 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Animation/AnimatorStarter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | [RequireComponent(typeof(Animator))] 6 | public class AnimatorStarter : MonoBehaviour 7 | { 8 | public string trigger; 9 | 10 | void Start() 11 | { 12 | if (!string.IsNullOrEmpty(trigger)) 13 | { 14 | GetComponent().SetTrigger(trigger); 15 | } 16 | 17 | } 18 | 19 | } 20 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Animation/AnimatorStarter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 790271b73ccbb9b40bc7888f8f078408 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Animation/RandomAnimatorController.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | namespace UnityUtil 5 | { 6 | 7 | [RequireComponent(typeof(Animator))] 8 | public class RandomAnimatorController : MonoBehaviour 9 | { 10 | 11 | public RuntimeAnimatorController[] controllers; 12 | 13 | void Start() 14 | { 15 | 16 | GetComponent().runtimeAnimatorController = controllers[Random.Range(0, controllers.Length)]; 17 | 18 | } 19 | 20 | } 21 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Animation/RandomAnimatorController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eaf5557f38f5b9842909fe35394c5507 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Animation/RandomStartAnimator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | 6 | [RequireComponent(typeof(Animator))] 7 | public class RandomStartAnimator : MonoBehaviour 8 | { 9 | void Start() 10 | { 11 | Set(GetComponent()); 12 | } 13 | 14 | public static void Set(Animator animator) 15 | { 16 | Set(animator, Random.value); 17 | } 18 | 19 | public static void Set(Animator animator, float normalizedTime) 20 | { 21 | var info = animator.GetCurrentAnimatorStateInfo(0); 22 | animator.Play(info.fullPathHash, 0, normalizedTime); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Animation/RandomStartAnimator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 546ea6676927e624ea3d984ff78850ff 3 | timeCreated: 1470054088 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Animation/ScaledCurve.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Linq; 3 | 4 | #if UNITY_EDITOR 5 | using UnityEditor; 6 | #endif 7 | 8 | namespace UnityUtil 9 | { 10 | [System.Serializable] 11 | public class ScaledCurve 12 | { 13 | [SerializeField] protected AnimationCurve curve; 14 | public float scaleT = 1f; 15 | public float scaleY = 1f; 16 | 17 | public float Evaluate(float time) 18 | { 19 | return curve.Evaluate(time / scaleT) * scaleY; 20 | } 21 | } 22 | 23 | #if UNITY_EDITOR 24 | [CustomPropertyDrawer(typeof(ScaledCurve))] 25 | public class ScaledCurveDrawer : PropertyDrawer 26 | { 27 | static float Height => EditorGUIUtility.singleLineHeight; 28 | 29 | public override float GetPropertyHeight(SerializedProperty property, GUIContent label) 30 | { 31 | return Height * 2f; 32 | } 33 | 34 | public override void OnGUI(Rect position, SerializedProperty prop, GUIContent label) 35 | { 36 | EditorGUI.BeginProperty(position, label, prop); 37 | 38 | position.height = Height; 39 | EditorGUI.PropertyField(position, prop.FindPropertyRelative("curve"), label); 40 | 41 | 42 | position.y += position.height; 43 | position = LikePrefixLabelReturn(position); 44 | 45 | var fields = new[] {"scaleY", "scaleT"}; 46 | var props = fields.Select(prop.FindPropertyRelative).ToArray(); 47 | var floats = props.Select(p => p.floatValue).ToArray(); 48 | 49 | EditorGUI.MultiFloatField(position, 50 | fields.Select(f => new GUIContent(f.Replace("scale", ""))).ToArray(), 51 | floats 52 | ); 53 | 54 | for (var i = 0; i < floats.Length; ++i) 55 | { 56 | props[i].floatValue = floats[i]; 57 | } 58 | 59 | EditorGUI.EndProperty(); 60 | } 61 | 62 | static Rect LikePrefixLabelReturn(Rect totalPosition) 63 | { 64 | var ret = new Rect(totalPosition.x + EditorGUIUtility.labelWidth, totalPosition.y, 65 | totalPosition.width - EditorGUIUtility.labelWidth, Height); 66 | 67 | return ret; 68 | } 69 | } 70 | #endif 71 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Animation/ScaledCurve.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08bdecc87db98d440b97950f1a41d938 3 | timeCreated: 1470054082 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ceb266902ffec094580761cf32122531 3 | folderAsset: yes 4 | timeCreated: 1470117957 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/ApplyTexToCamera.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEngine.Serialization; 5 | 6 | namespace UnityUtil 7 | { 8 | 9 | 10 | [RequireComponent(typeof(Camera))] 11 | public class ApplyTexToCamera : MonoBehaviour 12 | { 13 | #region TypeDefine 14 | public enum BlendOp 15 | { 16 | None = -1, 17 | Add, 18 | Blend, 19 | AddWithA 20 | }; 21 | 22 | [System.Serializable] 23 | public class Data 24 | { 25 | public BlendOp blend; 26 | [FormerlySerializedAs("texGetttable")] public TextureGettable texGettable; 27 | } 28 | #endregion 29 | 30 | [FormerlySerializedAs("_shader")] public Shader shader; 31 | Material _material; 32 | 33 | [FormerlySerializedAs("datas")] public List dataList; 34 | private static readonly int BlendTex = Shader.PropertyToID("_BlendTex"); 35 | 36 | void Start() 37 | { 38 | _material = new Material(shader); 39 | } 40 | 41 | public void OnDestroy() 42 | { 43 | DestroyImmediate(_material); 44 | } 45 | 46 | void OnRenderImage(RenderTexture src, RenderTexture dest) 47 | { 48 | var list = dataList.Where((d) => (d.texGettable != null) && (d.blend != BlendOp.None)).ToList(); 49 | 50 | if (list.Any()) 51 | { 52 | var t0 = RenderTexture.GetTemporary(src.width, src.height); 53 | var t1 = RenderTexture.GetTemporary(src.width, src.height); 54 | 55 | Graphics.Blit(src, t0); 56 | list.ForEach(d => 57 | { 58 | var tex = d.texGettable.GetTexture(); 59 | if (tex != null) 60 | { 61 | _material.SetTexture(BlendTex, tex); 62 | Graphics.Blit(t0, t1, _material, (int)d.blend); 63 | 64 | (t0, t1) = (t1, t0); 65 | } 66 | }); 67 | 68 | Graphics.Blit(t0, dest); 69 | 70 | RenderTexture.ReleaseTemporary(t1); 71 | RenderTexture.ReleaseTemporary(t0); 72 | } 73 | else 74 | { 75 | Graphics.Blit(src, dest); 76 | } 77 | } 78 | } 79 | 80 | // インスペクタで設定したいのでinterfaceじゃなくてclassになってる 81 | public abstract class TextureGettable : MonoBehaviour 82 | { 83 | public abstract Texture GetTexture(); 84 | } 85 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/ApplyTexToCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 209b244063d3e7e4399b99fe2c09216c 3 | timeCreated: 1472470641 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: 8 | - _shader: {fileID: 4800000, guid: c88c87dc1390c704ea4aee5e4e14155f, type: 3} 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/CameraTargetTexture.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | 6 | [ExecuteInEditMode] 7 | [RequireComponent(typeof(Camera))] 8 | public class CameraTargetTexture : CameraTexture 9 | { 10 | protected override void OnTextureUpdate(RenderTexture t) 11 | { 12 | t.hideFlags = HideFlags.HideAndDontSave; 13 | GetComponent().targetTexture = t; 14 | } 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/CameraTargetTexture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e38faf5a2b6f8f949aa2572535611562 3 | timeCreated: 1471429748 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/CameraTexture.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | namespace UnityUtil 5 | { 6 | 7 | public abstract class CameraTexture : TextureGettable 8 | { 9 | public RenderTexture tex; 10 | public float scale = 1f; 11 | 12 | #region Override 13 | public override Texture GetTexture() { return tex; } 14 | #endregion 15 | 16 | void Start() 17 | { 18 | UpdateTexture(); 19 | } 20 | 21 | 22 | #if UNITY_EDITOR 23 | public void OnEnable() 24 | { 25 | StartCoroutine(CheckScreenSizeChange()); 26 | } 27 | public void OnDisable() 28 | { 29 | StopAllCoroutines(); 30 | } 31 | 32 | #endif 33 | 34 | void UpdateTexture() 35 | { 36 | if (tex != null) 37 | { 38 | var cam = GetComponent(); 39 | if (cam.targetTexture == tex) cam.targetTexture = null; 40 | DestroyImmediate(tex); 41 | } 42 | tex = new RenderTexture(Mathf.FloorToInt(Screen.width * scale), Mathf.FloorToInt(Screen.height * scale), 1); 43 | 44 | OnTextureUpdate(tex); 45 | } 46 | 47 | protected virtual void OnTextureUpdate(RenderTexture t) { } 48 | 49 | static Vector2 ScreenSize => new(Screen.width, Screen.height); 50 | 51 | IEnumerator CheckScreenSizeChange() 52 | { 53 | var size = ScreenSize; 54 | while (true) 55 | { 56 | yield return new WaitForEndOfFrame(); 57 | 58 | var newSize = ScreenSize; 59 | if (size != newSize) 60 | { 61 | UpdateTexture(); 62 | size = newSize; 63 | } 64 | } 65 | } 66 | 67 | public void OnDestroy() 68 | { 69 | DestroyImmediate(tex); 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/CameraTexture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd6b12e22b4e90b4f9c8c48ed7689afe 3 | timeCreated: 1471429748 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/CaptureFrameBuffer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | 6 | [ExecuteInEditMode] 7 | public class CaptureFrameBuffer : CameraTexture 8 | { 9 | public void OnRenderImage(RenderTexture source, RenderTexture destination) 10 | { 11 | Graphics.Blit(source, destination); 12 | Graphics.Blit(source, tex); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/CaptureFrameBuffer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f9c6bdb4e02bd6498831949169eb789 3 | timeCreated: 1471429748 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/CopyMainCamera.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | public class CopyMainCamera : MonoBehaviour 6 | { 7 | 8 | void Update() 9 | { 10 | CopyMainCameraParameters(); 11 | } 12 | 13 | void CopyMainCameraParameters() 14 | { 15 | var src = Camera.main; 16 | 17 | GetComponent().orthographicSize = src.orthographicSize; 18 | transform.position = src.transform.position; 19 | 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/CopyMainCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 501280c0bd1ae9e47a272c2a1c1dc16b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/MaterialImageEffect.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Serialization; 3 | 4 | namespace UnityUtil 5 | { 6 | [ExecuteInEditMode] 7 | [RequireComponent(typeof(Camera))] 8 | public class MaterialImageEffect : MonoBehaviour 9 | { 10 | [FormerlySerializedAs("_material")] public Material material; 11 | [FormerlySerializedAs("_lod")] public int lod = 0; 12 | [FormerlySerializedAs("_destoryMaterial")] public bool destroyMaterial; 13 | 14 | void Start() 15 | { 16 | if (material == null) 17 | Destroy(this); 18 | } 19 | 20 | void OnRenderImage(RenderTexture src, RenderTexture dst) 21 | { 22 | var div = 1 << lod; 23 | 24 | var tmp = RenderTexture.GetTemporary(src.width / div, src.height / div); 25 | Graphics.Blit(src, tmp, material); 26 | Graphics.Blit(tmp, dst); 27 | 28 | RenderTexture.ReleaseTemporary(tmp); 29 | } 30 | 31 | public void OnDestroy() 32 | { 33 | if (destroyMaterial) 34 | { 35 | Destroy(material); 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/MaterialImageEffect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cddb0c11947446748aec6834a3788463 3 | timeCreated: 1476689386 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/MultiCameraToCamera.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using UnityEngine.Serialization; 6 | 7 | namespace UnityUtil 8 | { 9 | 10 | 11 | [ExecuteInEditMode] 12 | [RequireComponent(typeof(Camera))] 13 | [System.Obsolete("use ApplyTexToCamera and CameraTexture.")] 14 | public class MultiCameraToCamera : MonoBehaviour 15 | { 16 | public enum BlendOp 17 | { 18 | None = -1, 19 | Add, 20 | Blend 21 | }; 22 | 23 | [System.Serializable] 24 | public class Data 25 | { 26 | public Camera camera; 27 | public BlendOp blend; 28 | } 29 | 30 | public Material material; 31 | [FormerlySerializedAs("datas")] public List dataList; 32 | private static readonly int BlendTex = Shader.PropertyToID("_BlendTex"); 33 | 34 | 35 | void OnRenderImage(RenderTexture src, RenderTexture dest) 36 | { 37 | var list = (from d in dataList 38 | where d.camera != null && d.camera.targetTexture != null 39 | where d.blend != BlendOp.None 40 | select d 41 | ).ToList(); 42 | 43 | if (list.Any()) 44 | { 45 | var tmp = RenderTexture.GetTemporary(src.width, src.height, src.depth, src.format); 46 | var tmpDest = tmp; 47 | 48 | list.ForEach(d => 49 | { 50 | material.SetTexture(BlendTex, d.camera.targetTexture); 51 | Graphics.Blit(src, tmpDest, material, (int)d.blend); 52 | (src, tmpDest) = (tmpDest, src); 53 | }); 54 | 55 | Graphics.Blit(src, dest); 56 | 57 | RenderTexture.ReleaseTemporary(tmp); 58 | } 59 | else 60 | { 61 | Graphics.Blit(src, dest); 62 | } 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/MultiCameraToCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffd1f2462d8ec96439d4b974b6bf1ec4 3 | timeCreated: 1470117078 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/MultiCameraToCamera.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 5 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: MultiCameraToCamera 10 | m_Shader: {fileID: 4800000, guid: 3b46131fff14504408e42660684b36fc, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | m_SavedProperties: 15 | serializedVersion: 2 16 | m_TexEnvs: 17 | data: 18 | first: 19 | name: _MainTex 20 | second: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | data: 25 | first: 26 | name: _BumpMap 27 | second: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | data: 32 | first: 33 | name: _DetailNormalMap 34 | second: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | data: 39 | first: 40 | name: _ParallaxMap 41 | second: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | data: 46 | first: 47 | name: _OcclusionMap 48 | second: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | data: 53 | first: 54 | name: _EmissionMap 55 | second: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | data: 60 | first: 61 | name: _DetailMask 62 | second: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | data: 67 | first: 68 | name: _DetailAlbedoMap 69 | second: 70 | m_Texture: {fileID: 0} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | data: 74 | first: 75 | name: _MetallicGlossMap 76 | second: 77 | m_Texture: {fileID: 0} 78 | m_Scale: {x: 1, y: 1} 79 | m_Offset: {x: 0, y: 0} 80 | data: 81 | first: 82 | name: _BlendTex 83 | second: 84 | m_Texture: {fileID: 0} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | m_Floats: 88 | data: 89 | first: 90 | name: _Cutoff 91 | second: .5 92 | data: 93 | first: 94 | name: _SrcBlend 95 | second: 1 96 | data: 97 | first: 98 | name: _DstBlend 99 | second: 0 100 | data: 101 | first: 102 | name: _Parallax 103 | second: .0199999996 104 | data: 105 | first: 106 | name: _ZWrite 107 | second: 1 108 | data: 109 | first: 110 | name: _Glossiness 111 | second: .5 112 | data: 113 | first: 114 | name: _BumpScale 115 | second: 1 116 | data: 117 | first: 118 | name: _OcclusionStrength 119 | second: 1 120 | data: 121 | first: 122 | name: _DetailNormalMapScale 123 | second: 1 124 | data: 125 | first: 126 | name: _UVSec 127 | second: 0 128 | data: 129 | first: 130 | name: _EmissionScaleUI 131 | second: 0 132 | data: 133 | first: 134 | name: _Mode 135 | second: 0 136 | data: 137 | first: 138 | name: _Metallic 139 | second: 0 140 | m_Colors: 141 | data: 142 | first: 143 | name: _EmissionColor 144 | second: {r: 0, g: 0, b: 0, a: 1} 145 | data: 146 | first: 147 | name: _Color 148 | second: {r: 1, g: 1, b: 1, a: 1} 149 | data: 150 | first: 151 | name: _EmissionColorUI 152 | second: {r: 1, g: 1, b: 1, a: 1} 153 | data: 154 | first: 155 | name: _Mul 156 | second: {r: 1, g: 1, b: 1, a: 1} 157 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/MultiCameraToCamera.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bdc3996c03b1e34e9adedc06f25265c 3 | timeCreated: 1470117080 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/TexBlend.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/TexBlend" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "white" {} 4 | _BlendTex ("BlendTex", 2D) = "white" {} 5 | _Mul ("Mul", Color) = (1,1,1,1) 6 | } 7 | 8 | 9 | CGINCLUDE 10 | #pragma vertex vert_img 11 | #pragma target 3.0 12 | #include "UnityCG.cginc" 13 | 14 | sampler2D _MainTex; 15 | half4 _MainTex_TexelSize; 16 | sampler2D _BlendTex; 17 | float4 _Mul; 18 | 19 | float4 GetBaseColor(float2 uv) 20 | { 21 | #if UNITY_UV_STARTS_AT_TOP 22 | if (_MainTex_TexelSize.y < 0) { 23 | uv.y = 1.0 - uv.y; 24 | } 25 | #endif 26 | 27 | return tex2D(_MainTex, uv); 28 | } 29 | 30 | float4 GetBlendColor(float2 uv) 31 | { 32 | return tex2D(_BlendTex, uv) * _Mul; 33 | } 34 | 35 | float4 frag_add(v2f_img IN) : COLOR { 36 | 37 | return GetBaseColor(IN.uv) + GetBlendColor(IN.uv); 38 | } 39 | 40 | half4 frag_add_with_a(v2f_img IN) : COLOR 41 | { 42 | half4 blend = GetBlendColor(IN.uv); 43 | return GetBaseColor(IN.uv) + blend * blend.a; 44 | } 45 | 46 | float4 frag_blend(v2f_img IN) : COLOR 47 | { 48 | float4 blend = GetBlendColor(IN.uv); 49 | 50 | return GetBaseColor(IN.uv) * (1 - blend.a) + blend * blend.a; 51 | } 52 | 53 | ENDCG 54 | 55 | SubShader { 56 | 57 | Tags { "Queue"="Overlay" } 58 | 59 | ZTest Off Cull Off ZWrite Off 60 | Fog { Mode off } 61 | Blend off 62 | 63 | Pass { 64 | CGPROGRAM 65 | #pragma fragment frag_add 66 | ENDCG 67 | } 68 | 69 | Pass { 70 | CGPROGRAM 71 | #pragma fragment frag_blend 72 | ENDCG 73 | } 74 | 75 | Pass{ 76 | CGPROGRAM 77 | #pragma fragment frag_add_with_a 78 | ENDCG 79 | } 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Camera/TexBlend.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82af4e49f1eed9b4caa620ac3b5ad7f3 3 | timeCreated: 1470117080 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fefe9475d3338f94e9ae3d7b45f3f08d 3 | folderAsset: yes 4 | timeCreated: 1470054080 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/BoundsExtension.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using UnityEngine; 3 | 4 | namespace UnityUtil 5 | { 6 | public static class BoundsExtension 7 | { 8 | public static Vector3 InsideRandom(this Bounds me) 9 | { 10 | return new Vector3( 11 | Mathf.Lerp(me.min.x, me.max.x, Random.value), 12 | Mathf.Lerp(me.min.y, me.max.y, Random.value), 13 | Mathf.Lerp(me.min.z, me.max.z, Random.value) 14 | ); 15 | } 16 | 17 | public static Bounds Transform(this Bounds me, Transform transform) 18 | { 19 | var min = me.min; 20 | var max = me.max; 21 | 22 | var ret = new Bounds(transform.TransformPoint(me.center), Vector3.zero); 23 | 24 | new[] { 25 | min, 26 | new Vector3(min.x, min.y, max.z), 27 | new Vector3(min.x, max.y, min.z), 28 | new Vector3(min.x, max.y, max.z), 29 | new Vector3(max.x, min.y, min.z), 30 | new Vector3(max.x, min.y, max.z), 31 | new Vector3(max.x, max.y, min.z), 32 | max 33 | }.ToList().ForEach(localPos => 34 | { 35 | ret.Encapsulate(transform.TransformPoint(localPos)); 36 | }); 37 | 38 | return ret; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/BoundsExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a50654f5925fe5d44be7f45ea8947ea6 3 | timeCreated: 1470054085 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/Collision2DExtension.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using UnityEngine; 3 | 4 | namespace UnityUtil 5 | { 6 | 7 | public static class Collision2DExtension 8 | { 9 | 10 | public static Vector2 GetMeanNormal(this Collision2D a) 11 | { 12 | return a.contacts.Aggregate(Vector2.zero, (sum, point) => sum + point.normal).normalized; 13 | } 14 | 15 | } 16 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/Collision2DExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47bb414c78d94254ebfc59040ce8a3ed 3 | timeCreated: 1470054082 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/ColorExtension.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public static class ColorExtension 4 | { 5 | public static Vector3 ToHSV(this Color color) 6 | { 7 | var hsv = Vector3.zero; 8 | Color.RGBToHSV(color, out hsv.x, out hsv.y, out hsv.z); 9 | return hsv; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/ColorExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01c681739fdcd854a9863d2f3945b07c 3 | timeCreated: 1470054085 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/ComputeShaderExtension.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | public static class ComputeShaderExtension 6 | { 7 | public static void DispatchThreads(this ComputeShader cs, int kernelIndex, int threadNumX, int threadNumY, int threadNumZ) 8 | { 9 | cs.GetKernelThreadGroupSizes(kernelIndex, out var x, out var y, out var z); 10 | cs.Dispatch(kernelIndex, Mathf.CeilToInt((float)threadNumX / x), Mathf.CeilToInt((float)threadNumY / y), Mathf.CeilToInt((float)threadNumZ / z)); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/ComputeShaderExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0383469dbbbe1f4b89debbf6462ad06 3 | timeCreated: 1506593843 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/EnumExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace UnityUtil 6 | { 7 | public static class EnumExtension 8 | { 9 | public static List GetValues() => Enum.GetValues(typeof(T)).Cast().ToList(); 10 | } 11 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/EnumExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 642751729e0c5304ab8135da0e6c22ab 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/EnumerableExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics.CodeAnalysis; 4 | using System.Linq; 5 | using UnityEngine.Pool; 6 | using Random = UnityEngine.Random; 7 | 8 | namespace UnityUtil 9 | { 10 | 11 | public static class EnumerableExtension 12 | { 13 | [SuppressMessage("ReSharper", "PossibleMultipleEnumeration")] 14 | public static IEnumerable> Chunk(this IEnumerable source, int chunkSize) 15 | { 16 | while (source.Any()) 17 | { 18 | yield return source.Take(chunkSize); 19 | source = source.Skip(chunkSize); 20 | } 21 | } 22 | 23 | public static bool IsEmpty(this IEnumerable source) 24 | { 25 | if (source == null) 26 | return true; // or throw an exception 27 | return !source.Any(); 28 | } 29 | 30 | public static T SelectRandom(this IEnumerable source) 31 | { 32 | using var pool = ListPool.Get(out var list); 33 | list.AddRange(source); 34 | 35 | return list.ElementAt(Random.Range(0, list.Count())); 36 | } 37 | 38 | public static T SelectRandomWithWeight(List list, Func getWeight) 39 | { 40 | var total = list.Aggregate(0f, (s, data) => s + getWeight(data)); 41 | var cursor = Random.value * total; 42 | var ret = list.Find(data => 43 | { 44 | cursor -= getWeight(data); 45 | return cursor <= 0f; 46 | }); 47 | 48 | return ret; 49 | } 50 | 51 | public static TSource MinBy(this IEnumerable source, Func selector, IComparer comparer = null) 52 | { 53 | if (source == null) throw new ArgumentNullException(nameof(source)); 54 | if (selector == null) throw new ArgumentNullException(nameof(selector)); 55 | comparer ??= Comparer.Default; 56 | 57 | using var sourceIterator = source.GetEnumerator(); 58 | 59 | if (!sourceIterator.MoveNext()) 60 | { 61 | throw new InvalidOperationException("Sequence contains no elements"); 62 | } 63 | var min = sourceIterator.Current; 64 | var minKey = selector(min); 65 | while (sourceIterator.MoveNext()) 66 | { 67 | var candidate = sourceIterator.Current; 68 | var candidateProjected = selector(candidate); 69 | if (comparer.Compare(candidateProjected, minKey) < 0) 70 | { 71 | min = candidate; 72 | minKey = candidateProjected; 73 | } 74 | } 75 | return min; 76 | } 77 | 78 | public static TSource MaxBy(this IEnumerable source, Func selector, IComparer comparer = null) 79 | { 80 | if (source == null) throw new ArgumentNullException(nameof(source)); 81 | if (selector == null) throw new ArgumentNullException(nameof(selector)); 82 | comparer ??= Comparer.Default; 83 | 84 | using var sourceIterator = source.GetEnumerator(); 85 | 86 | if (!sourceIterator.MoveNext()) 87 | { 88 | throw new InvalidOperationException("Sequence contains no elements"); 89 | } 90 | var max = sourceIterator.Current; 91 | var maxKey = selector(max); 92 | while (sourceIterator.MoveNext()) 93 | { 94 | var candidate = sourceIterator.Current; 95 | var candidateProjected = selector(candidate); 96 | if (comparer.Compare(candidateProjected, maxKey) > 0) 97 | { 98 | max = candidate; 99 | maxKey = candidateProjected; 100 | } 101 | } 102 | return max; 103 | } 104 | } 105 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/EnumerableExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08cb45cdcc8cbdb4c9c80a05b73f8a47 3 | timeCreated: 1470054082 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/GameObjectExtension.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEngine; 4 | 5 | namespace UnityUtil 6 | { 7 | public static class GameObjectExtension 8 | { 9 | public static T GetOrAddComponent(this GameObject go) where T : Component 10 | { 11 | if (!go.TryGetComponent(out var co)) 12 | { 13 | co = go.AddComponent(); 14 | } 15 | 16 | return co; 17 | } 18 | 19 | public static IEnumerable GetChildren(this GameObject gameObject) 20 | => gameObject.transform.GetChildren().Select(trans => trans.gameObject); 21 | 22 | public static IEnumerable GetDescendants(this GameObject gameObject) 23 | => gameObject.transform.GetDescendants().Select(trans => trans.gameObject); 24 | } 25 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/GameObjectExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f5de2568964cd5438b7565141ad1204 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/MaterialPropertyBlockExtension.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace UnityUtil 5 | { 6 | public static class MaterialPropertyBlockExtension 7 | { 8 | public static void Set(this MaterialPropertyBlock mpb, int propertyId, T value) 9 | { 10 | switch (value) 11 | { 12 | case float v: mpb.SetFloat(propertyId, v); break; 13 | case int v: mpb.SetInteger(propertyId, v); break; 14 | case Vector4 v: mpb.SetVector(propertyId, v); break; 15 | case Color v: mpb.SetColor(propertyId, v); break; 16 | case Matrix4x4 v: mpb.SetMatrix(propertyId, v); break; 17 | case ComputeBuffer v: mpb.SetBuffer(propertyId, v); break; 18 | case GraphicsBuffer v: mpb.SetBuffer(propertyId, v); break; 19 | case Texture v: mpb.SetTexture(propertyId, v); break; 20 | case List v: mpb.SetFloatArray(propertyId, v); break; 21 | case List v: mpb.SetVectorArray(propertyId, v); break; 22 | case List v: mpb.SetMatrixArray(propertyId, v); break; 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/MaterialPropertyBlockExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 503abb0cb1d7a864fb439355836234c7 3 | timeCreated: 1470054085 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/MonoBehaviorExtension.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | 6 | static public class MonoBehaviourExtension 7 | { 8 | public static GameObject InstantiateChild(this MonoBehaviour mono, Object original) 9 | { 10 | return mono.InstantiateChild(original, Vector3.zero, Quaternion.identity); 11 | } 12 | 13 | public static GameObject InstantiateChild(this MonoBehaviour me, Object original, Vector3 pos, Quaternion rot) 14 | { 15 | var go = Object.Instantiate(original, pos, rot) as GameObject; 16 | if (go) go.transform.SetParent(me.transform); 17 | return go; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/MonoBehaviorExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87daf27025f2def468349fc67ba4748a 3 | timeCreated: 1470054085 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/RectExtension.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | public static class RectExtension 6 | { 7 | public static void Encapsulate(ref this Rect rect, Rect other) 8 | { 9 | var min = rect.min; 10 | var max = rect.max; 11 | 12 | var minOther = other.min; 13 | var maxOther = other.max; 14 | 15 | min.x = Mathf.Min(min.x, minOther.x); 16 | min.y = Mathf.Min(min.y, minOther.y); 17 | 18 | max.x = Mathf.Max(max.x, maxOther.x); 19 | max.y = Mathf.Max(max.y, maxOther.y); 20 | 21 | rect.min = min; 22 | rect.max = max; 23 | } 24 | 25 | public static void ExtendX(ref this Rect rect, float minX, float maxX) 26 | { 27 | rect.xMin = Mathf.Min(rect.xMin, minX); 28 | rect.xMax = Mathf.Max(rect.xMax, maxX); 29 | } 30 | 31 | public static void ExtendY(ref this Rect rect, float minY, float maxY) 32 | { 33 | rect.yMin = Mathf.Min(rect.yMin, minY); 34 | rect.yMax = Mathf.Max(rect.yMax, maxY); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/RectExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ca2a04ad4229334a8b65ca1c35ad534 3 | timeCreated: 1470054085 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/TransformExtension.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEngine; 4 | 5 | namespace UnityUtil 6 | { 7 | 8 | public static class TransformExtension 9 | { 10 | public static IEnumerable GetComponentsAll(this Transform trans) where T : Component 11 | => trans.GetComponents() 12 | .Concat( 13 | trans.GetChildren().SelectMany(GetComponentsAll) 14 | ); 15 | 16 | public static IEnumerable GetChildren(this Transform trans) 17 | { 18 | var num = trans.childCount; 19 | for (var i = 0; i < num; ++i) 20 | { 21 | yield return trans.GetChild(i); 22 | } 23 | } 24 | 25 | public static IEnumerable GetDescendants(this Transform transform) 26 | { 27 | foreach (Transform trans in transform) 28 | { 29 | yield return trans; 30 | foreach (var t in GetDescendants(trans)) 31 | { 32 | yield return t; 33 | } 34 | } 35 | } 36 | 37 | public static void Reset(this Transform trans) 38 | { 39 | trans.position = Vector3.zero; 40 | trans.rotation = Quaternion.identity; 41 | trans.localScale = Vector3.one; 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/TransformExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc596dd50babf4149950953bcfedf7c5 3 | timeCreated: 1470054088 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/VectorExtension.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | public static class VectorExtension 6 | { 7 | public static Vector3 Abs(this Vector3 v) 8 | { 9 | return new Vector3( 10 | Mathf.Abs(v.x), 11 | Mathf.Abs(v.y), 12 | Mathf.Abs(v.z) 13 | ); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Extension/VectorExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9898b5ca5535b614d8183b867a8e9262 3 | timeCreated: 1470054088 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Geometry.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9383b32846492074fa8e49de4024da0c 3 | folderAsset: yes 4 | timeCreated: 1473676743 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Geometry/LineSegment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | 5 | namespace UnityUtil 6 | { 7 | [Serializable] 8 | public struct LineSegment 9 | { 10 | public static LineSegment Create(Vector2 start, Vector2 end) => new LineSegment() { start = start, end = end }; 11 | 12 | 13 | public Vector2 start; 14 | public Vector2 end; 15 | 16 | 17 | public override string ToString() 18 | { 19 | return $"({start},{end})"; 20 | } 21 | 22 | public float ClosestPointRate(Vector2 pos) 23 | { 24 | var ab = end - start; 25 | var r2 = Vector2.Dot(ab, ab); 26 | var tt = -Vector2.Dot(ab, start - pos); 27 | return Mathf.Clamp01(tt / r2); 28 | } 29 | 30 | // p = (at+x1, bt+y1) 31 | // https://zenn.dev/boiledorange73/articles/0037-js-distance-pt-seg 32 | public Vector2 ClosestPoint(Vector2 pos) 33 | { 34 | var ab = end - start; 35 | return ab * ClosestPointRate(pos) + start; 36 | } 37 | 38 | 39 | public float Distance(Vector2 pos) => Vector2.Distance(ClosestPoint(pos), pos); 40 | 41 | 42 | public Vector2 CalcNormal(Vector2 pos) 43 | { 44 | var toEndDir = (end - start).normalized; 45 | var toPos = pos - start; 46 | return (toPos - Vector2.Dot(toPos, toEndDir) * toEndDir).normalized; 47 | } 48 | 49 | public bool IsLeft(Vector2 pos) 50 | { 51 | var toEnd = end - start; 52 | var toPos = pos - start; 53 | 54 | return Vector3.Cross(toEnd, toPos).z > 0f; 55 | } 56 | 57 | //交点を求める 58 | //https://www.hiramine.com/programming/graphics/2d_segmentintersection.html 59 | //https://gist.github.com/yoshiki/7702066 60 | public static Vector2? CalcIntersection(LineSegment lhs, LineSegment rhs) 61 | { 62 | var a = lhs.start; 63 | var b = lhs.end; 64 | var c = rhs.start; 65 | var d = rhs.end; 66 | 67 | var div = (b.x - a.x) * (d.y - c.y) - (b.y - a.y) * (d.x - c.x); 68 | if (div == 0f) return null; 69 | 70 | var ac = c - a; 71 | var u = ((d.y - c.y) * ac.x - (d.x - c.x) * ac.y) / div; 72 | var s = ((b.y - a.y) * ac.x - (b.x - a.x) * ac.y) / div; 73 | 74 | if (u < 0f || 1f < u) return null; 75 | if (s < 0f || 1f < s) return null; 76 | 77 | return a + u * (b - a); 78 | } 79 | } 80 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Geometry/LineSegment.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0249af7a5d956ca49a11a30b4d739f91 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Geometry/LineSegment.hlsl: -------------------------------------------------------------------------------- 1 | #ifndef LINE_SEGMENT_HLSL 2 | #define LINE_SEGMENT_HLSL 3 | 4 | struct LineSegment 5 | { 6 | float2 start; 7 | float2 end; 8 | }; 9 | 10 | 11 | bool IsLeft(float2 pos, LineSegment ls) 12 | { 13 | float2 start = ls.start; 14 | float2 end = ls.end; 15 | 16 | float2 toEnd = end - start; 17 | float2 toPos = pos - start; 18 | 19 | return cross(float3(toEnd,0), float3(toPos,0)).z > 0; 20 | } 21 | 22 | bool IsRight(float2 pos, LineSegment ls) 23 | { 24 | float2 start = ls.start; 25 | float2 end = ls.end; 26 | 27 | float2 toEnd = end - start; 28 | float2 toPos = pos - start; 29 | 30 | return cross(float3(toEnd,0), float3(toPos,0)).z < 0; 31 | } 32 | 33 | // 点との距離の二乗 34 | // https://zenn.dev/boiledorange73/articles/0037-js-distance-pt-seg 35 | float LineDistanceSq(float2 pos, LineSegment ls) 36 | { 37 | float2 start = ls.start; 38 | float2 end = ls.end; 39 | 40 | float2 posToStart = start - pos; 41 | 42 | float2 ab = end - start; 43 | float r2 = dot(ab, ab); 44 | float tt = -dot(ab, posToStart); 45 | if (tt < 0) 46 | { 47 | return dot(posToStart, posToStart); 48 | } 49 | 50 | if (tt > r2) 51 | { 52 | float2 posToEnd = end - pos; 53 | return dot(posToEnd, posToEnd); 54 | } 55 | 56 | float f1 = ab.x * posToStart.y - ab.y * posToStart.x; 57 | return (f1 * f1) / r2; 58 | } 59 | 60 | float LineDistance(float2 pos, LineSegment ls) 61 | { 62 | return sqrt(LineDistanceSq(pos, ls)); 63 | } 64 | 65 | float LineClosestPointRate(float2 pos, LineSegment ls) 66 | { 67 | float2 start = ls.start; 68 | float2 end = ls.end; 69 | 70 | float2 posToStart = start - pos; 71 | 72 | float2 ab = end - start; 73 | float r2 = dot(ab, ab); 74 | float tt = -dot(ab, posToStart); 75 | 76 | return saturate(tt/r2); 77 | } 78 | 79 | inline float2 CalcPointOnLineFromRate(LineSegment ls, float rateOnSegment) 80 | { 81 | return lerp(ls.start, ls.end, rateOnSegment); 82 | } 83 | 84 | float2 LineClosestPoint(float2 pos, LineSegment ls) 85 | { 86 | float rate = LineClosestPointRate(pos, ls); 87 | return CalcPointOnLineFromRate(ls, rate); 88 | } 89 | 90 | float2 GetNormal(LineSegment ls) 91 | { 92 | float2 dir = ls.end - ls.start; 93 | float2 lineNormal = float2( -dir.y, dir.x); // rotate 90 degree 94 | return normalize(lineNormal); 95 | } 96 | 97 | 98 | //交点を求める 99 | //https://www.hiramine.com/programming/graphics/2d_segmentintersection.html 100 | //https://gist.github.com/yoshiki/7702066 101 | bool CalcIntersection(LineSegment lhs, LineSegment rhs, out float2 hitPosition) 102 | { 103 | hitPosition = (0).xx; 104 | 105 | float2 a = lhs.start; 106 | float2 b = lhs.end; 107 | float2 c = rhs.start; 108 | float2 d = rhs.end; 109 | 110 | float div = (b.x - a.x) * (d.y - c.y) - (b.y - a.y) * (d.x - c.x); 111 | 112 | float2 ac = c - a; 113 | float u = ((d.y - c.y) * ac.x - (d.x - c.x) * ac.y) / div; 114 | float s = ((b.y - a.y) * ac.x - (b.x - a.x) * ac.y) / div; 115 | 116 | if (!isfinite(u) || u < 0.0 || 1.0 < u) return false; 117 | if (!isfinite(u) || s < 0.0 || 1.0 < s) return false; 118 | 119 | hitPosition = a + u * (b - a); 120 | return true; 121 | } 122 | 123 | #endif // LINE_SEGMENT_HLSL -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Geometry/LineSegment.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 299d7ca5403c7754b88dd8fe8b715d77 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Geometry/Primitive2D.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace UnityUtil 6 | { 7 | namespace Primitive2D 8 | { 9 | public static class Primitive2DDebug 10 | { 11 | public static void Draw(Primitive2DBase pb, Color col = default(Color)) 12 | { 13 | var points = pb.GetPoints(); 14 | for (var i = 0; i < points.Length - 1; ++i) 15 | { 16 | Debug.DrawLine(points[i], points[i + 1], col); 17 | } 18 | } 19 | } 20 | 21 | public abstract class Primitive2DBase 22 | { 23 | public Vector2 Scale { get; } 24 | 25 | public Vector2 Center { get; } 26 | 27 | List _points; 28 | 29 | protected Primitive2DBase(Vector2 scale, Vector2 center) 30 | { 31 | Scale = scale; 32 | Center = center; 33 | } 34 | 35 | protected abstract IEnumerable CalcPoints(); 36 | 37 | public Vector2[] GetPoints(bool loop = true) 38 | { 39 | if (null == _points) 40 | { 41 | _points = CalcPoints().ToList(); 42 | if (loop) _points.Add(_points[0]); 43 | } 44 | return _points.ToArray(); 45 | } 46 | } 47 | 48 | public class Circle : Primitive2DBase 49 | { 50 | public int PointNum { get; } 51 | 52 | public Circle(float radius, int pointNum, Vector2 center = default) 53 | : this(Vector2.one * radius, pointNum, center) 54 | { 55 | } 56 | 57 | public Circle(Vector2 scale, int pointNum, Vector2 center = default) 58 | : base(scale, center) 59 | { 60 | PointNum = pointNum; 61 | } 62 | 63 | protected override IEnumerable CalcPoints() 64 | { 65 | var radDelta = Mathf.PI * 2f / PointNum; 66 | for (var i = 0; i < PointNum; ++i) 67 | { 68 | var rad = radDelta * i; 69 | yield return new Vector2( 70 | Mathf.Cos(rad) * Scale.x, 71 | Mathf.Sin(rad) * Scale.y 72 | ) 73 | + Center; 74 | } 75 | } 76 | } 77 | } 78 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Geometry/Primitive2D.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62edfc2164a23284cb1a3769efd6b675 3 | timeCreated: 1470054085 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 923001680749ab1449e586ccee23a4b4 3 | folderAsset: yes 4 | timeCreated: 1473675762 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/AudioSourceOnEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | 6 | public class AudioSourceOnEditor : MonoBehaviour 7 | { 8 | #if UNITY_EDITOR 9 | public AudioClip clip; 10 | public bool loop; 11 | 12 | private void Start() 13 | { 14 | if ( clip != null) 15 | { 16 | var src = gameObject.AddComponent(); 17 | src.clip = clip; 18 | src.Play(); 19 | src.loop = loop; 20 | } 21 | } 22 | #endif 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/AudioSourceOnEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 938ddac93bf90004a9ad6567cba7c733 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/Easing.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7c85e9e6c41d05498941b3272404eee 3 | timeCreated: 1470054086 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/KeepTimeFlag.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityUtil 4 | { 5 | 6 | [Serializable] 7 | public class KeepTimeFlag 8 | { 9 | public float switchTime; 10 | bool _flag = false; 11 | float? _startTime; 12 | 13 | public KeepTimeFlag(float switchTime = 5f) { this.switchTime = switchTime; } 14 | 15 | public float? Time => UnityEngine.Time.time - _startTime; 16 | 17 | public void Set(bool f) 18 | { 19 | if (f) 20 | { 21 | _startTime ??= UnityEngine.Time.time; 22 | if (Time >= switchTime) 23 | { 24 | _flag = true; 25 | } 26 | } 27 | else { 28 | _flag = false; 29 | _startTime = null; 30 | } 31 | } 32 | 33 | public bool Get() => _flag; 34 | 35 | public void Clear() => Set(false); 36 | 37 | public bool Check(float offset = 0f) 38 | { 39 | Set(true); 40 | return offset == 0f ? Get() : Time >= (switchTime + offset); 41 | } 42 | public void Reset() { Set(false); Set(true); } 43 | 44 | public void Reset(float newSwitchTime) 45 | { 46 | switchTime = newSwitchTime; 47 | Reset(); 48 | } 49 | 50 | public static implicit operator bool(KeepTimeFlag x) => x.Get(); 51 | 52 | public bool raw => _startTime.HasValue; 53 | 54 | // あとremain秒でTrueになるように強制 55 | public void SetRemain(float remain) 56 | { 57 | // Time.time+remain - startTime > switchTime 58 | // より Time.time+remain - switchTime > startTime 59 | _startTime = UnityEngine.Time.time + remain - switchTime; ; 60 | } 61 | 62 | public void ForceTrue() { SetRemain(0f); } 63 | } 64 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/KeepTimeFlag.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac1ce100700edbb4ebf1e8ed58a1ce3d 3 | timeCreated: 1473676140 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/OverrideSingletonMonoBehaviour.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEngine; 4 | 5 | namespace UnityUtil 6 | { 7 | /// 8 | /// 複数のインスタンスを共用するが、クラス外には最もpriorityの高いインスタンスとして振る舞う 9 | /// デフォルトパラメータを起きつつ、特定の状態では別のパラメータにしたいときなどに使う 10 | /// 11 | public class OverrideSingletonMonoBehaviour : MonoBehaviour 12 | where T : OverrideSingletonMonoBehaviour 13 | { 14 | #region Static 15 | 16 | protected static readonly List Instances = new(); 17 | public static T Instance => GetSortedList(Instances.First()).First(); 18 | 19 | private static IEnumerable GetSortedList(T sample) 20 | { 21 | Instances.RemoveAll(ins => ins == null); 22 | return Instances.Where(sample.IsKeyEqual).OrderByDescending(ins => ins.priority); 23 | } 24 | 25 | static void Add(T instance) 26 | { 27 | ClearAllInstanceList(); 28 | Instances.Add(instance); 29 | } 30 | 31 | static void Remove(T instance) 32 | { 33 | if (Instances.Remove(instance)) 34 | { 35 | ClearAllInstanceList(); 36 | } 37 | } 38 | 39 | 40 | static void ClearAllInstanceList() 41 | { 42 | foreach (var ins in Instances) ins.ClearList(); 43 | } 44 | 45 | #endregion 46 | 47 | 48 | public int priority; 49 | 50 | private List _sortedList; 51 | protected List SortedList => _sortedList ??= GetSortedList((T)this).ToList(); 52 | 53 | // 同じT内でも種類を分けたいときに指定 54 | protected virtual bool IsKeyEqual(T other) => true; 55 | protected virtual string Label => name; 56 | 57 | protected bool IsTop => SortedList.First() == this; 58 | 59 | 60 | protected virtual void Awake() => Add((T)this); 61 | 62 | protected virtual void OnDestroy() => Remove((T)this); 63 | 64 | protected void ClearList() => _sortedList = null; 65 | 66 | protected int currentIdx; 67 | 68 | protected T GetCurrent() 69 | { 70 | return SortedList.ElementAt(Mathf.Min(currentIdx, SortedList.Count - 1)); 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/OverrideSingletonMonoBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60b6fc2cb5aa65a4394efa8a5cc030b9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/Rational.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityUtil 4 | { 5 | /// 6 | /// https://gist.github.com/maraigue/739403 7 | /// 8 | [Serializable] 9 | public struct Rational 10 | { 11 | public int numerator; 12 | public int denominator; 13 | 14 | // コンストラクタ 15 | public Rational(int intValue) : this(intValue, 1) { } 16 | public Rational(int newNumerator, int newDenominator) 17 | { 18 | numerator = newNumerator; 19 | denominator = newDenominator; 20 | } 21 | 22 | // ---------- 補助関数 ---------- 23 | 24 | // 最大公約数 25 | public static int Gcd(int v1, int v2) 26 | { 27 | int tmp; 28 | 29 | // どちらかが0だったら即座に終了 30 | if (v1 == 0 || v2 == 0) return 0; 31 | 32 | // 正の値にしておく 33 | if (v1 < 0) v1 = -v1; 34 | if (v2 < 0) v2 = -v2; 35 | 36 | // v1の方を大きくしておく 37 | if (v2 > v1) 38 | { 39 | tmp = v1; v1 = v2; v2 = tmp; 40 | } 41 | 42 | for (;;) 43 | { 44 | tmp = v1 % v2; 45 | if (tmp == 0) return v2; 46 | 47 | v1 = v2; v2 = tmp; 48 | } 49 | } 50 | 51 | // 通分する 52 | private void _fix_denominator(Rational other) 53 | { 54 | int tmp = denominator; 55 | numerator *= other.denominator; 56 | denominator *= other.denominator; 57 | 58 | other.numerator *= tmp; 59 | other.denominator *= tmp; 60 | } 61 | 62 | // 正規化 63 | // ●分子・分母を約分する 64 | // ●負の符号が分母についている場合、分子にのみつけるようにする 65 | // ●値が0である場合は「0/1」にする 66 | private void _regularize() 67 | { 68 | int divisor = Math.Sign(denominator) * Gcd(numerator, denominator); 69 | if (divisor == 0) 70 | { 71 | // 分子が0の場合 72 | numerator = 0; 73 | denominator = 1; 74 | } 75 | else 76 | { 77 | numerator /= divisor; 78 | denominator /= divisor; 79 | } 80 | } 81 | 82 | // ---------- 比較 ---------- 83 | 84 | public static bool operator ==(Rational r1, Rational r2) 85 | { 86 | r1._regularize(); 87 | r2._regularize(); 88 | return (r1.numerator == r2.numerator && r1.denominator == r2.denominator); 89 | } 90 | 91 | public static bool operator !=(Rational r1, Rational r2) 92 | { 93 | return !(r1 == r2); 94 | } 95 | 96 | public static bool operator <(Rational r1, Rational r2) 97 | { 98 | r1._fix_denominator(r2); 99 | return (r1.numerator < r2.numerator); 100 | } 101 | 102 | public static bool operator >(Rational r1, Rational r2) 103 | { 104 | return (r2 < r1); 105 | } 106 | 107 | // 以下、他の関数やクラスに使ってもらう際の補助関数 108 | public override bool Equals(object obj) 109 | { 110 | if (obj.GetType() == this.GetType()) 111 | { 112 | return (this == (Rational)obj); 113 | } 114 | 115 | return false; 116 | } 117 | 118 | public override int GetHashCode() 119 | { 120 | return (numerator | (denominator << 16)); 121 | } 122 | 123 | // ---------- 型変換 ---------- 124 | 125 | public static implicit operator double(Rational r) 126 | { 127 | return (double)r.numerator / (double)r.denominator; 128 | } 129 | 130 | public static implicit operator float(Rational r) 131 | { 132 | return (float)r.numerator / (float)r.denominator; 133 | } 134 | 135 | public static implicit operator Rational(int i) 136 | { 137 | return new Rational(i); 138 | } 139 | 140 | // ---------- 加減乗除 ---------- 141 | 142 | public static Rational operator +(Rational r) // 単項演算子 143 | { 144 | // 単に自分のコピーを作ればよい 145 | return new Rational(r.numerator, r.denominator); 146 | } 147 | 148 | public static Rational operator -(Rational r) // 単項演算子 149 | { 150 | return new Rational(-r.numerator, r.denominator); 151 | } 152 | 153 | public static Rational operator +(Rational r1, Rational r2) // 二項演算子 154 | { 155 | r1._fix_denominator(r2); 156 | return new Rational(r1.numerator + r2.numerator, r1.denominator); 157 | } 158 | 159 | public static Rational operator -(Rational r1, Rational r2) // 二項演算子 160 | { 161 | r1._fix_denominator(r2); 162 | return new Rational(r1.numerator - r2.numerator, r1.denominator); 163 | } 164 | 165 | public static Rational operator *(Rational r1, Rational r2) 166 | { 167 | return new Rational(r1.numerator * r2.numerator, r1.denominator * r2.denominator); 168 | } 169 | 170 | public static Rational operator /(Rational r1, Rational r2) 171 | { 172 | if (r2.numerator == 0) 173 | { 174 | throw new DivideByZeroException(); 175 | } 176 | return new Rational(r1.numerator * r2.denominator, r1.denominator * r2.numerator); 177 | } 178 | 179 | // ユーティリティ 180 | public override string ToString() 181 | { 182 | _regularize(); 183 | if (denominator == 1) return numerator.ToString(); 184 | 185 | return string.Format("({0}/{1})", numerator, denominator); 186 | } 187 | } 188 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/Rational.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d0de5b2251b4f547a555c0f3d60e3b0 3 | timeCreated: 1493624456 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/SingletonMonoBehaviour.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | public class SingletonMonoBehaviour : MonoBehaviour where T : MonoBehaviour 6 | { 7 | private static T _instance; 8 | 9 | // ReSharper disable once StaticMemberInGenericType 10 | private static bool _first = true; 11 | 12 | public static T Instance 13 | { 14 | get 15 | { 16 | if (_instance == null) 17 | { 18 | _instance = (T)FindObjectOfType(typeof(T)); 19 | 20 | if (_instance == null) 21 | { 22 | Debug.LogError($"{typeof(T)} is nothing"); 23 | } 24 | } 25 | 26 | return _instance; 27 | } 28 | } 29 | 30 | public static T GetInstance() 31 | { 32 | if (_first && _instance == null) 33 | { 34 | _first = false; 35 | _instance = (T)FindObjectOfType(typeof(T)); 36 | 37 | return _instance; 38 | } 39 | return _instance; 40 | } 41 | 42 | public static void ResetStaticFields() 43 | { 44 | _instance = null; 45 | _first = true; 46 | } 47 | 48 | protected virtual void OnDestroy() 49 | { 50 | if (_instance == this) 51 | { 52 | ResetStaticFields(); 53 | } 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/SingletonMonoBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4bbe323e1da61744cb3acd0b8cac665f 3 | timeCreated: 1470054084 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/StateMachine.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace UnityUtil 6 | { 7 | 8 | public interface IStateMachine 9 | { 10 | void Update(); 11 | void LateUpdate(); 12 | void FixedUpdate(); 13 | 14 | void OnCollisionEnter2D(Collision2D coll); 15 | void OnCollisionStay2D(Collision2D coll); 16 | void OnCollisionExit2D(Collision2D coll); 17 | 18 | string CurrentName { get; } 19 | } 20 | 21 | public class StateMachine : IStateMachine 22 | where TKey : struct, IConvertible 23 | where TState : StateBase 24 | { 25 | public readonly Dictionary states = new(); 26 | TKey? _currentKey; 27 | TKey? _prevKey; 28 | 29 | public TKey CurrentKey => _currentKey ?? throw new ArgumentNullException(nameof(_currentKey)); 30 | public TKey PrevKey => _prevKey ?? throw new ArgumentNullException(nameof(_prevKey)); 31 | 32 | public string CurrentName => CurrentKey.ToString(); 33 | 34 | public void Add(TKey key, TState state) 35 | { 36 | states.Add(key, state); 37 | if (_currentKey == null) 38 | { 39 | _currentKey = key; 40 | Current.Enter(); 41 | } 42 | } 43 | 44 | public void Change(TKey key) 45 | { 46 | Current.Exit(); 47 | _prevKey = _currentKey; 48 | _currentKey = key; 49 | OnChange(); 50 | Current.Enter(); 51 | } 52 | 53 | public bool Has(TKey key) => states.ContainsKey(key); 54 | 55 | protected virtual void OnChange() { } 56 | 57 | protected TState Current { get { return states[_currentKey.Value]; } } 58 | protected TState Prev { get { return states[PrevKey]; } } 59 | 60 | public void Update() { Current.Update(); } 61 | public void LateUpdate() { Current.LateUpdate(); } 62 | public void FixedUpdate() { Current.FixedUpdate(); } 63 | 64 | public void OnCollisionEnter2D(Collision2D coll) { Current.OnCollisionEnter2D(coll); } 65 | public void OnCollisionStay2D(Collision2D coll) { Current.OnCollisionStay2D(coll); } 66 | public void OnCollisionExit2D(Collision2D coll) { Current.OnCollisionExit2D(coll); } 67 | 68 | public void OnTriggerEnter2D(Collider2D col) { Current.OnTriggerEnter2D(col); } 69 | public void OnTriggerStay2D(Collider2D col) { Current.OnTriggerStay2D(col); } 70 | public void OnTriggerExit2D(Collider2D col) { Current.OnTriggerExit2D(col); } 71 | } 72 | 73 | public abstract class StateBase 74 | { 75 | public virtual void Enter() { } 76 | public virtual void Exit() { } 77 | public virtual void Update() { } 78 | public virtual void LateUpdate() { } 79 | public virtual void FixedUpdate() { } 80 | 81 | public virtual void OnCollisionEnter2D(Collision2D coll) { } 82 | public virtual void OnCollisionStay2D(Collision2D coll) { } 83 | public virtual void OnCollisionExit2D(Collision2D coll) { } 84 | 85 | public virtual void OnTriggerEnter2D(Collider2D col) { } 86 | public virtual void OnTriggerStay2D(Collider2D col) { } 87 | public virtual void OnTriggerExit2D(Collider2D col) { } 88 | } 89 | 90 | public abstract class StateWithMonoBehaviour : StateBase 91 | where T : MonoBehaviour 92 | { 93 | protected T script; 94 | protected GameObject GameObject => script.gameObject; 95 | protected Transform Transform => script.transform; 96 | 97 | 98 | public StateWithMonoBehaviour Init(T monoBehaviourScript) 99 | { 100 | script = monoBehaviourScript; 101 | return this; 102 | } 103 | } 104 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Logic/StateMachine.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f41b82a01df7e13419de0dbde44ba247 3 | timeCreated: 1470054085 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Random.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00f5dc28ebfd2c6419d0d349eb5c3556 3 | folderAsset: yes 4 | timeCreated: 1470054080 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Random/CustomRandom.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | // ReSharper disable InconsistentNaming 3 | 4 | namespace UnityUtil 5 | { 6 | /// 7 | /// UnityEngine.Random like random for instance 8 | /// 9 | public class CustomRandom 10 | { 11 | readonly System.Func _randFunc; 12 | 13 | public CustomRandom() 14 | { 15 | var rand = new System.Random(); // warn: not include 1.0. UnityEngine.Random.value includes 1.0 16 | _randFunc = () => (float)rand.NextDouble(); 17 | } 18 | 19 | public CustomRandom(int seed) 20 | { 21 | var rand = new System.Random(seed); // warn: not include 1.0. UnityEngine.Random.value includes 1.0 22 | _randFunc = () => (float)rand.NextDouble(); 23 | } 24 | 25 | public CustomRandom(System.Func randFunc) => _randFunc = randFunc; 26 | 27 | 28 | #region UnityEngine.Random like 29 | 30 | public Quaternion rotation => Quaternion.Euler(value * 360f, value * 360f, value * 360f); 31 | 32 | public Vector3 onUnitSphere 33 | { 34 | get 35 | { 36 | Vector3 ret; 37 | do 38 | { 39 | ret = (vector3 - Vector3.one * 0.5f).normalized; 40 | } while (ret.sqrMagnitude == 0f); 41 | return ret; 42 | } 43 | } 44 | 45 | public Vector2 insideUnitCircle 46 | { 47 | get 48 | { 49 | Vector2 ret; 50 | do 51 | { 52 | ret = (vector2 - Vector2.one * 0.5f) * 2f; 53 | } while (ret.sqrMagnitude > 1f); 54 | 55 | return ret; 56 | } 57 | } 58 | 59 | public Vector3 insideUnitSphere 60 | { 61 | get 62 | { 63 | Vector3 ret; 64 | do 65 | { 66 | ret = (vector3 - Vector3.one * 0.5f) * 2f; 67 | } while (ret.sqrMagnitude > 1f); 68 | 69 | return ret; 70 | } 71 | } 72 | 73 | public float value => _randFunc(); 74 | 75 | public float Range(float min, float max) { return Mathf.Lerp(min, max, value); } 76 | 77 | public int Range(int min, int max) { return Mathf.FloorToInt((max - min) * value * (1f - float.Epsilon)) + min; } 78 | 79 | #endregion 80 | 81 | 82 | #region Extra Methods 83 | 84 | public int RandInt() 85 | { 86 | return Mathf.FloorToInt(value * int.MaxValue); 87 | } 88 | 89 | public Vector2 vector2 => new(value, value); 90 | 91 | public Vector3 vector3 => new(value, value, value); 92 | 93 | #endregion 94 | } 95 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Random/CustomRandom.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca924abd65847cc4b883bf42816beafe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Random/Rand.cs: -------------------------------------------------------------------------------- 1 | namespace UnityUtil 2 | { 3 | [System.Serializable] 4 | public class RandFloat : Rand 5 | { 6 | public RandFloat() : this(0f, 0f) { } 7 | public RandFloat(float min, float max) : base(min, max) { } 8 | protected override float _rand(float minInclusive, float maxInclusive) { return UnityEngine.Random.Range(minInclusive, maxInclusive); } 9 | } 10 | 11 | [System.Serializable] 12 | public class RandInt : Rand 13 | { 14 | public RandInt() : this(0, 0) { } 15 | public RandInt(int min, int max) : base(min, max) { } 16 | protected override int _rand(int minInclusive, int maxExclusive) => UnityEngine.Random.Range(minInclusive, maxExclusive + 1); 17 | } 18 | 19 | public abstract class Rand where T : struct 20 | { 21 | public T min; 22 | public T max; 23 | T? _value; 24 | 25 | public T Value => _value ?? Calc(); 26 | 27 | 28 | protected Rand(T min, T max) { this.min = min; this.max = max; } 29 | 30 | public T Calc() 31 | { 32 | _value = _rand(min, max); 33 | return _value.Value; 34 | } 35 | 36 | protected abstract T _rand(T minInclusive, T maxInclusive); 37 | } 38 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Random/Rand.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a6ff48859879ec45977ac21b3286044 3 | timeCreated: 1470054088 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Random/RandomForMaterialPropertyBlock.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82af46e2f1b9e0441be754261ffa7020 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Random/RandomForMaterialPropertyBlock/RandomForMaterialProperty.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityEngine.Serialization; 4 | 5 | namespace UnityUtil 6 | { 7 | 8 | public class RandomForMaterialProperty : MaterialPropertySetter 9 | { 10 | [FormerlySerializedAs("_values")] public List values; 11 | protected override T GetValue() 12 | { 13 | return values.SelectRandom(); 14 | } 15 | } 16 | 17 | public abstract class MaterialPropertySetter : MonoBehaviour 18 | { 19 | [FormerlySerializedAs("_name")] public string propertyName; 20 | protected abstract T GetValue(); 21 | 22 | void Start() 23 | { 24 | var v = GetValue(); 25 | 26 | var mpb = new MaterialPropertyBlock(); 27 | foreach(var r in transform.GetComponentsAll()) 28 | { 29 | r.GetPropertyBlock(mpb); 30 | mpb.Set(Shader.PropertyToID(propertyName), v); 31 | r.SetPropertyBlock(mpb); 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Random/RandomForMaterialPropertyBlock/RandomForMaterialProperty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 773353f1f9291ad45b9c4db1bcb6e9bb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Random/RandomForMaterialPropertyBlock/RandomHSVForMaterialProperty.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Serialization; 4 | using Random = UnityEngine.Random; 5 | 6 | namespace UnityUtil 7 | { 8 | [Obsolete("Please use " + nameof(RandomHSVForMaterialPropertyBlock) + " instead.")] 9 | public class RandomHSV{} 10 | 11 | public class RandomHSVForMaterialPropertyBlock : MaterialPropertySetter 12 | { 13 | [FormerlySerializedAs("_min")] public Color min; 14 | [FormerlySerializedAs("_max")] public Color max; 15 | 16 | [FormerlySerializedAs("_easingH")] public EasingType easingH; 17 | 18 | protected virtual float Rand() => Random.value; 19 | 20 | protected override Color GetValue() 21 | { 22 | var low = min.ToHSV(); 23 | var high = max.ToHSV(); 24 | 25 | var hsv = new Vector3( 26 | Mathf.Lerp(low.x, high.x, Easing.easeWithType(easingH, Rand())), 27 | Mathf.Lerp(low.y, high.y, Rand()), 28 | Mathf.Lerp(low.z, high.z, Rand()) 29 | ); 30 | 31 | var col = Color.HSVToRGB(hsv.x, hsv.y, hsv.z); 32 | col.a = Mathf.Lerp(min.a, max.a, Rand()); 33 | 34 | return col; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Random/RandomForMaterialPropertyBlock/RandomHSVForMaterialProperty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad51dd36e87d16745869cfa17db49d0d 3 | timeCreated: 1470054086 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c1592bbf87cb0f4fa0996cda61db8ff 3 | folderAsset: yes 4 | timeCreated: 1473060265 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Shaders/Additive.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Additive 11 | m_Shader: {fileID: 4800000, guid: 32ea5d9b0329d8848b8fc9f3aaed945d, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 2800000, guid: 001bba4850d6a6640b537f791020866b, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _Tex: 59 | m_Texture: {fileID: 2800000, guid: ea92ddc3f579e2945834650c212f7408, type: 3} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _Tex2: 63 | m_Texture: {fileID: 2800000, guid: 001bba4850d6a6640b537f791020866b, type: 3} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | m_Floats: 67 | - _Alpha: 1 68 | - _BumpScale: 1 69 | - _Cutoff: 0.5 70 | - _DetailNormalMapScale: 1 71 | - _DstBlend: 0 72 | - _GlossMapScale: 1 73 | - _Glossiness: 0.5 74 | - _GlossyReflections: 1 75 | - _Metallic: 0 76 | - _Mode: 0 77 | - _OcclusionStrength: 1 78 | - _Parallax: 0.02 79 | - _SmoothnessTextureChannel: 0 80 | - _SpecularHighlights: 1 81 | - _SrcBlend: 1 82 | - _UVSec: 0 83 | - _ZWrite: 1 84 | m_Colors: 85 | - _Color: {r: 1, g: 1, b: 1, a: 1} 86 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 87 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Shaders/Additive.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e157f3203c7034e4d8c94197ca5f624d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Shaders/Additive.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/Additive" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _Alpha("Alpha", float) = 1 7 | } 8 | 9 | SubShader 10 | { 11 | Tags {"Queue" = "Background"} 12 | // No culling or depth 13 | Cull Off ZWrite Off ZTest Always 14 | Blend One One 15 | 16 | Pass 17 | { 18 | CGPROGRAM 19 | #pragma vertex vert_img 20 | #pragma fragment frag 21 | 22 | #pragma multi_compile __ IS_NORMAL_MAP 23 | 24 | #include "UnityCG.cginc" 25 | 26 | sampler2D _MainTex; 27 | float _Alpha; 28 | 29 | fixed4 frag(v2f_img i) : SV_Target 30 | { 31 | fixed4 bg = tex2D(_MainTex, i.uv); 32 | #ifdef IS_NORMAL_MAP 33 | bg.rgb = UnpackNormal(bg); 34 | #endif 35 | bg.a = _Alpha; 36 | 37 | return bg; 38 | } 39 | ENDCG 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Shaders/Additive.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ee8c5f8db3d5b146bbc30de745f8fbe 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Shaders/Tone.cginc: -------------------------------------------------------------------------------- 1 | #ifndef TONE_INCLUDED 2 | #define TONE_INCLUDED 3 | 4 | half4 _Tone; 5 | 6 | half3 CalcTone(half3 c) 7 | { 8 | return lerp(c, _Tone.x * pow(abs(c), _Tone.y) + _Tone.z, _Tone.w); 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Shaders/Tone.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7e265ae925c19c4c8e8020d96abfd5b 3 | timeCreated: 1473060279 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Texture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f17d0629fc624f24e94a5143bae45975 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Texture/TextureUtil.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using UnityEngine; 3 | 4 | namespace UnityUtil 5 | { 6 | public static class TextureUtil 7 | { 8 | public static Texture2D LoadFromStreamingAssetsFolder(string path) 9 | { 10 | Texture2D ret = null; 11 | var fullPath = Application.streamingAssetsPath + "/" + path; 12 | if (!File.Exists(fullPath)) 13 | { 14 | Debug.Log($"TextureUtil.LoadFromStreamingAssetsFolder() File Not Founds.[{fullPath}]"); 15 | } 16 | else 17 | { 18 | using var reader = new BinaryReader(File.Open(fullPath, FileMode.Open)); 19 | 20 | ret = new Texture2D(2, 2); 21 | ret.LoadImage(reader.ReadBytes((int)reader.BaseStream.Length)); 22 | } 23 | 24 | return ret; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Texture/TextureUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca810d3c5cdbc04458446bd0337a7211 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Transform.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f8bcdbeda6acdd4ba23345ba4d8f60f 3 | folderAsset: yes 4 | timeCreated: 1470054080 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Transform/AutoRot.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | 6 | public class AutoRot : MonoBehaviour 7 | { 8 | public float speed = 30f; 9 | 10 | void Update() 11 | { 12 | var deg = transform.rotation.eulerAngles; 13 | deg.y += speed * Time.deltaTime; 14 | transform.rotation = Quaternion.Euler(deg); 15 | } 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Transform/AutoRot.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2fb4c1ac3372b1449a5cf5657542688 3 | timeCreated: 1470054088 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Transform/NoChildAutoDestroy.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityUtil 4 | { 5 | public class NoChildAutoDestroy : MonoBehaviour 6 | { 7 | // 一度子供ができるまで待つ 8 | public bool waitChildGenerate; 9 | 10 | bool _isChildGenerated; 11 | 12 | void Update() 13 | { 14 | var hasChild = transform.childCount > 0; 15 | _isChildGenerated |= hasChild; 16 | 17 | if (!hasChild && (!waitChildGenerate || _isChildGenerated)) 18 | { 19 | Destroy(gameObject); 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/Transform/NoChildAutoDestroy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ace7eca04953b0418322569212bac43 3 | timeCreated: 1470054084 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/UnityUtil.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ga.fuquna.unityutil", 3 | "references": [], 4 | "includePlatforms": [], 5 | "excludePlatforms": [], 6 | "allowUnsafeCode": false, 7 | "overrideReferences": false, 8 | "precompiledReferences": [], 9 | "autoReferenced": true, 10 | "defineConstraints": [], 11 | "versionDefines": [], 12 | "noEngineReferences": false 13 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/UnityUtil.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f84f0c98112f29d4a8fea26a026bce4e 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ga.fuquna.unityutil", 3 | "displayName": "UnityUtil", 4 | "version": "1.3.4", 5 | "unity": "2022.3", 6 | "description": "Miscellaneous utilities for Unity", 7 | "keywords": [ 8 | "Utilities" 9 | ], 10 | "category": "Tool", 11 | "author": { 12 | "name": "fuqunaga", 13 | "email": "fukhid@gmail.com", 14 | "url": "https://fuquna.ga" 15 | } 16 | } -------------------------------------------------------------------------------- /Packages/ga.fuquna.unityutil/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d7fa35ec717fd546a4532481d00e1b4 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ide.rider": "3.0.24", 4 | "com.unity.ide.visualstudio": "2.0.20", 5 | "com.unity.ide.vscode": "1.2.5", 6 | "com.unity.test-framework": "1.1.33", 7 | "com.unity.textmeshpro": "3.0.6", 8 | "com.unity.ugui": "1.0.0", 9 | "com.unity.modules.ai": "1.0.0", 10 | "com.unity.modules.androidjni": "1.0.0", 11 | "com.unity.modules.animation": "1.0.0", 12 | "com.unity.modules.assetbundle": "1.0.0", 13 | "com.unity.modules.audio": "1.0.0", 14 | "com.unity.modules.cloth": "1.0.0", 15 | "com.unity.modules.director": "1.0.0", 16 | "com.unity.modules.imageconversion": "1.0.0", 17 | "com.unity.modules.imgui": "1.0.0", 18 | "com.unity.modules.jsonserialize": "1.0.0", 19 | "com.unity.modules.particlesystem": "1.0.0", 20 | "com.unity.modules.physics": "1.0.0", 21 | "com.unity.modules.physics2d": "1.0.0", 22 | "com.unity.modules.screencapture": "1.0.0", 23 | "com.unity.modules.terrain": "1.0.0", 24 | "com.unity.modules.terrainphysics": "1.0.0", 25 | "com.unity.modules.tilemap": "1.0.0", 26 | "com.unity.modules.ui": "1.0.0", 27 | "com.unity.modules.uielements": "1.0.0", 28 | "com.unity.modules.umbra": "1.0.0", 29 | "com.unity.modules.unityanalytics": "1.0.0", 30 | "com.unity.modules.unitywebrequest": "1.0.0", 31 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 32 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 33 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 34 | "com.unity.modules.unitywebrequestwww": "1.0.0", 35 | "com.unity.modules.vehicles": "1.0.0", 36 | "com.unity.modules.video": "1.0.0", 37 | "com.unity.modules.vr": "1.0.0", 38 | "com.unity.modules.wind": "1.0.0", 39 | "com.unity.modules.xr": "1.0.0" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ext.nunit": { 4 | "version": "1.0.6", 5 | "depth": 1, 6 | "source": "registry", 7 | "dependencies": {}, 8 | "url": "https://packages.unity.com" 9 | }, 10 | "com.unity.ide.rider": { 11 | "version": "3.0.24", 12 | "depth": 0, 13 | "source": "registry", 14 | "dependencies": { 15 | "com.unity.ext.nunit": "1.0.6" 16 | }, 17 | "url": "https://packages.unity.com" 18 | }, 19 | "com.unity.ide.visualstudio": { 20 | "version": "2.0.20", 21 | "depth": 0, 22 | "source": "registry", 23 | "dependencies": { 24 | "com.unity.test-framework": "1.1.9" 25 | }, 26 | "url": "https://packages.unity.com" 27 | }, 28 | "com.unity.ide.vscode": { 29 | "version": "1.2.5", 30 | "depth": 0, 31 | "source": "registry", 32 | "dependencies": {}, 33 | "url": "https://packages.unity.com" 34 | }, 35 | "com.unity.test-framework": { 36 | "version": "1.1.33", 37 | "depth": 0, 38 | "source": "registry", 39 | "dependencies": { 40 | "com.unity.ext.nunit": "1.0.6", 41 | "com.unity.modules.imgui": "1.0.0", 42 | "com.unity.modules.jsonserialize": "1.0.0" 43 | }, 44 | "url": "https://packages.unity.com" 45 | }, 46 | "com.unity.textmeshpro": { 47 | "version": "3.0.6", 48 | "depth": 0, 49 | "source": "registry", 50 | "dependencies": { 51 | "com.unity.ugui": "1.0.0" 52 | }, 53 | "url": "https://packages.unity.com" 54 | }, 55 | "com.unity.ugui": { 56 | "version": "1.0.0", 57 | "depth": 0, 58 | "source": "builtin", 59 | "dependencies": { 60 | "com.unity.modules.ui": "1.0.0", 61 | "com.unity.modules.imgui": "1.0.0" 62 | } 63 | }, 64 | "ga.fuquna.unityutil": { 65 | "version": "file:ga.fuquna.unityutil", 66 | "depth": 0, 67 | "source": "embedded", 68 | "dependencies": {} 69 | }, 70 | "com.unity.modules.ai": { 71 | "version": "1.0.0", 72 | "depth": 0, 73 | "source": "builtin", 74 | "dependencies": {} 75 | }, 76 | "com.unity.modules.androidjni": { 77 | "version": "1.0.0", 78 | "depth": 0, 79 | "source": "builtin", 80 | "dependencies": {} 81 | }, 82 | "com.unity.modules.animation": { 83 | "version": "1.0.0", 84 | "depth": 0, 85 | "source": "builtin", 86 | "dependencies": {} 87 | }, 88 | "com.unity.modules.assetbundle": { 89 | "version": "1.0.0", 90 | "depth": 0, 91 | "source": "builtin", 92 | "dependencies": {} 93 | }, 94 | "com.unity.modules.audio": { 95 | "version": "1.0.0", 96 | "depth": 0, 97 | "source": "builtin", 98 | "dependencies": {} 99 | }, 100 | "com.unity.modules.cloth": { 101 | "version": "1.0.0", 102 | "depth": 0, 103 | "source": "builtin", 104 | "dependencies": { 105 | "com.unity.modules.physics": "1.0.0" 106 | } 107 | }, 108 | "com.unity.modules.director": { 109 | "version": "1.0.0", 110 | "depth": 0, 111 | "source": "builtin", 112 | "dependencies": { 113 | "com.unity.modules.audio": "1.0.0", 114 | "com.unity.modules.animation": "1.0.0" 115 | } 116 | }, 117 | "com.unity.modules.imageconversion": { 118 | "version": "1.0.0", 119 | "depth": 0, 120 | "source": "builtin", 121 | "dependencies": {} 122 | }, 123 | "com.unity.modules.imgui": { 124 | "version": "1.0.0", 125 | "depth": 0, 126 | "source": "builtin", 127 | "dependencies": {} 128 | }, 129 | "com.unity.modules.jsonserialize": { 130 | "version": "1.0.0", 131 | "depth": 0, 132 | "source": "builtin", 133 | "dependencies": {} 134 | }, 135 | "com.unity.modules.particlesystem": { 136 | "version": "1.0.0", 137 | "depth": 0, 138 | "source": "builtin", 139 | "dependencies": {} 140 | }, 141 | "com.unity.modules.physics": { 142 | "version": "1.0.0", 143 | "depth": 0, 144 | "source": "builtin", 145 | "dependencies": {} 146 | }, 147 | "com.unity.modules.physics2d": { 148 | "version": "1.0.0", 149 | "depth": 0, 150 | "source": "builtin", 151 | "dependencies": {} 152 | }, 153 | "com.unity.modules.screencapture": { 154 | "version": "1.0.0", 155 | "depth": 0, 156 | "source": "builtin", 157 | "dependencies": { 158 | "com.unity.modules.imageconversion": "1.0.0" 159 | } 160 | }, 161 | "com.unity.modules.subsystems": { 162 | "version": "1.0.0", 163 | "depth": 1, 164 | "source": "builtin", 165 | "dependencies": { 166 | "com.unity.modules.jsonserialize": "1.0.0" 167 | } 168 | }, 169 | "com.unity.modules.terrain": { 170 | "version": "1.0.0", 171 | "depth": 0, 172 | "source": "builtin", 173 | "dependencies": {} 174 | }, 175 | "com.unity.modules.terrainphysics": { 176 | "version": "1.0.0", 177 | "depth": 0, 178 | "source": "builtin", 179 | "dependencies": { 180 | "com.unity.modules.physics": "1.0.0", 181 | "com.unity.modules.terrain": "1.0.0" 182 | } 183 | }, 184 | "com.unity.modules.tilemap": { 185 | "version": "1.0.0", 186 | "depth": 0, 187 | "source": "builtin", 188 | "dependencies": { 189 | "com.unity.modules.physics2d": "1.0.0" 190 | } 191 | }, 192 | "com.unity.modules.ui": { 193 | "version": "1.0.0", 194 | "depth": 0, 195 | "source": "builtin", 196 | "dependencies": {} 197 | }, 198 | "com.unity.modules.uielements": { 199 | "version": "1.0.0", 200 | "depth": 0, 201 | "source": "builtin", 202 | "dependencies": { 203 | "com.unity.modules.ui": "1.0.0", 204 | "com.unity.modules.imgui": "1.0.0", 205 | "com.unity.modules.jsonserialize": "1.0.0" 206 | } 207 | }, 208 | "com.unity.modules.umbra": { 209 | "version": "1.0.0", 210 | "depth": 0, 211 | "source": "builtin", 212 | "dependencies": {} 213 | }, 214 | "com.unity.modules.unityanalytics": { 215 | "version": "1.0.0", 216 | "depth": 0, 217 | "source": "builtin", 218 | "dependencies": { 219 | "com.unity.modules.unitywebrequest": "1.0.0", 220 | "com.unity.modules.jsonserialize": "1.0.0" 221 | } 222 | }, 223 | "com.unity.modules.unitywebrequest": { 224 | "version": "1.0.0", 225 | "depth": 0, 226 | "source": "builtin", 227 | "dependencies": {} 228 | }, 229 | "com.unity.modules.unitywebrequestassetbundle": { 230 | "version": "1.0.0", 231 | "depth": 0, 232 | "source": "builtin", 233 | "dependencies": { 234 | "com.unity.modules.assetbundle": "1.0.0", 235 | "com.unity.modules.unitywebrequest": "1.0.0" 236 | } 237 | }, 238 | "com.unity.modules.unitywebrequestaudio": { 239 | "version": "1.0.0", 240 | "depth": 0, 241 | "source": "builtin", 242 | "dependencies": { 243 | "com.unity.modules.unitywebrequest": "1.0.0", 244 | "com.unity.modules.audio": "1.0.0" 245 | } 246 | }, 247 | "com.unity.modules.unitywebrequesttexture": { 248 | "version": "1.0.0", 249 | "depth": 0, 250 | "source": "builtin", 251 | "dependencies": { 252 | "com.unity.modules.unitywebrequest": "1.0.0", 253 | "com.unity.modules.imageconversion": "1.0.0" 254 | } 255 | }, 256 | "com.unity.modules.unitywebrequestwww": { 257 | "version": "1.0.0", 258 | "depth": 0, 259 | "source": "builtin", 260 | "dependencies": { 261 | "com.unity.modules.unitywebrequest": "1.0.0", 262 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 263 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 264 | "com.unity.modules.audio": "1.0.0", 265 | "com.unity.modules.assetbundle": "1.0.0", 266 | "com.unity.modules.imageconversion": "1.0.0" 267 | } 268 | }, 269 | "com.unity.modules.vehicles": { 270 | "version": "1.0.0", 271 | "depth": 0, 272 | "source": "builtin", 273 | "dependencies": { 274 | "com.unity.modules.physics": "1.0.0" 275 | } 276 | }, 277 | "com.unity.modules.video": { 278 | "version": "1.0.0", 279 | "depth": 0, 280 | "source": "builtin", 281 | "dependencies": { 282 | "com.unity.modules.audio": "1.0.0", 283 | "com.unity.modules.ui": "1.0.0", 284 | "com.unity.modules.unitywebrequest": "1.0.0" 285 | } 286 | }, 287 | "com.unity.modules.vr": { 288 | "version": "1.0.0", 289 | "depth": 0, 290 | "source": "builtin", 291 | "dependencies": { 292 | "com.unity.modules.jsonserialize": "1.0.0", 293 | "com.unity.modules.physics": "1.0.0", 294 | "com.unity.modules.xr": "1.0.0" 295 | } 296 | }, 297 | "com.unity.modules.wind": { 298 | "version": "1.0.0", 299 | "depth": 0, 300 | "source": "builtin", 301 | "dependencies": {} 302 | }, 303 | "com.unity.modules.xr": { 304 | "version": "1.0.0", 305 | "depth": 0, 306 | "source": "builtin", 307 | "dependencies": { 308 | "com.unity.modules.physics": "1.0.0", 309 | "com.unity.modules.jsonserialize": "1.0.0", 310 | "com.unity.modules.subsystems": "1.0.0" 311 | } 312 | } 313 | } 314 | } 315 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_EnableOutputSuspension: 1 16 | m_SpatializerPlugin: 17 | m_AmbisonicDecoderPlugin: 18 | m_DisableAudio: 0 19 | m_VirtualizeEffects: 1 20 | m_RequestedDSPBufferSize: 0 21 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_DefaultMaxDepenetrationVelocity: 10 11 | m_SleepThreshold: 0.005 12 | m_DefaultContactOffset: 0.01 13 | m_DefaultSolverIterations: 6 14 | m_DefaultSolverVelocityIterations: 1 15 | m_QueriesHitBackfaces: 0 16 | m_QueriesHitTriggers: 1 17 | m_EnableAdaptiveForce: 0 18 | m_ClothInterCollisionDistance: 0.1 19 | m_ClothInterCollisionStiffness: 0.2 20 | m_ContactsGeneration: 1 21 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 22 | m_AutoSimulation: 1 23 | m_AutoSyncTransforms: 1 24 | m_ReuseCollisionCallbacks: 0 25 | m_ClothInterCollisionSettingsToggle: 0 26 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 27 | m_ContactPairsMode: 0 28 | m_BroadphaseType: 0 29 | m_WorldBounds: 30 | m_Center: {x: 0, y: 0, z: 0} 31 | m_Extent: {x: 250, y: 250, z: 250} 32 | m_WorldSubdivisions: 8 33 | m_FrictionType: 0 34 | m_EnableEnhancedDeterminism: 0 35 | m_EnableUnifiedHeightmaps: 1 36 | m_ImprovedPatchFriction: 0 37 | m_SolverType: 0 38 | m_DefaultMaxAngularSpeed: 7 39 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_SerializationMode: 2 8 | m_LineEndingsForNewScripts: 1 9 | m_DefaultBehaviorMode: 0 10 | m_PrefabRegularEnvironment: {fileID: 0} 11 | m_PrefabUIEnvironment: {fileID: 0} 12 | m_SpritePackerMode: 2 13 | m_SpritePackerPaddingPower: 1 14 | m_Bc7TextureCompressor: 0 15 | m_EtcTextureCompressorBehavior: 0 16 | m_EtcTextureFastCompressor: 2 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 5 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_EnableTextureStreamingInEditMode: 1 22 | m_EnableTextureStreamingInPlayMode: 1 23 | m_AsyncShaderCompilation: 1 24 | m_CachingShaderPreprocessor: 1 25 | m_PrefabModeAllowAutoSave: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_GameObjectNamingDigits: 1 29 | m_GameObjectNamingScheme: 0 30 | m_AssetNamingUsesSpace: 1 31 | m_UseLegacyProbeSampleCount: 1 32 | m_SerializeInlineMappingsOnOneLine: 0 33 | m_DisableCookiesInLightmapper: 1 34 | m_AssetPipelineMode: 1 35 | m_RefreshImportMode: 0 36 | m_CacheServerMode: 0 37 | m_CacheServerEndpoint: 38 | m_CacheServerNamespacePrefix: default 39 | m_CacheServerEnableDownload: 1 40 | m_CacheServerEnableUpload: 1 41 | m_CacheServerEnableAuth: 0 42 | m_CacheServerEnableTls: 0 43 | m_CacheServerValidationMode: 2 44 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 14 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_VideoShadersIncludeMode: 2 32 | m_AlwaysIncludedShaders: 33 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_PreloadShadersBatchTimeLimit: -1 41 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 42 | type: 0} 43 | m_CustomRenderPipeline: {fileID: 0} 44 | m_TransparencySortMode: 0 45 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 46 | m_DefaultRenderingPath: 1 47 | m_DefaultMobileRenderingPath: 1 48 | m_TierSettings: [] 49 | m_LightmapStripping: 0 50 | m_FogStripping: 0 51 | m_InstancingStripping: 0 52 | m_LightmapKeepPlain: 1 53 | m_LightmapKeepDirCombined: 1 54 | m_LightmapKeepDynamicPlain: 1 55 | m_LightmapKeepDynamicDirCombined: 1 56 | m_LightmapKeepShadowMask: 1 57 | m_LightmapKeepSubtractive: 1 58 | m_FogKeepLinear: 1 59 | m_FogKeepExp: 1 60 | m_FogKeepExp2: 1 61 | m_AlbedoSwatchInfos: [] 62 | m_LightsUseLinearIntensity: 0 63 | m_LightsUseColorTemperature: 0 64 | m_DefaultRenderingLayerMask: 1 65 | m_LogWhenShaderIsCompiled: 0 66 | m_SRPDefaultSettings: {} 67 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | m_UsePhysicalKeys: 0 297 | -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | maxJobWorkers: 0 89 | preserveTilesOutsideBounds: 0 90 | debug: 91 | m_Flags: 0 92 | m_SettingNames: 93 | - Humanoid 94 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuqunaga/UnityUtil/096ee73327bd72b41b07b891ec31f8c102155aa8/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | m_SeeAllPackageVersions: 0 20 | oneTimeWarningShown: 0 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_UserSelectedRegistryName: 29 | m_UserAddingNewScopedRegistry: 0 30 | m_RegistryInfoDraft: 31 | m_Modified: 0 32 | m_ErrorMessage: 33 | m_UserModificationsInstanceId: -830 34 | m_OriginalInstanceId: -832 35 | m_LoadAssets: 0 36 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_SimulationMode: 0 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 0 46 | m_AutoSyncTransforms: 1 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 23 7 | productGUID: cbd31532aea04cc449fff79fa9c71672 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: UnityUtil 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | mipStripping: 0 53 | numberOfMipsStripped: 0 54 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 55 | iosShowActivityIndicatorOnLoading: -1 56 | androidShowActivityIndicatorOnLoading: -1 57 | iosUseCustomAppBackgroundBehavior: 0 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 0 69 | androidUseSwappy: 0 70 | androidBlitType: 0 71 | androidResizableWindow: 0 72 | androidDefaultWindowWidth: 1920 73 | androidDefaultWindowHeight: 1080 74 | androidMinimumWindowWidth: 400 75 | androidMinimumWindowHeight: 300 76 | androidFullscreenMode: 1 77 | defaultIsNativeResolution: 1 78 | macRetinaSupport: 1 79 | runInBackground: 0 80 | captureSingleScreen: 0 81 | muteOtherAudioSources: 0 82 | Prepare IOS For Recording: 0 83 | Force IOS Speakers When Recording: 0 84 | deferSystemGesturesMode: 0 85 | hideHomeButton: 0 86 | submitAnalytics: 1 87 | usePlayerLog: 1 88 | bakeCollisionMeshes: 0 89 | forceSingleInstance: 0 90 | useFlipModelSwapchain: 1 91 | resizableWindow: 0 92 | useMacAppStoreValidation: 0 93 | macAppStoreCategory: public.app-category.games 94 | gpuSkinning: 0 95 | xboxPIXTextureCapture: 0 96 | xboxEnableAvatar: 0 97 | xboxEnableKinect: 0 98 | xboxEnableKinectAutoTracking: 0 99 | xboxEnableFitness: 0 100 | visibleInBackground: 0 101 | allowFullscreenSwitch: 1 102 | fullscreenMode: 1 103 | xboxSpeechDB: 0 104 | xboxEnableHeadOrientation: 0 105 | xboxEnableGuest: 0 106 | xboxEnablePIXSampling: 0 107 | metalFramebufferOnly: 0 108 | xboxOneResolution: 0 109 | xboxOneSResolution: 0 110 | xboxOneXResolution: 3 111 | xboxOneMonoLoggingLevel: 0 112 | xboxOneLoggingLevel: 1 113 | xboxOneDisableEsram: 0 114 | xboxOneEnableTypeOptimization: 0 115 | xboxOnePresentImmediateThreshold: 0 116 | switchQueueCommandMemory: 0 117 | switchQueueControlMemory: 16384 118 | switchQueueComputeMemory: 262144 119 | switchNVNShaderPoolsGranularity: 33554432 120 | switchNVNDefaultPoolsGranularity: 16777216 121 | switchNVNOtherPoolsGranularity: 16777216 122 | switchNVNMaxPublicTextureIDCount: 0 123 | switchNVNMaxPublicSamplerIDCount: 0 124 | stadiaPresentMode: 0 125 | stadiaTargetFramerate: 0 126 | vulkanNumSwapchainBuffers: 3 127 | vulkanEnableSetSRGBWrite: 0 128 | vulkanEnablePreTransform: 0 129 | vulkanEnableLateAcquireNextImage: 0 130 | vulkanEnableCommandBufferRecycling: 1 131 | m_SupportedAspectRatios: 132 | 4:3: 1 133 | 5:4: 1 134 | 16:10: 1 135 | 16:9: 1 136 | Others: 1 137 | bundleVersion: 1.0 138 | preloadedAssets: [] 139 | metroInputSource: 0 140 | wsaTransparentSwapchain: 0 141 | m_HolographicPauseOnTrackingLoss: 1 142 | xboxOneDisableKinectGpuReservation: 0 143 | xboxOneEnable7thCore: 0 144 | vrSettings: 145 | enable360StereoCapture: 0 146 | isWsaHolographicRemotingEnabled: 0 147 | enableFrameTimingStats: 0 148 | enableOpenGLProfilerGPURecorders: 1 149 | useHDRDisplay: 0 150 | D3DHDRBitDepth: 0 151 | m_ColorGamuts: 00000000 152 | targetPixelDensity: 30 153 | resolutionScalingMode: 0 154 | resetResolutionOnWindowResize: 0 155 | androidSupportedAspectRatio: 1 156 | androidMaxAspectRatio: 2.1 157 | applicationIdentifier: 158 | Android: com.Company.ProductName 159 | Standalone: unity.DefaultCompany.UnityUtil 160 | Tizen: com.Company.ProductName 161 | iPhone: com.Company.ProductName 162 | tvOS: com.Company.ProductName 163 | buildNumber: 164 | Standalone: 0 165 | iPhone: 0 166 | tvOS: 0 167 | overrideDefaultApplicationIdentifier: 1 168 | AndroidBundleVersionCode: 1 169 | AndroidMinSdkVersion: 22 170 | AndroidTargetSdkVersion: 0 171 | AndroidPreferredInstallLocation: 1 172 | aotOptions: 173 | stripEngineCode: 1 174 | iPhoneStrippingLevel: 0 175 | iPhoneScriptCallOptimization: 0 176 | ForceInternetPermission: 0 177 | ForceSDCardPermission: 0 178 | CreateWallpaper: 0 179 | APKExpansionFiles: 0 180 | keepLoadedShadersAlive: 0 181 | StripUnusedMeshComponents: 0 182 | VertexChannelCompressionMask: 214 183 | iPhoneSdkVersion: 988 184 | iOSTargetOSVersionString: 11.0 185 | tvOSSdkVersion: 0 186 | tvOSRequireExtendedGameController: 0 187 | tvOSTargetOSVersionString: 11.0 188 | uIPrerenderedIcon: 0 189 | uIRequiresPersistentWiFi: 0 190 | uIRequiresFullScreen: 1 191 | uIStatusBarHidden: 1 192 | uIExitOnSuspend: 0 193 | uIStatusBarStyle: 0 194 | appleTVSplashScreen: {fileID: 0} 195 | appleTVSplashScreen2x: {fileID: 0} 196 | tvOSSmallIconLayers: [] 197 | tvOSSmallIconLayers2x: [] 198 | tvOSLargeIconLayers: [] 199 | tvOSLargeIconLayers2x: [] 200 | tvOSTopShelfImageLayers: [] 201 | tvOSTopShelfImageLayers2x: [] 202 | tvOSTopShelfImageWideLayers: [] 203 | tvOSTopShelfImageWideLayers2x: [] 204 | iOSLaunchScreenType: 0 205 | iOSLaunchScreenPortrait: {fileID: 0} 206 | iOSLaunchScreenLandscape: {fileID: 0} 207 | iOSLaunchScreenBackgroundColor: 208 | serializedVersion: 2 209 | rgba: 0 210 | iOSLaunchScreenFillPct: 100 211 | iOSLaunchScreenSize: 100 212 | iOSLaunchScreenCustomXibPath: 213 | iOSLaunchScreeniPadType: 0 214 | iOSLaunchScreeniPadImage: {fileID: 0} 215 | iOSLaunchScreeniPadBackgroundColor: 216 | serializedVersion: 2 217 | rgba: 0 218 | iOSLaunchScreeniPadFillPct: 100 219 | iOSLaunchScreeniPadSize: 100 220 | iOSLaunchScreeniPadCustomXibPath: 221 | iOSLaunchScreenCustomStoryboardPath: 222 | iOSLaunchScreeniPadCustomStoryboardPath: 223 | iOSDeviceRequirements: [] 224 | iOSURLSchemes: [] 225 | macOSURLSchemes: [] 226 | iOSBackgroundModes: 0 227 | iOSMetalForceHardShadows: 0 228 | metalEditorSupport: 1 229 | metalAPIValidation: 1 230 | iOSRenderExtraFrameOnPause: 1 231 | iosCopyPluginsCodeInsteadOfSymlink: 0 232 | appleDeveloperTeamID: 233 | iOSManualSigningProvisioningProfileID: 234 | tvOSManualSigningProvisioningProfileID: 235 | iOSManualSigningProvisioningProfileType: 0 236 | tvOSManualSigningProvisioningProfileType: 0 237 | appleEnableAutomaticSigning: 0 238 | iOSRequireARKit: 0 239 | iOSAutomaticallyDetectAndAddCapabilities: 1 240 | appleEnableProMotion: 0 241 | shaderPrecisionModel: 0 242 | clonedFromGUID: 00000000000000000000000000000000 243 | templatePackageId: 244 | templateDefaultScene: 245 | useCustomMainManifest: 0 246 | useCustomLauncherManifest: 0 247 | useCustomMainGradleTemplate: 0 248 | useCustomLauncherGradleManifest: 0 249 | useCustomBaseGradleTemplate: 0 250 | useCustomGradlePropertiesTemplate: 0 251 | useCustomProguardFile: 0 252 | AndroidTargetArchitectures: 5 253 | AndroidTargetDevices: 0 254 | AndroidSplashScreenScale: 0 255 | androidSplashScreen: {fileID: 0} 256 | AndroidKeystoreName: '{inproject}: ' 257 | AndroidKeyaliasName: 258 | AndroidBuildApkPerCpuArchitecture: 0 259 | AndroidTVCompatibility: 1 260 | AndroidIsGame: 1 261 | AndroidEnableTango: 0 262 | androidEnableBanner: 1 263 | androidUseLowAccuracyLocation: 0 264 | androidUseCustomKeystore: 0 265 | m_AndroidBanners: 266 | - width: 320 267 | height: 180 268 | banner: {fileID: 0} 269 | androidGamepadSupportLevel: 0 270 | chromeosInputEmulation: 1 271 | AndroidMinifyWithR8: 0 272 | AndroidMinifyRelease: 0 273 | AndroidMinifyDebug: 0 274 | AndroidValidateAppBundleSize: 1 275 | AndroidAppBundleSizeToValidate: 150 276 | m_BuildTargetIcons: [] 277 | m_BuildTargetPlatformIcons: [] 278 | m_BuildTargetBatching: [] 279 | m_BuildTargetGraphicsJobs: 280 | - m_BuildTarget: WindowsStandaloneSupport 281 | m_GraphicsJobs: 0 282 | - m_BuildTarget: MacStandaloneSupport 283 | m_GraphicsJobs: 0 284 | - m_BuildTarget: LinuxStandaloneSupport 285 | m_GraphicsJobs: 0 286 | - m_BuildTarget: AndroidPlayer 287 | m_GraphicsJobs: 0 288 | - m_BuildTarget: iOSSupport 289 | m_GraphicsJobs: 0 290 | - m_BuildTarget: PS4Player 291 | m_GraphicsJobs: 0 292 | - m_BuildTarget: PS5Player 293 | m_GraphicsJobs: 0 294 | - m_BuildTarget: XboxOnePlayer 295 | m_GraphicsJobs: 0 296 | - m_BuildTarget: GameCoreXboxOneSupport 297 | m_GraphicsJobs: 0 298 | - m_BuildTarget: GameCoreScarlettSupport 299 | m_GraphicsJobs: 0 300 | - m_BuildTarget: Switch 301 | m_GraphicsJobs: 0 302 | - m_BuildTarget: WebGLSupport 303 | m_GraphicsJobs: 0 304 | - m_BuildTarget: MetroSupport 305 | m_GraphicsJobs: 0 306 | - m_BuildTarget: AppleTVSupport 307 | m_GraphicsJobs: 0 308 | - m_BuildTarget: BJMSupport 309 | m_GraphicsJobs: 0 310 | - m_BuildTarget: LuminSupport 311 | m_GraphicsJobs: 0 312 | - m_BuildTarget: CloudRendering 313 | m_GraphicsJobs: 0 314 | - m_BuildTarget: EmbeddedLinux 315 | m_GraphicsJobs: 0 316 | m_BuildTargetGraphicsJobMode: 317 | - m_BuildTarget: PS4Player 318 | m_GraphicsJobMode: 0 319 | - m_BuildTarget: XboxOnePlayer 320 | m_GraphicsJobMode: 0 321 | m_BuildTargetGraphicsAPIs: 322 | - m_BuildTarget: iOSSupport 323 | m_APIs: 10000000 324 | m_Automatic: 1 325 | - m_BuildTarget: AndroidPlayer 326 | m_APIs: 0b00000008000000 327 | m_Automatic: 0 328 | m_BuildTargetVRSettings: 329 | - m_BuildTarget: Android 330 | m_Enabled: 0 331 | m_Devices: 332 | - Oculus 333 | - m_BuildTarget: Windows Store Apps 334 | m_Enabled: 0 335 | m_Devices: [] 336 | - m_BuildTarget: N3DS 337 | m_Enabled: 0 338 | m_Devices: [] 339 | - m_BuildTarget: PS3 340 | m_Enabled: 0 341 | m_Devices: [] 342 | - m_BuildTarget: PS4 343 | m_Enabled: 0 344 | m_Devices: 345 | - PlayStationVR 346 | - m_BuildTarget: PSM 347 | m_Enabled: 0 348 | m_Devices: [] 349 | - m_BuildTarget: PSP2 350 | m_Enabled: 0 351 | m_Devices: [] 352 | - m_BuildTarget: SamsungTV 353 | m_Enabled: 0 354 | m_Devices: [] 355 | - m_BuildTarget: Standalone 356 | m_Enabled: 0 357 | m_Devices: 358 | - Oculus 359 | - m_BuildTarget: Tizen 360 | m_Enabled: 0 361 | m_Devices: [] 362 | - m_BuildTarget: WebGL 363 | m_Enabled: 0 364 | m_Devices: [] 365 | - m_BuildTarget: WebPlayer 366 | m_Enabled: 0 367 | m_Devices: [] 368 | - m_BuildTarget: WiiU 369 | m_Enabled: 0 370 | m_Devices: [] 371 | - m_BuildTarget: Xbox360 372 | m_Enabled: 0 373 | m_Devices: [] 374 | - m_BuildTarget: XboxOne 375 | m_Enabled: 0 376 | m_Devices: [] 377 | - m_BuildTarget: iPhone 378 | m_Enabled: 0 379 | m_Devices: [] 380 | - m_BuildTarget: tvOS 381 | m_Enabled: 0 382 | m_Devices: [] 383 | openGLRequireES31: 0 384 | openGLRequireES31AEP: 0 385 | openGLRequireES32: 0 386 | m_TemplateCustomTags: {} 387 | mobileMTRendering: 388 | iPhone: 1 389 | tvOS: 1 390 | m_BuildTargetGroupLightmapEncodingQuality: 391 | - m_BuildTarget: Standalone 392 | m_EncodingQuality: 1 393 | - m_BuildTarget: XboxOne 394 | m_EncodingQuality: 1 395 | - m_BuildTarget: PS4 396 | m_EncodingQuality: 1 397 | m_BuildTargetGroupLightmapSettings: [] 398 | m_BuildTargetNormalMapEncoding: [] 399 | m_BuildTargetDefaultTextureCompressionFormat: [] 400 | playModeTestRunnerEnabled: 0 401 | runPlayModeTestAsEditModeTest: 0 402 | actionOnDotNetUnhandledException: 1 403 | enableInternalProfiler: 0 404 | logObjCUncaughtExceptions: 1 405 | enableCrashReportAPI: 0 406 | cameraUsageDescription: 407 | locationUsageDescription: 408 | microphoneUsageDescription: 409 | bluetoothUsageDescription: 410 | switchNMETAOverride: 411 | switchNetLibKey: 412 | switchSocketMemoryPoolSize: 6144 413 | switchSocketAllocatorPoolSize: 128 414 | switchSocketConcurrencyLimit: 14 415 | switchScreenResolutionBehavior: 2 416 | switchUseCPUProfiler: 0 417 | switchUseGOLDLinker: 0 418 | switchLTOSetting: 0 419 | switchApplicationID: 0x01004b9000490000 420 | switchNSODependencies: 421 | switchTitleNames_0: 422 | switchTitleNames_1: 423 | switchTitleNames_2: 424 | switchTitleNames_3: 425 | switchTitleNames_4: 426 | switchTitleNames_5: 427 | switchTitleNames_6: 428 | switchTitleNames_7: 429 | switchTitleNames_8: 430 | switchTitleNames_9: 431 | switchTitleNames_10: 432 | switchTitleNames_11: 433 | switchTitleNames_12: 434 | switchTitleNames_13: 435 | switchTitleNames_14: 436 | switchTitleNames_15: 437 | switchPublisherNames_0: 438 | switchPublisherNames_1: 439 | switchPublisherNames_2: 440 | switchPublisherNames_3: 441 | switchPublisherNames_4: 442 | switchPublisherNames_5: 443 | switchPublisherNames_6: 444 | switchPublisherNames_7: 445 | switchPublisherNames_8: 446 | switchPublisherNames_9: 447 | switchPublisherNames_10: 448 | switchPublisherNames_11: 449 | switchPublisherNames_12: 450 | switchPublisherNames_13: 451 | switchPublisherNames_14: 452 | switchPublisherNames_15: 453 | switchIcons_0: {fileID: 0} 454 | switchIcons_1: {fileID: 0} 455 | switchIcons_2: {fileID: 0} 456 | switchIcons_3: {fileID: 0} 457 | switchIcons_4: {fileID: 0} 458 | switchIcons_5: {fileID: 0} 459 | switchIcons_6: {fileID: 0} 460 | switchIcons_7: {fileID: 0} 461 | switchIcons_8: {fileID: 0} 462 | switchIcons_9: {fileID: 0} 463 | switchIcons_10: {fileID: 0} 464 | switchIcons_11: {fileID: 0} 465 | switchIcons_12: {fileID: 0} 466 | switchIcons_13: {fileID: 0} 467 | switchIcons_14: {fileID: 0} 468 | switchIcons_15: {fileID: 0} 469 | switchSmallIcons_0: {fileID: 0} 470 | switchSmallIcons_1: {fileID: 0} 471 | switchSmallIcons_2: {fileID: 0} 472 | switchSmallIcons_3: {fileID: 0} 473 | switchSmallIcons_4: {fileID: 0} 474 | switchSmallIcons_5: {fileID: 0} 475 | switchSmallIcons_6: {fileID: 0} 476 | switchSmallIcons_7: {fileID: 0} 477 | switchSmallIcons_8: {fileID: 0} 478 | switchSmallIcons_9: {fileID: 0} 479 | switchSmallIcons_10: {fileID: 0} 480 | switchSmallIcons_11: {fileID: 0} 481 | switchSmallIcons_12: {fileID: 0} 482 | switchSmallIcons_13: {fileID: 0} 483 | switchSmallIcons_14: {fileID: 0} 484 | switchSmallIcons_15: {fileID: 0} 485 | switchManualHTML: 486 | switchAccessibleURLs: 487 | switchLegalInformation: 488 | switchMainThreadStackSize: 1048576 489 | switchPresenceGroupId: 490 | switchLogoHandling: 0 491 | switchReleaseVersion: 0 492 | switchDisplayVersion: 1.0.0 493 | switchStartupUserAccount: 0 494 | switchTouchScreenUsage: 0 495 | switchSupportedLanguagesMask: 0 496 | switchLogoType: 0 497 | switchApplicationErrorCodeCategory: 498 | switchUserAccountSaveDataSize: 0 499 | switchUserAccountSaveDataJournalSize: 0 500 | switchApplicationAttribute: 0 501 | switchCardSpecSize: -1 502 | switchCardSpecClock: -1 503 | switchRatingsMask: 0 504 | switchRatingsInt_0: 0 505 | switchRatingsInt_1: 0 506 | switchRatingsInt_2: 0 507 | switchRatingsInt_3: 0 508 | switchRatingsInt_4: 0 509 | switchRatingsInt_5: 0 510 | switchRatingsInt_6: 0 511 | switchRatingsInt_7: 0 512 | switchRatingsInt_8: 0 513 | switchRatingsInt_9: 0 514 | switchRatingsInt_10: 0 515 | switchRatingsInt_11: 0 516 | switchRatingsInt_12: 0 517 | switchLocalCommunicationIds_0: 518 | switchLocalCommunicationIds_1: 519 | switchLocalCommunicationIds_2: 520 | switchLocalCommunicationIds_3: 521 | switchLocalCommunicationIds_4: 522 | switchLocalCommunicationIds_5: 523 | switchLocalCommunicationIds_6: 524 | switchLocalCommunicationIds_7: 525 | switchParentalControl: 0 526 | switchAllowsScreenshot: 1 527 | switchAllowsVideoCapturing: 1 528 | switchAllowsRuntimeAddOnContentInstall: 0 529 | switchDataLossConfirmation: 0 530 | switchUserAccountLockEnabled: 0 531 | switchSystemResourceMemory: 16777216 532 | switchSupportedNpadStyles: 3 533 | switchNativeFsCacheSize: 32 534 | switchIsHoldTypeHorizontal: 0 535 | switchSupportedNpadCount: 8 536 | switchSocketConfigEnabled: 0 537 | switchTcpInitialSendBufferSize: 32 538 | switchTcpInitialReceiveBufferSize: 64 539 | switchTcpAutoSendBufferSizeMax: 256 540 | switchTcpAutoReceiveBufferSizeMax: 256 541 | switchUdpSendBufferSize: 9 542 | switchUdpReceiveBufferSize: 42 543 | switchSocketBufferEfficiency: 4 544 | switchSocketInitializeEnabled: 1 545 | switchNetworkInterfaceManagerInitializeEnabled: 1 546 | switchPlayerConnectionEnabled: 1 547 | switchUseNewStyleFilepaths: 0 548 | switchUseMicroSleepForYield: 1 549 | switchEnableRamDiskSupport: 0 550 | switchMicroSleepForYieldTime: 25 551 | switchRamDiskSpaceSize: 12 552 | ps4NPAgeRating: 12 553 | ps4NPTitleSecret: 554 | ps4NPTrophyPackPath: 555 | ps4ParentalLevel: 1 556 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 557 | ps4Category: 0 558 | ps4MasterVersion: 01.00 559 | ps4AppVersion: 01.00 560 | ps4AppType: 0 561 | ps4ParamSfxPath: 562 | ps4VideoOutPixelFormat: 0 563 | ps4VideoOutInitialWidth: 1920 564 | ps4VideoOutBaseModeInitialWidth: 1920 565 | ps4VideoOutReprojectionRate: 120 566 | ps4PronunciationXMLPath: 567 | ps4PronunciationSIGPath: 568 | ps4BackgroundImagePath: 569 | ps4StartupImagePath: 570 | ps4StartupImagesFolder: 571 | ps4IconImagesFolder: 572 | ps4SaveDataImagePath: 573 | ps4SdkOverride: 574 | ps4BGMPath: 575 | ps4ShareFilePath: 576 | ps4ShareOverlayImagePath: 577 | ps4PrivacyGuardImagePath: 578 | ps4ExtraSceSysFile: 579 | ps4NPtitleDatPath: 580 | ps4RemotePlayKeyAssignment: -1 581 | ps4RemotePlayKeyMappingDir: 582 | ps4PlayTogetherPlayerCount: 0 583 | ps4EnterButtonAssignment: 1 584 | ps4ApplicationParam1: 0 585 | ps4ApplicationParam2: 0 586 | ps4ApplicationParam3: 0 587 | ps4ApplicationParam4: 0 588 | ps4DownloadDataSize: 0 589 | ps4GarlicHeapSize: 2048 590 | ps4ProGarlicHeapSize: 2560 591 | playerPrefsMaxSize: 32768 592 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 593 | ps4pnSessions: 1 594 | ps4pnPresence: 1 595 | ps4pnFriends: 1 596 | ps4pnGameCustomData: 1 597 | playerPrefsSupport: 0 598 | enableApplicationExit: 0 599 | resetTempFolder: 1 600 | restrictedAudioUsageRights: 0 601 | ps4UseResolutionFallback: 0 602 | ps4ReprojectionSupport: 0 603 | ps4UseAudio3dBackend: 0 604 | ps4UseLowGarlicFragmentationMode: 1 605 | ps4SocialScreenEnabled: 0 606 | ps4ScriptOptimizationLevel: 3 607 | ps4Audio3dVirtualSpeakerCount: 14 608 | ps4attribCpuUsage: 0 609 | ps4PatchPkgPath: 610 | ps4PatchLatestPkgPath: 611 | ps4PatchChangeinfoPath: 612 | ps4PatchDayOne: 0 613 | ps4attribUserManagement: 0 614 | ps4attribMoveSupport: 0 615 | ps4attrib3DSupport: 0 616 | ps4attribShareSupport: 0 617 | ps4attribExclusiveVR: 0 618 | ps4disableAutoHideSplash: 0 619 | ps4videoRecordingFeaturesUsed: 0 620 | ps4contentSearchFeaturesUsed: 0 621 | ps4CompatibilityPS5: 0 622 | ps4GPU800MHz: 1 623 | ps4attribEyeToEyeDistanceSettingVR: 0 624 | ps4IncludedModules: [] 625 | ps4attribVROutputEnabled: 0 626 | monoEnv: 627 | splashScreenBackgroundSourceLandscape: {fileID: 0} 628 | splashScreenBackgroundSourcePortrait: {fileID: 0} 629 | blurSplashScreenBackground: 1 630 | spritePackerPolicy: 631 | webGLMemorySize: 256 632 | webGLExceptionSupport: 1 633 | webGLNameFilesAsHashes: 0 634 | webGLDataCaching: 0 635 | webGLDebugSymbols: 0 636 | webGLEmscriptenArgs: 637 | webGLModulesDirectory: 638 | webGLTemplate: APPLICATION:Default 639 | webGLAnalyzeBuildSize: 0 640 | webGLUseEmbeddedResources: 0 641 | webGLCompressionFormat: 1 642 | webGLWasmArithmeticExceptions: 0 643 | webGLLinkerTarget: 1 644 | webGLThreadsSupport: 0 645 | webGLDecompressionFallback: 0 646 | scriptingDefineSymbols: {} 647 | additionalCompilerArguments: {} 648 | platformArchitecture: {} 649 | scriptingBackend: 650 | Standalone: 0 651 | WebPlayer: 0 652 | il2cppCompilerConfiguration: {} 653 | managedStrippingLevel: {} 654 | incrementalIl2cppBuild: {} 655 | suppressCommonWarnings: 1 656 | allowUnsafeCode: 0 657 | useDeterministicCompilation: 1 658 | enableRoslynAnalyzers: 1 659 | additionalIl2CppArgs: 660 | scriptingRuntimeVersion: 1 661 | gcIncremental: 1 662 | assemblyVersionValidation: 1 663 | gcWBarrierValidation: 0 664 | apiCompatibilityLevelPerPlatform: {} 665 | m_RenderingPath: 1 666 | m_MobileRenderingPath: 1 667 | metroPackageName: UnityUtil 668 | metroPackageVersion: 669 | metroCertificatePath: 670 | metroCertificatePassword: 671 | metroCertificateSubject: 672 | metroCertificateIssuer: 673 | metroCertificateNotAfter: 0000000000000000 674 | metroApplicationDescription: UnityUtil 675 | wsaImages: {} 676 | metroTileShortName: 677 | metroTileShowName: 0 678 | metroMediumTileShowName: 0 679 | metroLargeTileShowName: 0 680 | metroWideTileShowName: 0 681 | metroSupportStreamingInstall: 0 682 | metroLastRequiredScene: 0 683 | metroDefaultTileSize: 1 684 | metroTileForegroundText: 1 685 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 686 | metroSplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, 687 | a: 1} 688 | metroSplashScreenUseBackgroundColor: 1 689 | platformCapabilities: {} 690 | metroTargetDeviceFamilies: {} 691 | metroFTAName: 692 | metroFTAFileTypes: [] 693 | metroProtocolName: 694 | vcxProjDefaultLanguage: 695 | XboxOneProductId: 696 | XboxOneUpdateKey: 697 | XboxOneSandboxId: 698 | XboxOneContentId: 699 | XboxOneTitleId: 700 | XboxOneSCId: 701 | XboxOneGameOsOverridePath: 702 | XboxOnePackagingOverridePath: 703 | XboxOneAppManifestOverridePath: 704 | XboxOneVersion: 1.0.0.0 705 | XboxOnePackageEncryption: 0 706 | XboxOnePackageUpdateGranularity: 2 707 | XboxOneDescription: 708 | XboxOneLanguage: 709 | - enus 710 | XboxOneCapability: [] 711 | XboxOneGameRating: {} 712 | XboxOneIsContentPackage: 0 713 | XboxOneEnhancedXboxCompatibilityMode: 0 714 | XboxOneEnableGPUVariability: 0 715 | XboxOneSockets: {} 716 | XboxOneSplashScreen: {fileID: 0} 717 | XboxOneAllowedProductIds: [] 718 | XboxOnePersistentLocalStorageSize: 0 719 | XboxOneXTitleMemory: 8 720 | XboxOneOverrideIdentityName: 721 | XboxOneOverrideIdentityPublisher: 722 | vrEditorSettings: {} 723 | cloudServicesEnabled: 724 | Analytics: 0 725 | Build: 0 726 | Collab: 0 727 | ErrorHub: 0 728 | Game_Performance: 0 729 | Hub: 0 730 | Purchasing: 0 731 | UNet: 0 732 | Unity_Ads: 0 733 | luminIcon: 734 | m_Name: 735 | m_ModelFolderPath: 736 | m_PortalFolderPath: 737 | luminCert: 738 | m_CertPath: 739 | m_SignPackage: 1 740 | luminIsChannelApp: 0 741 | luminVersion: 742 | m_VersionCode: 1 743 | m_VersionName: 744 | apiCompatibilityLevel: 6 745 | activeInputHandler: 0 746 | cloudProjectId: 747 | framebufferDepthMemorylessMode: 0 748 | qualitySettingsNames: [] 749 | projectName: 750 | organizationId: 751 | cloudEnabled: 0 752 | legacyClampBlendShapeWeights: 1 753 | playerDataPath: 754 | forceSRGBBlit: 1 755 | virtualTexturingSupportEnabled: 0 756 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2022.3.3f1 2 | m_EditorVersionWithRevision: 2022.3.3f1 (7cdc2969a641) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 2 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 4 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Fast 47 | pixelLightCount: 0 48 | shadows: 0 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 20 53 | shadowNearPlaneOffset: 2 54 | shadowCascade2Split: 0.33333334 55 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 56 | shadowmaskMode: 0 57 | skinWeights: 2 58 | textureQuality: 0 59 | anisotropicTextures: 0 60 | antiAliasing: 0 61 | softParticles: 0 62 | softVegetation: 0 63 | realtimeReflectionProbes: 0 64 | billboardsFaceCameraPosition: 0 65 | vSyncCount: 0 66 | lodBias: 0.4 67 | maximumLODLevel: 0 68 | streamingMipmapsActive: 0 69 | streamingMipmapsAddAllCameras: 1 70 | streamingMipmapsMemoryBudget: 512 71 | streamingMipmapsRenderersPerFrame: 512 72 | streamingMipmapsMaxLevelReduction: 2 73 | streamingMipmapsMaxFileIORequests: 1024 74 | particleRaycastBudget: 16 75 | asyncUploadTimeSlice: 2 76 | asyncUploadBufferSize: 4 77 | asyncUploadPersistentBuffer: 1 78 | resolutionScalingFixedDPIFactor: 1 79 | customRenderPipeline: {fileID: 0} 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Simple 83 | pixelLightCount: 1 84 | shadows: 1 85 | shadowResolution: 0 86 | shadowProjection: 1 87 | shadowCascades: 1 88 | shadowDistance: 20 89 | shadowNearPlaneOffset: 2 90 | shadowCascade2Split: 0.33333334 91 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 92 | shadowmaskMode: 0 93 | skinWeights: 2 94 | textureQuality: 0 95 | anisotropicTextures: 1 96 | antiAliasing: 0 97 | softParticles: 0 98 | softVegetation: 0 99 | realtimeReflectionProbes: 0 100 | billboardsFaceCameraPosition: 0 101 | vSyncCount: 0 102 | lodBias: 0.7 103 | maximumLODLevel: 0 104 | streamingMipmapsActive: 0 105 | streamingMipmapsAddAllCameras: 1 106 | streamingMipmapsMemoryBudget: 512 107 | streamingMipmapsRenderersPerFrame: 512 108 | streamingMipmapsMaxLevelReduction: 2 109 | streamingMipmapsMaxFileIORequests: 1024 110 | particleRaycastBudget: 64 111 | asyncUploadTimeSlice: 2 112 | asyncUploadBufferSize: 4 113 | asyncUploadPersistentBuffer: 1 114 | resolutionScalingFixedDPIFactor: 1 115 | customRenderPipeline: {fileID: 0} 116 | excludedTargetPlatforms: [] 117 | - serializedVersion: 2 118 | name: Good 119 | pixelLightCount: 2 120 | shadows: 2 121 | shadowResolution: 1 122 | shadowProjection: 1 123 | shadowCascades: 2 124 | shadowDistance: 40 125 | shadowNearPlaneOffset: 2 126 | shadowCascade2Split: 0.33333334 127 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 128 | shadowmaskMode: 1 129 | skinWeights: 2 130 | textureQuality: 0 131 | anisotropicTextures: 1 132 | antiAliasing: 0 133 | softParticles: 0 134 | softVegetation: 1 135 | realtimeReflectionProbes: 1 136 | billboardsFaceCameraPosition: 1 137 | vSyncCount: 1 138 | lodBias: 1 139 | maximumLODLevel: 0 140 | streamingMipmapsActive: 0 141 | streamingMipmapsAddAllCameras: 1 142 | streamingMipmapsMemoryBudget: 512 143 | streamingMipmapsRenderersPerFrame: 512 144 | streamingMipmapsMaxLevelReduction: 2 145 | streamingMipmapsMaxFileIORequests: 1024 146 | particleRaycastBudget: 256 147 | asyncUploadTimeSlice: 2 148 | asyncUploadBufferSize: 4 149 | asyncUploadPersistentBuffer: 1 150 | resolutionScalingFixedDPIFactor: 1 151 | customRenderPipeline: {fileID: 0} 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 2 154 | name: Beautiful 155 | pixelLightCount: 3 156 | shadows: 2 157 | shadowResolution: 2 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 70 161 | shadowNearPlaneOffset: 2 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 4 166 | textureQuality: 0 167 | anisotropicTextures: 2 168 | antiAliasing: 2 169 | softParticles: 1 170 | softVegetation: 1 171 | realtimeReflectionProbes: 1 172 | billboardsFaceCameraPosition: 1 173 | vSyncCount: 1 174 | lodBias: 1.5 175 | maximumLODLevel: 0 176 | streamingMipmapsActive: 0 177 | streamingMipmapsAddAllCameras: 1 178 | streamingMipmapsMemoryBudget: 512 179 | streamingMipmapsRenderersPerFrame: 512 180 | streamingMipmapsMaxLevelReduction: 2 181 | streamingMipmapsMaxFileIORequests: 1024 182 | particleRaycastBudget: 1024 183 | asyncUploadTimeSlice: 2 184 | asyncUploadBufferSize: 4 185 | asyncUploadPersistentBuffer: 1 186 | resolutionScalingFixedDPIFactor: 1 187 | customRenderPipeline: {fileID: 0} 188 | excludedTargetPlatforms: [] 189 | - serializedVersion: 2 190 | name: Fantastic 191 | pixelLightCount: 4 192 | shadows: 2 193 | shadowResolution: 2 194 | shadowProjection: 1 195 | shadowCascades: 4 196 | shadowDistance: 150 197 | shadowNearPlaneOffset: 2 198 | shadowCascade2Split: 0.33333334 199 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 200 | shadowmaskMode: 1 201 | skinWeights: 4 202 | textureQuality: 0 203 | anisotropicTextures: 2 204 | antiAliasing: 2 205 | softParticles: 1 206 | softVegetation: 1 207 | realtimeReflectionProbes: 1 208 | billboardsFaceCameraPosition: 1 209 | vSyncCount: 1 210 | lodBias: 2 211 | maximumLODLevel: 0 212 | streamingMipmapsActive: 0 213 | streamingMipmapsAddAllCameras: 1 214 | streamingMipmapsMemoryBudget: 512 215 | streamingMipmapsRenderersPerFrame: 512 216 | streamingMipmapsMaxLevelReduction: 2 217 | streamingMipmapsMaxFileIORequests: 1024 218 | particleRaycastBudget: 4096 219 | asyncUploadTimeSlice: 2 220 | asyncUploadBufferSize: 4 221 | asyncUploadPersistentBuffer: 1 222 | resolutionScalingFixedDPIFactor: 1 223 | customRenderPipeline: {fileID: 0} 224 | excludedTargetPlatforms: [] 225 | m_PerPlatformDefaultQuality: 226 | Android: 2 227 | BlackBerry: 2 228 | GLES Emulation: 5 229 | Nintendo 3DS: 5 230 | PS3: 5 231 | PS4: 5 232 | PSM: 5 233 | PSP2: 2 234 | Samsung TV: 2 235 | Standalone: 5 236 | Tizen: 2 237 | WP8: 5 238 | Web: 5 239 | WebGL: 3 240 | WiiU: 5 241 | Windows Store Apps: 5 242 | XBOX360: 5 243 | XboxOne: 5 244 | iPhone: 2 245 | tvOS: 5 246 | -------------------------------------------------------------------------------- /ProjectSettings/SceneTemplateSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "templatePinStates": [], 3 | "dependencyTypeInfos": [ 4 | { 5 | "userAdded": false, 6 | "type": "UnityEngine.AnimationClip", 7 | "ignore": false, 8 | "defaultInstantiationMode": 0, 9 | "supportsModification": true 10 | }, 11 | { 12 | "userAdded": false, 13 | "type": "UnityEditor.Animations.AnimatorController", 14 | "ignore": false, 15 | "defaultInstantiationMode": 0, 16 | "supportsModification": true 17 | }, 18 | { 19 | "userAdded": false, 20 | "type": "UnityEngine.AnimatorOverrideController", 21 | "ignore": false, 22 | "defaultInstantiationMode": 0, 23 | "supportsModification": true 24 | }, 25 | { 26 | "userAdded": false, 27 | "type": "UnityEditor.Audio.AudioMixerController", 28 | "ignore": false, 29 | "defaultInstantiationMode": 0, 30 | "supportsModification": true 31 | }, 32 | { 33 | "userAdded": false, 34 | "type": "UnityEngine.ComputeShader", 35 | "ignore": true, 36 | "defaultInstantiationMode": 1, 37 | "supportsModification": true 38 | }, 39 | { 40 | "userAdded": false, 41 | "type": "UnityEngine.Cubemap", 42 | "ignore": false, 43 | "defaultInstantiationMode": 0, 44 | "supportsModification": true 45 | }, 46 | { 47 | "userAdded": false, 48 | "type": "UnityEngine.GameObject", 49 | "ignore": false, 50 | "defaultInstantiationMode": 0, 51 | "supportsModification": true 52 | }, 53 | { 54 | "userAdded": false, 55 | "type": "UnityEditor.LightingDataAsset", 56 | "ignore": false, 57 | "defaultInstantiationMode": 0, 58 | "supportsModification": false 59 | }, 60 | { 61 | "userAdded": false, 62 | "type": "UnityEngine.LightingSettings", 63 | "ignore": false, 64 | "defaultInstantiationMode": 0, 65 | "supportsModification": true 66 | }, 67 | { 68 | "userAdded": false, 69 | "type": "UnityEngine.Material", 70 | "ignore": false, 71 | "defaultInstantiationMode": 0, 72 | "supportsModification": true 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEditor.MonoScript", 77 | "ignore": true, 78 | "defaultInstantiationMode": 1, 79 | "supportsModification": true 80 | }, 81 | { 82 | "userAdded": false, 83 | "type": "UnityEngine.PhysicMaterial", 84 | "ignore": false, 85 | "defaultInstantiationMode": 0, 86 | "supportsModification": true 87 | }, 88 | { 89 | "userAdded": false, 90 | "type": "UnityEngine.PhysicsMaterial2D", 91 | "ignore": false, 92 | "defaultInstantiationMode": 0, 93 | "supportsModification": true 94 | }, 95 | { 96 | "userAdded": false, 97 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 98 | "ignore": false, 99 | "defaultInstantiationMode": 0, 100 | "supportsModification": true 101 | }, 102 | { 103 | "userAdded": false, 104 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 105 | "ignore": false, 106 | "defaultInstantiationMode": 0, 107 | "supportsModification": true 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Rendering.VolumeProfile", 112 | "ignore": false, 113 | "defaultInstantiationMode": 0, 114 | "supportsModification": true 115 | }, 116 | { 117 | "userAdded": false, 118 | "type": "UnityEditor.SceneAsset", 119 | "ignore": false, 120 | "defaultInstantiationMode": 1, 121 | "supportsModification": true 122 | }, 123 | { 124 | "userAdded": false, 125 | "type": "UnityEngine.Shader", 126 | "ignore": true, 127 | "defaultInstantiationMode": 1, 128 | "supportsModification": true 129 | }, 130 | { 131 | "userAdded": false, 132 | "type": "UnityEngine.ShaderVariantCollection", 133 | "ignore": true, 134 | "defaultInstantiationMode": 1, 135 | "supportsModification": true 136 | }, 137 | { 138 | "userAdded": false, 139 | "type": "UnityEngine.Texture", 140 | "ignore": false, 141 | "defaultInstantiationMode": 0, 142 | "supportsModification": true 143 | }, 144 | { 145 | "userAdded": false, 146 | "type": "UnityEngine.Texture2D", 147 | "ignore": false, 148 | "defaultInstantiationMode": 0, 149 | "supportsModification": true 150 | }, 151 | { 152 | "userAdded": false, 153 | "type": "UnityEngine.Timeline.TimelineAsset", 154 | "ignore": false, 155 | "defaultInstantiationMode": 0, 156 | "supportsModification": true 157 | } 158 | ], 159 | "defaultDependencyTypeInfo": { 160 | "userAdded": false, 161 | "type": "", 162 | "ignore": false, 163 | "defaultInstantiationMode": 1, 164 | "supportsModification": true 165 | }, 166 | "newSceneOverride": 0 167 | } -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | m_CompiledVersion: 0 14 | m_RuntimeVersion: 0 15 | m_RuntimeResources: {fileID: 0} 16 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityUtil 2 | 3 | ## Installation 4 | Add the following address to UnityPackageManager gitURL. 5 | ``` 6 | https://github.com/fuqunaga/UnityUtil.git?path=Packages/ga.fuquna.unityutil 7 | ``` 8 | --------------------------------------------------------------------------------