├── Assets ├── DMIIMaterial.mat ├── DMIIMaterial.mat.meta ├── DMIIShader.shader ├── DMIIShader.shader.meta ├── Scenes.meta ├── Scenes │ ├── SampleScene.unity │ └── SampleScene.unity.meta ├── Scripts.meta ├── Scripts │ ├── ManyObjectHolder.cs │ └── ManyObjectHolder.cs.meta ├── f.png └── f.png.meta ├── LICENSE.txt └── UserSettings ├── EditorUserSettings.asset └── Layouts └── default-2021.dwlt /Assets/DMIIMaterial.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: DMIIMaterial 11 | m_Shader: {fileID: 4800000, guid: f3979647fe9dde04bb8d42f4284fc2c2, 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: 0} 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 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _FadeInT: 10 64 | - _GlossMapScale: 1 65 | - _Glossiness: 0.5 66 | - _GlossyReflections: 1 67 | - _Metallic: 0 68 | - _Mode: 0 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _ZWrite: 1 76 | m_Colors: 77 | - _Color: {r: 1, g: 1, b: 1, a: 1} 78 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 79 | -------------------------------------------------------------------------------- /Assets/DMIIMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87e3126a961542042aad474ca711c31e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/DMIIShader.shader: -------------------------------------------------------------------------------- 1 | Shader "DMIIShader" { 2 | Properties { 3 | _MainTex("Texture", 2D) = "white" {} 4 | _FadeInT("Fade in time", Float) = 10 5 | } 6 | SubShader { 7 | Tags { 8 | "Queue" = "Transparent" 9 | } 10 | Cull Off 11 | Lighting Off 12 | ZWrite Off 13 | Blend SrcAlpha OneMinusSrcAlpha 14 | 15 | Pass { 16 | CGPROGRAM 17 | #pragma vertex vert 18 | #pragma fragment frag 19 | #pragma multi_compile_instancing 20 | #include "UnityCG.cginc" 21 | #pragma instancing_options procedural:setup 22 | 23 | struct vertex { 24 | float4 loc : POSITION; 25 | float2 uv : TEXCOORD0; 26 | UNITY_VERTEX_INPUT_INSTANCE_ID 27 | }; 28 | struct fragment { 29 | float4 loc : SV_POSITION; 30 | float2 uv : TEXCOORD0; 31 | UNITY_VERTEX_INPUT_INSTANCE_ID 32 | }; 33 | 34 | CBUFFER_START(MyData) 35 | float4 posDirBuffer[7]; 36 | float timeBuffer[7]; 37 | CBUFFER_END 38 | 39 | #ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED 40 | void setup() { 41 | float2 position = posDirBuffer[unity_InstanceID].xy; 42 | float2 direction = posDirBuffer[unity_InstanceID].zw; 43 | direction *= smoothstep(0, 10, timeBuffer[unity_InstanceID]); 44 | 45 | unity_ObjectToWorld = float4x4( 46 | direction.x, -direction.y, 0, position.x, 47 | direction.y, direction.x, 0, position.y, 48 | 0, 0, 1, 0, 49 | 0, 0, 0, 1 50 | ); 51 | } 52 | #endif 53 | 54 | sampler2D _MainTex; 55 | float _FadeInT; 56 | 57 | fragment vert(vertex v) { 58 | fragment f; 59 | UNITY_SETUP_INSTANCE_ID(v); 60 | UNITY_TRANSFER_INSTANCE_ID(v, f); 61 | f.loc = UnityObjectToClipPos(v.loc); 62 | f.uv = v.uv; 63 | //f.uv = TRANSFORM_TEX(v.uv, _MainTex); 64 | return f; 65 | } 66 | 67 | float4 frag(fragment f) : SV_Target{ 68 | UNITY_SETUP_INSTANCE_ID(f); 69 | float4 c = tex2D(_MainTex, f.uv); 70 | #if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED) || defined(UNITY_INSTANCING_ENABLED) 71 | c.a *= smoothstep(0.0, _FadeInT, timeBuffer[unity_InstanceID]); 72 | #endif 73 | return c; 74 | } 75 | ENDCG 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Assets/DMIIShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3979647fe9dde04bb8d42f4284fc2c2 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c10433988b628d46b7f853df348f2e5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.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: 9 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: 3 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 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 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 0 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 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: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightingDataAsset: {fileID: 0} 100 | m_UseShadowmask: 1 101 | --- !u!196 &4 102 | NavMeshSettings: 103 | serializedVersion: 2 104 | m_ObjectHideFlags: 0 105 | m_BuildSettings: 106 | serializedVersion: 2 107 | agentTypeID: 0 108 | agentRadius: 0.5 109 | agentHeight: 2 110 | agentSlope: 45 111 | agentClimb: 0.4 112 | ledgeDropHeight: 0 113 | maxJumpAcrossDistance: 0 114 | minRegionArea: 2 115 | manualCellSize: 0 116 | cellSize: 0.16666667 117 | manualTileSize: 0 118 | tileSize: 256 119 | accuratePlacement: 0 120 | debug: 121 | m_Flags: 0 122 | m_NavMeshData: {fileID: 0} 123 | --- !u!1 &194660008 124 | GameObject: 125 | m_ObjectHideFlags: 0 126 | m_CorrespondingSourceObject: {fileID: 0} 127 | m_PrefabInstance: {fileID: 0} 128 | m_PrefabAsset: {fileID: 0} 129 | serializedVersion: 6 130 | m_Component: 131 | - component: {fileID: 194660010} 132 | - component: {fileID: 194660009} 133 | m_Layer: 0 134 | m_Name: ManyObjectHolder 135 | m_TagString: Untagged 136 | m_Icon: {fileID: 0} 137 | m_NavMeshLayer: 0 138 | m_StaticEditorFlags: 0 139 | m_IsActive: 1 140 | --- !u!114 &194660009 141 | MonoBehaviour: 142 | m_ObjectHideFlags: 0 143 | m_CorrespondingSourceObject: {fileID: 0} 144 | m_PrefabInstance: {fileID: 0} 145 | m_PrefabAsset: {fileID: 0} 146 | m_GameObject: {fileID: 194660008} 147 | m_Enabled: 1 148 | m_EditorHideFlags: 0 149 | m_Script: {fileID: 11500000, guid: 835e9d24bb408f84ab550f21851883f7, type: 3} 150 | m_Name: 151 | m_EditorClassIdentifier: 152 | instanceCount: 48 153 | sprite: {fileID: 21300000, guid: caabf5e3fe1e75c45bf3d01a0ea345d1, type: 3} 154 | baseMaterial: {fileID: 2100000, guid: 87e3126a961542042aad474ca711c31e, type: 2} 155 | layerRenderName: UI 156 | --- !u!4 &194660010 157 | Transform: 158 | m_ObjectHideFlags: 0 159 | m_CorrespondingSourceObject: {fileID: 0} 160 | m_PrefabInstance: {fileID: 0} 161 | m_PrefabAsset: {fileID: 0} 162 | m_GameObject: {fileID: 194660008} 163 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 164 | m_LocalPosition: {x: 0, y: 0, z: 0} 165 | m_LocalScale: {x: 1, y: 1, z: 1} 166 | m_Children: [] 167 | m_Father: {fileID: 0} 168 | m_RootOrder: 1 169 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 170 | --- !u!1 &519420028 171 | GameObject: 172 | m_ObjectHideFlags: 0 173 | m_CorrespondingSourceObject: {fileID: 0} 174 | m_PrefabInstance: {fileID: 0} 175 | m_PrefabAsset: {fileID: 0} 176 | serializedVersion: 6 177 | m_Component: 178 | - component: {fileID: 519420032} 179 | - component: {fileID: 519420031} 180 | - component: {fileID: 519420029} 181 | m_Layer: 0 182 | m_Name: Main Camera 183 | m_TagString: MainCamera 184 | m_Icon: {fileID: 0} 185 | m_NavMeshLayer: 0 186 | m_StaticEditorFlags: 0 187 | m_IsActive: 1 188 | --- !u!81 &519420029 189 | AudioListener: 190 | m_ObjectHideFlags: 0 191 | m_CorrespondingSourceObject: {fileID: 0} 192 | m_PrefabInstance: {fileID: 0} 193 | m_PrefabAsset: {fileID: 0} 194 | m_GameObject: {fileID: 519420028} 195 | m_Enabled: 1 196 | --- !u!20 &519420031 197 | Camera: 198 | m_ObjectHideFlags: 0 199 | m_CorrespondingSourceObject: {fileID: 0} 200 | m_PrefabInstance: {fileID: 0} 201 | m_PrefabAsset: {fileID: 0} 202 | m_GameObject: {fileID: 519420028} 203 | m_Enabled: 1 204 | serializedVersion: 2 205 | m_ClearFlags: 2 206 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 207 | m_projectionMatrixMode: 1 208 | m_GateFitMode: 2 209 | m_FOVAxisMode: 0 210 | m_SensorSize: {x: 36, y: 24} 211 | m_LensShift: {x: 0, y: 0} 212 | m_FocalLength: 50 213 | m_NormalizedViewPortRect: 214 | serializedVersion: 2 215 | x: 0 216 | y: 0 217 | width: 1 218 | height: 1 219 | near clip plane: 0.3 220 | far clip plane: 1000 221 | field of view: 60 222 | orthographic: 1 223 | orthographic size: 5 224 | m_Depth: -1 225 | m_CullingMask: 226 | serializedVersion: 2 227 | m_Bits: 4294967295 228 | m_RenderingPath: -1 229 | m_TargetTexture: {fileID: 0} 230 | m_TargetDisplay: 0 231 | m_TargetEye: 0 232 | m_HDR: 1 233 | m_AllowMSAA: 0 234 | m_AllowDynamicResolution: 0 235 | m_ForceIntoRT: 0 236 | m_OcclusionCulling: 0 237 | m_StereoConvergence: 10 238 | m_StereoSeparation: 0.022 239 | --- !u!4 &519420032 240 | Transform: 241 | m_ObjectHideFlags: 0 242 | m_CorrespondingSourceObject: {fileID: 0} 243 | m_PrefabInstance: {fileID: 0} 244 | m_PrefabAsset: {fileID: 0} 245 | m_GameObject: {fileID: 519420028} 246 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 247 | m_LocalPosition: {x: 0, y: 0, z: -10} 248 | m_LocalScale: {x: 1, y: 1, z: 1} 249 | m_Children: [] 250 | m_Father: {fileID: 0} 251 | m_RootOrder: 0 252 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 253 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cda990e2423bbf4892e6590ba056729 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c3a223a5c13fcb45b5728d215ff425f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/ManyObjectHolder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using UnityEngine; 4 | using UnityEngine.Rendering; 5 | using Random = System.Random; 6 | 7 | public readonly struct RenderInfo { 8 | private static readonly int MainTexPropertyId = Shader.PropertyToID("_MainTex"); 9 | public readonly Mesh mesh; 10 | public readonly Material mat; 11 | 12 | public RenderInfo(Mesh m, Material material) { 13 | mesh = m; 14 | mat = material; 15 | } 16 | 17 | public static RenderInfo FromSprite(Material baseMaterial, Sprite s) { 18 | var renderMaterial = UnityEngine.Object.Instantiate(baseMaterial); 19 | renderMaterial.enableInstancing = true; 20 | renderMaterial.SetTexture(MainTexPropertyId, s.texture); 21 | Mesh m = new Mesh { 22 | vertices = s.vertices.Select(v => (Vector3)v).ToArray(), 23 | triangles = s.triangles.Select(t => (int)t).ToArray(), 24 | uv = s.uv 25 | }; 26 | return new RenderInfo(m, renderMaterial); 27 | } 28 | } 29 | 30 | public class ManyObjectHolder : MonoBehaviour { 31 | private class FObject { 32 | private static readonly Random r = new Random(); 33 | public Vector2 position; 34 | public readonly float scale; 35 | private readonly Vector2 velocity; 36 | public float rotation; 37 | private readonly float rotationRate; 38 | public float time; 39 | 40 | public FObject() { 41 | position = new Vector2((float)r.NextDouble() * 10f - 5f, (float)r.NextDouble() * 8f - 4f); 42 | velocity = new Vector2((float)r.NextDouble() * 0.4f - 0.2f, (float)r.NextDouble() * 0.4f - 0.2f); 43 | rotation = (float)r.NextDouble(); 44 | rotationRate = (float)r.NextDouble() * 0.6f - 0.2f; 45 | scale = 0.6f + (float) r.NextDouble() * 0.8f; 46 | time = (float) r.NextDouble() * 6f; 47 | } 48 | 49 | public void DoUpdate(float dT) { 50 | position += velocity * dT; 51 | rotation += rotationRate * dT; 52 | time += dT; 53 | } 54 | } 55 | private static readonly int posDirPropertyId = Shader.PropertyToID("posDirBuffer"); 56 | private static readonly int timePropertyId = Shader.PropertyToID("timeBuffer"); 57 | 58 | private MaterialPropertyBlock pb; 59 | private readonly Vector4[] posDirArr = new Vector4[batchSize]; 60 | private readonly float[] timeArr = new float[batchSize]; 61 | private readonly Matrix4x4[] posMatrixArr = new Matrix4x4[batchSize]; 62 | private const int batchSize = 7; 63 | public int instanceCount; 64 | 65 | public Sprite sprite; 66 | public Material baseMaterial; 67 | private RenderInfo ri; 68 | public string layerRenderName; 69 | private int layerRender; 70 | private FObject[] objects; 71 | 72 | private void Start() { 73 | pb = new MaterialPropertyBlock(); 74 | layerRender = LayerMask.NameToLayer(layerRenderName); 75 | ri = RenderInfo.FromSprite(baseMaterial, sprite); 76 | Camera.onPreCull += RenderMe; 77 | objects = new FObject[instanceCount]; 78 | for (int ii = 0; ii < instanceCount; ++ii) { 79 | objects[ii] = new FObject(); 80 | } 81 | } 82 | 83 | private void Update() { 84 | float dT = Time.deltaTime; 85 | for (int ii = 0; ii < instanceCount; ++ii) { 86 | objects[ii].DoUpdate(dT); 87 | } 88 | } 89 | 90 | private float Smoothstep(float low, float high, float t) { 91 | t = Mathf.Clamp01((t - low) / (high - low)); 92 | return t * t * (3 - 2 * t); 93 | } 94 | private void RenderMe(Camera c) { 95 | if (!Application.isPlaying) { return; } 96 | for (int done = 0; done < instanceCount; done += batchSize) { 97 | int run = Math.Min(instanceCount - done, batchSize); 98 | for (int batchInd = 0; batchInd < run; ++batchInd) { 99 | var obj = objects[done + batchInd]; 100 | posDirArr[batchInd] = new Vector4(obj.position.x, obj.position.y, 101 | Mathf.Cos(obj.rotation) * obj.scale, Mathf.Sin(obj.rotation) * obj.scale); 102 | timeArr[batchInd] = obj.time; 103 | ref var m = ref posMatrixArr[batchInd]; 104 | 105 | var scale = obj.scale * Smoothstep(0, 10, obj.time); 106 | m.m00 = m.m11 = Mathf.Cos(obj.rotation) * scale; 107 | m.m01 = -(m.m10 = Mathf.Sin(obj.rotation) * scale); 108 | m.m22 = m.m33 = 1; 109 | m.m03 = obj.position.x; 110 | m.m13 = obj.position.y; 111 | } 112 | pb.SetVectorArray(posDirPropertyId, posDirArr); 113 | pb.SetFloatArray(timePropertyId, timeArr); 114 | //CallRender(c, run); 115 | CallLegacyRender(c, run); 116 | } 117 | } 118 | 119 | 120 | private void CallRender(Camera c, int count) { 121 | Graphics.DrawMeshInstancedProcedural(ri.mesh, 0, ri.mat, 122 | bounds: new Bounds(Vector3.zero, Vector3.one * 1000f), 123 | count: count, 124 | properties: pb, 125 | castShadows: ShadowCastingMode.Off, 126 | receiveShadows: false, 127 | layer: layerRender, 128 | camera: c); 129 | } 130 | 131 | //Use this for legacy GPU support or WebGL support 132 | private void CallLegacyRender(Camera c, int count) { 133 | Graphics.DrawMeshInstanced(ri.mesh, 0, ri.mat, 134 | posMatrixArr, 135 | count: count, 136 | properties: pb, 137 | castShadows: ShadowCastingMode.Off, 138 | receiveShadows: false, 139 | layer: layerRender, 140 | camera: c); 141 | } 142 | } -------------------------------------------------------------------------------- /Assets/Scripts/ManyObjectHolder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 835e9d24bb408f84ab550f21851883f7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bagoum/Unity-DrawMeshInstancedIndirect/4f692e4450d977b21a6977dad3071bcd64ded88e/Assets/f.png -------------------------------------------------------------------------------- /Assets/f.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: caabf5e3fe1e75c45bf3d01a0ea345d1 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: [] 77 | physicsShape: [] 78 | bones: [] 79 | spriteID: 5e97eb03825dee720800000000000000 80 | internalID: 0 81 | vertices: [] 82 | indices: 83 | edges: [] 84 | weights: [] 85 | secondaryTextures: [] 86 | spritePackingTag: 87 | pSDRemoveMatte: 0 88 | pSDShowRemoveMatteOption: 0 89 | userData: 90 | assetBundleName: 91 | assetBundleVariant: 92 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | This work is licensed under CC0 (effectively public domain). Legalese below. 2 | 3 | 4 | Creative Commons Legal Code 5 | 6 | CC0 1.0 Universal 7 | 8 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 9 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 10 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 11 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 12 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 13 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 14 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 15 | HEREUNDER. 16 | 17 | Statement of Purpose 18 | 19 | The laws of most jurisdictions throughout the world automatically confer 20 | exclusive Copyright and Related Rights (defined below) upon the creator 21 | and subsequent owner(s) (each and all, an "owner") of an original work of 22 | authorship and/or a database (each, a "Work"). 23 | 24 | Certain owners wish to permanently relinquish those rights to a Work for 25 | the purpose of contributing to a commons of creative, cultural and 26 | scientific works ("Commons") that the public can reliably and without fear 27 | of later claims of infringement build upon, modify, incorporate in other 28 | works, reuse and redistribute as freely as possible in any form whatsoever 29 | and for any purposes, including without limitation commercial purposes. 30 | These owners may contribute to the Commons to promote the ideal of a free 31 | culture and the further production of creative, cultural and scientific 32 | works, or to gain reputation or greater distribution for their Work in 33 | part through the use and efforts of others. 34 | 35 | For these and/or other purposes and motivations, and without any 36 | expectation of additional consideration or compensation, the person 37 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 38 | is an owner of Copyright and Related Rights in the Work, voluntarily 39 | elects to apply CC0 to the Work and publicly distribute the Work under its 40 | terms, with knowledge of his or her Copyright and Related Rights in the 41 | Work and the meaning and intended legal effect of CC0 on those rights. 42 | 43 | 1. Copyright and Related Rights. A Work made available under CC0 may be 44 | protected by copyright and related or neighboring rights ("Copyright and 45 | Related Rights"). Copyright and Related Rights include, but are not 46 | limited to, the following: 47 | 48 | i. the right to reproduce, adapt, distribute, perform, display, 49 | communicate, and translate a Work; 50 | ii. moral rights retained by the original author(s) and/or performer(s); 51 | iii. publicity and privacy rights pertaining to a person's image or 52 | likeness depicted in a Work; 53 | iv. rights protecting against unfair competition in regards to a Work, 54 | subject to the limitations in paragraph 4(a), below; 55 | v. rights protecting the extraction, dissemination, use and reuse of data 56 | in a Work; 57 | vi. database rights (such as those arising under Directive 96/9/EC of the 58 | European Parliament and of the Council of 11 March 1996 on the legal 59 | protection of databases, and under any national implementation 60 | thereof, including any amended or successor version of such 61 | directive); and 62 | vii. other similar, equivalent or corresponding rights throughout the 63 | world based on applicable law or treaty, and any national 64 | implementations thereof. 65 | 66 | 2. Waiver. To the greatest extent permitted by, but not in contravention 67 | of, applicable law, Affirmer hereby overtly, fully, permanently, 68 | irrevocably and unconditionally waives, abandons, and surrenders all of 69 | Affirmer's Copyright and Related Rights and associated claims and causes 70 | of action, whether now known or unknown (including existing as well as 71 | future claims and causes of action), in the Work (i) in all territories 72 | worldwide, (ii) for the maximum duration provided by applicable law or 73 | treaty (including future time extensions), (iii) in any current or future 74 | medium and for any number of copies, and (iv) for any purpose whatsoever, 75 | including without limitation commercial, advertising or promotional 76 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 77 | member of the public at large and to the detriment of Affirmer's heirs and 78 | successors, fully intending that such Waiver shall not be subject to 79 | revocation, rescission, cancellation, termination, or any other legal or 80 | equitable action to disrupt the quiet enjoyment of the Work by the public 81 | as contemplated by Affirmer's express Statement of Purpose. 82 | 83 | 3. Public License Fallback. Should any part of the Waiver for any reason 84 | be judged legally invalid or ineffective under applicable law, then the 85 | Waiver shall be preserved to the maximum extent permitted taking into 86 | account Affirmer's express Statement of Purpose. In addition, to the 87 | extent the Waiver is so judged Affirmer hereby grants to each affected 88 | person a royalty-free, non transferable, non sublicensable, non exclusive, 89 | irrevocable and unconditional license to exercise Affirmer's Copyright and 90 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 91 | maximum duration provided by applicable law or treaty (including future 92 | time extensions), (iii) in any current or future medium and for any number 93 | of copies, and (iv) for any purpose whatsoever, including without 94 | limitation commercial, advertising or promotional purposes (the 95 | "License"). The License shall be deemed effective as of the date CC0 was 96 | applied by Affirmer to the Work. Should any part of the License for any 97 | reason be judged legally invalid or ineffective under applicable law, such 98 | partial invalidity or ineffectiveness shall not invalidate the remainder 99 | of the License, and in such case Affirmer hereby affirms that he or she 100 | will not (i) exercise any of his or her remaining Copyright and Related 101 | Rights in the Work or (ii) assert any associated claims and causes of 102 | action with respect to the Work, in either case contrary to Affirmer's 103 | express Statement of Purpose. 104 | 105 | 4. Limitations and Disclaimers. 106 | 107 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 108 | surrendered, licensed or otherwise affected by this document. 109 | b. Affirmer offers the Work as-is and makes no representations or 110 | warranties of any kind concerning the Work, express, implied, 111 | statutory or otherwise, including without limitation warranties of 112 | title, merchantability, fitness for a particular purpose, non 113 | infringement, or the absence of latent or other defects, accuracy, or 114 | the present or absence of errors, whether or not discoverable, all to 115 | the greatest extent permissible under applicable law. 116 | c. Affirmer disclaims responsibility for clearing rights of other persons 117 | that may apply to the Work or any use thereof, including without 118 | limitation any person's Copyright and Related Rights in the Work. 119 | Further, Affirmer disclaims responsibility for obtaining any necessary 120 | consents, permissions or other rights required for any use of the 121 | Work. 122 | d. Affirmer understands and acknowledges that Creative Commons is not a 123 | party to this document and has no duty or obligation with respect to 124 | this CC0 or use of the Work. -------------------------------------------------------------------------------- /UserSettings/EditorUserSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!162 &1 4 | EditorUserSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ConfigSettings: 8 | RecentlyUsedScenePath-0: 9 | value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d 10 | flags: 0 11 | vcSharedLogLevel: 12 | value: 0d5e400f0650 13 | flags: 0 14 | m_VCAutomaticAdd: 1 15 | m_VCDebugCom: 0 16 | m_VCDebugCmd: 0 17 | m_VCDebugOut: 0 18 | m_SemanticMergeMode: 2 19 | m_VCShowFailedCheckout: 1 20 | m_VCOverwriteFailedCheckoutAssets: 1 21 | m_VCProjectOverlayIcons: 1 22 | m_VCHierarchyOverlayIcons: 1 23 | m_VCOtherOverlayIcons: 1 24 | m_VCAllowAsyncUpdate: 0 25 | -------------------------------------------------------------------------------- /UserSettings/Layouts/default-2021.dwlt: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 52 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: 1 12 | m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_PixelRect: 16 | serializedVersion: 2 17 | x: 2249 18 | y: 302.5 19 | width: 1206 20 | height: 715 21 | m_ShowMode: 4 22 | m_Title: 23 | m_RootView: {fileID: 6} 24 | m_MinSize: {x: 875, y: 300} 25 | m_MaxSize: {x: 10000, y: 10000} 26 | m_Maximized: 0 27 | --- !u!114 &2 28 | MonoBehaviour: 29 | m_ObjectHideFlags: 52 30 | m_CorrespondingSourceObject: {fileID: 0} 31 | m_PrefabInstance: {fileID: 0} 32 | m_PrefabAsset: {fileID: 0} 33 | m_GameObject: {fileID: 0} 34 | m_Enabled: 1 35 | m_EditorHideFlags: 1 36 | m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} 37 | m_Name: 38 | m_EditorClassIdentifier: 39 | m_Children: 40 | - {fileID: 9} 41 | - {fileID: 3} 42 | m_Position: 43 | serializedVersion: 2 44 | x: 0 45 | y: 30 46 | width: 1206 47 | height: 665 48 | m_MinSize: {x: 679, y: 492} 49 | m_MaxSize: {x: 14002, y: 14042} 50 | vertical: 0 51 | controlID: 119 52 | --- !u!114 &3 53 | MonoBehaviour: 54 | m_ObjectHideFlags: 52 55 | m_CorrespondingSourceObject: {fileID: 0} 56 | m_PrefabInstance: {fileID: 0} 57 | m_PrefabAsset: {fileID: 0} 58 | m_GameObject: {fileID: 0} 59 | m_Enabled: 1 60 | m_EditorHideFlags: 1 61 | m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} 62 | m_Name: 63 | m_EditorClassIdentifier: 64 | m_Children: [] 65 | m_Position: 66 | serializedVersion: 2 67 | x: 921 68 | y: 0 69 | width: 285 70 | height: 665 71 | m_MinSize: {x: 276, y: 71} 72 | m_MaxSize: {x: 4001, y: 4021} 73 | m_ActualView: {fileID: 13} 74 | m_Panes: 75 | - {fileID: 13} 76 | m_Selected: 0 77 | m_LastSelected: 0 78 | --- !u!114 &4 79 | MonoBehaviour: 80 | m_ObjectHideFlags: 52 81 | m_CorrespondingSourceObject: {fileID: 0} 82 | m_PrefabInstance: {fileID: 0} 83 | m_PrefabAsset: {fileID: 0} 84 | m_GameObject: {fileID: 0} 85 | m_Enabled: 1 86 | m_EditorHideFlags: 1 87 | m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} 88 | m_Name: 89 | m_EditorClassIdentifier: 90 | m_Children: [] 91 | m_Position: 92 | serializedVersion: 2 93 | x: 0 94 | y: 0 95 | width: 228 96 | height: 394 97 | m_MinSize: {x: 201, y: 221} 98 | m_MaxSize: {x: 4001, y: 4021} 99 | m_ActualView: {fileID: 14} 100 | m_Panes: 101 | - {fileID: 14} 102 | m_Selected: 0 103 | m_LastSelected: 0 104 | --- !u!114 &5 105 | MonoBehaviour: 106 | m_ObjectHideFlags: 52 107 | m_CorrespondingSourceObject: {fileID: 0} 108 | m_PrefabInstance: {fileID: 0} 109 | m_PrefabAsset: {fileID: 0} 110 | m_GameObject: {fileID: 0} 111 | m_Enabled: 1 112 | m_EditorHideFlags: 1 113 | m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} 114 | m_Name: ProjectBrowser 115 | m_EditorClassIdentifier: 116 | m_Children: [] 117 | m_Position: 118 | serializedVersion: 2 119 | x: 0 120 | y: 394 121 | width: 921 122 | height: 271 123 | m_MinSize: {x: 231, y: 271} 124 | m_MaxSize: {x: 10001, y: 10021} 125 | m_ActualView: {fileID: 12} 126 | m_Panes: 127 | - {fileID: 12} 128 | - {fileID: 17} 129 | m_Selected: 0 130 | m_LastSelected: 1 131 | --- !u!114 &6 132 | MonoBehaviour: 133 | m_ObjectHideFlags: 52 134 | m_CorrespondingSourceObject: {fileID: 0} 135 | m_PrefabInstance: {fileID: 0} 136 | m_PrefabAsset: {fileID: 0} 137 | m_GameObject: {fileID: 0} 138 | m_Enabled: 1 139 | m_EditorHideFlags: 1 140 | m_Script: {fileID: 12008, guid: 0000000000000000e000000000000000, type: 0} 141 | m_Name: 142 | m_EditorClassIdentifier: 143 | m_Children: 144 | - {fileID: 7} 145 | - {fileID: 2} 146 | - {fileID: 8} 147 | m_Position: 148 | serializedVersion: 2 149 | x: 0 150 | y: 0 151 | width: 1206 152 | height: 715 153 | m_MinSize: {x: 875, y: 300} 154 | m_MaxSize: {x: 10000, y: 10000} 155 | --- !u!114 &7 156 | MonoBehaviour: 157 | m_ObjectHideFlags: 52 158 | m_CorrespondingSourceObject: {fileID: 0} 159 | m_PrefabInstance: {fileID: 0} 160 | m_PrefabAsset: {fileID: 0} 161 | m_GameObject: {fileID: 0} 162 | m_Enabled: 1 163 | m_EditorHideFlags: 1 164 | m_Script: {fileID: 12011, guid: 0000000000000000e000000000000000, type: 0} 165 | m_Name: 166 | m_EditorClassIdentifier: 167 | m_Children: [] 168 | m_Position: 169 | serializedVersion: 2 170 | x: 0 171 | y: 0 172 | width: 1206 173 | height: 30 174 | m_MinSize: {x: 0, y: 0} 175 | m_MaxSize: {x: 0, y: 0} 176 | m_LoadedToolbars: [] 177 | m_MainToolbar: {fileID: 18} 178 | m_LastLoadedLayoutName: Default 179 | --- !u!114 &8 180 | MonoBehaviour: 181 | m_ObjectHideFlags: 52 182 | m_CorrespondingSourceObject: {fileID: 0} 183 | m_PrefabInstance: {fileID: 0} 184 | m_PrefabAsset: {fileID: 0} 185 | m_GameObject: {fileID: 0} 186 | m_Enabled: 1 187 | m_EditorHideFlags: 1 188 | m_Script: {fileID: 12042, guid: 0000000000000000e000000000000000, type: 0} 189 | m_Name: 190 | m_EditorClassIdentifier: 191 | m_Children: [] 192 | m_Position: 193 | serializedVersion: 2 194 | x: 0 195 | y: 695 196 | width: 1206 197 | height: 20 198 | m_MinSize: {x: 0, y: 0} 199 | m_MaxSize: {x: 0, y: 0} 200 | --- !u!114 &9 201 | MonoBehaviour: 202 | m_ObjectHideFlags: 52 203 | m_CorrespondingSourceObject: {fileID: 0} 204 | m_PrefabInstance: {fileID: 0} 205 | m_PrefabAsset: {fileID: 0} 206 | m_GameObject: {fileID: 0} 207 | m_Enabled: 1 208 | m_EditorHideFlags: 1 209 | m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} 210 | m_Name: 211 | m_EditorClassIdentifier: 212 | m_Children: 213 | - {fileID: 10} 214 | - {fileID: 5} 215 | m_Position: 216 | serializedVersion: 2 217 | x: 0 218 | y: 0 219 | width: 921 220 | height: 665 221 | m_MinSize: {x: 403, y: 492} 222 | m_MaxSize: {x: 10001, y: 14042} 223 | vertical: 1 224 | controlID: 92 225 | --- !u!114 &10 226 | MonoBehaviour: 227 | m_ObjectHideFlags: 52 228 | m_CorrespondingSourceObject: {fileID: 0} 229 | m_PrefabInstance: {fileID: 0} 230 | m_PrefabAsset: {fileID: 0} 231 | m_GameObject: {fileID: 0} 232 | m_Enabled: 1 233 | m_EditorHideFlags: 1 234 | m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} 235 | m_Name: 236 | m_EditorClassIdentifier: 237 | m_Children: 238 | - {fileID: 4} 239 | - {fileID: 11} 240 | m_Position: 241 | serializedVersion: 2 242 | x: 0 243 | y: 0 244 | width: 921 245 | height: 394 246 | m_MinSize: {x: 403, y: 221} 247 | m_MaxSize: {x: 8003, y: 4021} 248 | vertical: 0 249 | controlID: 93 250 | --- !u!114 &11 251 | MonoBehaviour: 252 | m_ObjectHideFlags: 52 253 | m_CorrespondingSourceObject: {fileID: 0} 254 | m_PrefabInstance: {fileID: 0} 255 | m_PrefabAsset: {fileID: 0} 256 | m_GameObject: {fileID: 0} 257 | m_Enabled: 1 258 | m_EditorHideFlags: 1 259 | m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} 260 | m_Name: 261 | m_EditorClassIdentifier: 262 | m_Children: [] 263 | m_Position: 264 | serializedVersion: 2 265 | x: 228 266 | y: 0 267 | width: 693 268 | height: 394 269 | m_MinSize: {x: 202, y: 221} 270 | m_MaxSize: {x: 4002, y: 4021} 271 | m_ActualView: {fileID: 15} 272 | m_Panes: 273 | - {fileID: 15} 274 | - {fileID: 16} 275 | m_Selected: 0 276 | m_LastSelected: 1 277 | --- !u!114 &12 278 | MonoBehaviour: 279 | m_ObjectHideFlags: 52 280 | m_CorrespondingSourceObject: {fileID: 0} 281 | m_PrefabInstance: {fileID: 0} 282 | m_PrefabAsset: {fileID: 0} 283 | m_GameObject: {fileID: 0} 284 | m_Enabled: 1 285 | m_EditorHideFlags: 1 286 | m_Script: {fileID: 12014, guid: 0000000000000000e000000000000000, type: 0} 287 | m_Name: 288 | m_EditorClassIdentifier: 289 | m_MinSize: {x: 230, y: 250} 290 | m_MaxSize: {x: 10000, y: 10000} 291 | m_TitleContent: 292 | m_Text: Project 293 | m_Image: {fileID: -5467254957812901981, guid: 0000000000000000d000000000000000, type: 0} 294 | m_Tooltip: 295 | m_Pos: 296 | serializedVersion: 2 297 | x: 2249 298 | y: 726.5 299 | width: 920 300 | height: 250 301 | m_ViewDataDictionary: {fileID: 0} 302 | m_SearchFilter: 303 | m_NameFilter: 304 | m_ClassNames: [] 305 | m_AssetLabels: [] 306 | m_AssetBundleNames: [] 307 | m_VersionControlStates: [] 308 | m_SoftLockControlStates: [] 309 | m_ReferencingInstanceIDs: 310 | m_SceneHandles: 311 | m_ShowAllHits: 0 312 | m_SkipHidden: 0 313 | m_SearchArea: 1 314 | m_Folders: 315 | - Assets 316 | m_Globs: [] 317 | m_ViewMode: 1 318 | m_StartGridSize: 64 319 | m_LastFolders: 320 | - Assets 321 | m_LastFoldersGridSize: -1 322 | m_LastProjectPath: U:\layout 323 | m_LockTracker: 324 | m_IsLocked: 0 325 | m_FolderTreeState: 326 | scrollPos: {x: 0, y: 0} 327 | m_SelectedIDs: f4350000 328 | m_LastClickedID: 13812 329 | m_ExpandedIDs: 00000000f435000000ca9a3b 330 | m_RenameOverlay: 331 | m_UserAcceptedRename: 0 332 | m_Name: 333 | m_OriginalName: 334 | m_EditFieldRect: 335 | serializedVersion: 2 336 | x: 0 337 | y: 0 338 | width: 0 339 | height: 0 340 | m_UserData: 0 341 | m_IsWaitingForDelay: 0 342 | m_IsRenaming: 0 343 | m_OriginalEventType: 11 344 | m_IsRenamingFilename: 1 345 | m_ClientGUIView: {fileID: 0} 346 | m_SearchString: 347 | m_CreateAssetUtility: 348 | m_EndAction: {fileID: 0} 349 | m_InstanceID: 0 350 | m_Path: 351 | m_Icon: {fileID: 0} 352 | m_ResourceFile: 353 | m_AssetTreeState: 354 | scrollPos: {x: 0, y: 0} 355 | m_SelectedIDs: 356 | m_LastClickedID: 0 357 | m_ExpandedIDs: 00000000f4350000 358 | m_RenameOverlay: 359 | m_UserAcceptedRename: 0 360 | m_Name: 361 | m_OriginalName: 362 | m_EditFieldRect: 363 | serializedVersion: 2 364 | x: 0 365 | y: 0 366 | width: 0 367 | height: 0 368 | m_UserData: 0 369 | m_IsWaitingForDelay: 0 370 | m_IsRenaming: 0 371 | m_OriginalEventType: 11 372 | m_IsRenamingFilename: 1 373 | m_ClientGUIView: {fileID: 0} 374 | m_SearchString: 375 | m_CreateAssetUtility: 376 | m_EndAction: {fileID: 0} 377 | m_InstanceID: 0 378 | m_Path: 379 | m_Icon: {fileID: 0} 380 | m_ResourceFile: 381 | m_ListAreaState: 382 | m_SelectedInstanceIDs: 383 | m_LastClickedInstanceID: 0 384 | m_HadKeyboardFocusLastEvent: 0 385 | m_ExpandedInstanceIDs: c6230000 386 | m_RenameOverlay: 387 | m_UserAcceptedRename: 0 388 | m_Name: 389 | m_OriginalName: 390 | m_EditFieldRect: 391 | serializedVersion: 2 392 | x: 0 393 | y: 0 394 | width: 0 395 | height: 0 396 | m_UserData: 0 397 | m_IsWaitingForDelay: 0 398 | m_IsRenaming: 0 399 | m_OriginalEventType: 11 400 | m_IsRenamingFilename: 1 401 | m_ClientGUIView: {fileID: 0} 402 | m_CreateAssetUtility: 403 | m_EndAction: {fileID: 0} 404 | m_InstanceID: 0 405 | m_Path: 406 | m_Icon: {fileID: 0} 407 | m_ResourceFile: 408 | m_NewAssetIndexInList: -1 409 | m_ScrollPosition: {x: 0, y: 0} 410 | m_GridSize: 64 411 | m_SkipHiddenPackages: 0 412 | m_DirectoriesAreaWidth: 207 413 | --- !u!114 &13 414 | MonoBehaviour: 415 | m_ObjectHideFlags: 52 416 | m_CorrespondingSourceObject: {fileID: 0} 417 | m_PrefabInstance: {fileID: 0} 418 | m_PrefabAsset: {fileID: 0} 419 | m_GameObject: {fileID: 0} 420 | m_Enabled: 1 421 | m_EditorHideFlags: 1 422 | m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} 423 | m_Name: 424 | m_EditorClassIdentifier: 425 | m_MinSize: {x: 275, y: 50} 426 | m_MaxSize: {x: 4000, y: 4000} 427 | m_TitleContent: 428 | m_Text: Inspector 429 | m_Image: {fileID: -2667387946076563598, guid: 0000000000000000d000000000000000, type: 0} 430 | m_Tooltip: 431 | m_Pos: 432 | serializedVersion: 2 433 | x: 3170 434 | y: 332.5 435 | width: 284 436 | height: 644 437 | m_ViewDataDictionary: {fileID: 0} 438 | m_ObjectsLockedBeforeSerialization: [] 439 | m_InstanceIDsLockedBeforeSerialization: 440 | m_PreviewResizer: 441 | m_CachedPref: 160 442 | m_ControlHash: -371814159 443 | m_PrefName: Preview_InspectorPreview 444 | m_LastInspectedObjectInstanceID: -1 445 | m_LastVerticalScrollValue: 0 446 | m_AssetGUID: 447 | m_InstanceID: 0 448 | m_LockTracker: 449 | m_IsLocked: 0 450 | m_PreviewWindow: {fileID: 0} 451 | --- !u!114 &14 452 | MonoBehaviour: 453 | m_ObjectHideFlags: 52 454 | m_CorrespondingSourceObject: {fileID: 0} 455 | m_PrefabInstance: {fileID: 0} 456 | m_PrefabAsset: {fileID: 0} 457 | m_GameObject: {fileID: 0} 458 | m_Enabled: 1 459 | m_EditorHideFlags: 1 460 | m_Script: {fileID: 12061, guid: 0000000000000000e000000000000000, type: 0} 461 | m_Name: 462 | m_EditorClassIdentifier: 463 | m_MinSize: {x: 200, y: 200} 464 | m_MaxSize: {x: 4000, y: 4000} 465 | m_TitleContent: 466 | m_Text: Hierarchy 467 | m_Image: {fileID: 7966133145522015247, guid: 0000000000000000d000000000000000, type: 0} 468 | m_Tooltip: 469 | m_Pos: 470 | serializedVersion: 2 471 | x: 2249 472 | y: 332.5 473 | width: 227 474 | height: 373 475 | m_ViewDataDictionary: {fileID: 0} 476 | m_SceneHierarchy: 477 | m_TreeViewState: 478 | scrollPos: {x: 0, y: 0} 479 | m_SelectedIDs: 480 | m_LastClickedID: 0 481 | m_ExpandedIDs: 42fbffff 482 | m_RenameOverlay: 483 | m_UserAcceptedRename: 0 484 | m_Name: 485 | m_OriginalName: 486 | m_EditFieldRect: 487 | serializedVersion: 2 488 | x: 0 489 | y: 0 490 | width: 0 491 | height: 0 492 | m_UserData: 0 493 | m_IsWaitingForDelay: 0 494 | m_IsRenaming: 0 495 | m_OriginalEventType: 11 496 | m_IsRenamingFilename: 0 497 | m_ClientGUIView: {fileID: 0} 498 | m_SearchString: 499 | m_ExpandedScenes: [] 500 | m_CurrenRootInstanceID: 0 501 | m_LockTracker: 502 | m_IsLocked: 0 503 | m_CurrentSortingName: TransformSorting 504 | m_WindowGUID: 4c969a2b90040154d917609493e03593 505 | --- !u!114 &15 506 | MonoBehaviour: 507 | m_ObjectHideFlags: 52 508 | m_CorrespondingSourceObject: {fileID: 0} 509 | m_PrefabInstance: {fileID: 0} 510 | m_PrefabAsset: {fileID: 0} 511 | m_GameObject: {fileID: 0} 512 | m_Enabled: 1 513 | m_EditorHideFlags: 1 514 | m_Script: {fileID: 12013, guid: 0000000000000000e000000000000000, type: 0} 515 | m_Name: 516 | m_EditorClassIdentifier: 517 | m_MinSize: {x: 200, y: 200} 518 | m_MaxSize: {x: 4000, y: 4000} 519 | m_TitleContent: 520 | m_Text: Scene 521 | m_Image: {fileID: 2593428753322112591, guid: 0000000000000000d000000000000000, type: 0} 522 | m_Tooltip: 523 | m_Pos: 524 | serializedVersion: 2 525 | x: 2477 526 | y: 332.5 527 | width: 691 528 | height: 373 529 | m_ViewDataDictionary: {fileID: 0} 530 | m_ShowContextualTools: 0 531 | m_WindowGUID: cc27987af1a868c49b0894db9c0f5429 532 | m_Gizmos: 1 533 | m_OverrideSceneCullingMask: 6917529027641081856 534 | m_SceneIsLit: 1 535 | m_SceneLighting: 1 536 | m_2DMode: 0 537 | m_isRotationLocked: 0 538 | m_PlayAudio: 0 539 | m_AudioPlay: 0 540 | m_Position: 541 | m_Target: {x: 0, y: 0, z: 0} 542 | speed: 2 543 | m_Value: {x: 0, y: 0, z: 0} 544 | m_RenderMode: 0 545 | m_CameraMode: 546 | drawMode: 0 547 | name: Shaded 548 | section: Shading Mode 549 | m_ValidateTrueMetals: 0 550 | m_DoValidateTrueMetals: 0 551 | m_ExposureSliderValue: 0 552 | m_SceneViewState: 553 | showFog: 1 554 | showMaterialUpdate: 0 555 | showSkybox: 1 556 | showFlares: 1 557 | showImageEffects: 1 558 | showParticleSystems: 1 559 | showVisualEffectGraphs: 1 560 | m_Grid: 561 | xGrid: 562 | m_Fade: 563 | m_Target: 0 564 | speed: 2 565 | m_Value: 0 566 | m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} 567 | m_Pivot: {x: 0, y: 0, z: 0} 568 | m_Size: {x: 0, y: 0} 569 | yGrid: 570 | m_Fade: 571 | m_Target: 1 572 | speed: 2 573 | m_Value: 1 574 | m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} 575 | m_Pivot: {x: 0, y: 0, z: 0} 576 | m_Size: {x: 1, y: 1} 577 | zGrid: 578 | m_Fade: 579 | m_Target: 0 580 | speed: 2 581 | m_Value: 0 582 | m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} 583 | m_Pivot: {x: 0, y: 0, z: 0} 584 | m_Size: {x: 0, y: 0} 585 | m_ShowGrid: 1 586 | m_GridAxis: 1 587 | m_gridOpacity: 0.5 588 | m_Rotation: 589 | m_Target: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} 590 | speed: 2 591 | m_Value: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} 592 | m_Size: 593 | m_Target: 10 594 | speed: 2 595 | m_Value: 10 596 | m_Ortho: 597 | m_Target: 0 598 | speed: 2 599 | m_Value: 0 600 | m_CameraSettings: 601 | m_Speed: 1 602 | m_SpeedNormalized: 0.5 603 | m_SpeedMin: 0.001 604 | m_SpeedMax: 2 605 | m_EasingEnabled: 1 606 | m_EasingDuration: 0.4 607 | m_AccelerationEnabled: 1 608 | m_FieldOfView: 90 609 | m_NearClip: 0.03 610 | m_FarClip: 10000 611 | m_DynamicClip: 1 612 | m_OcclusionCulling: 0 613 | m_LastSceneViewRotation: {x: 0, y: 0, z: 0, w: 0} 614 | m_LastSceneViewOrtho: 0 615 | m_ReplacementShader: {fileID: 0} 616 | m_ReplacementString: 617 | m_SceneVisActive: 1 618 | m_LastLockedObject: {fileID: 0} 619 | m_ViewIsLockedToObject: 0 620 | --- !u!114 &16 621 | MonoBehaviour: 622 | m_ObjectHideFlags: 52 623 | m_CorrespondingSourceObject: {fileID: 0} 624 | m_PrefabInstance: {fileID: 0} 625 | m_PrefabAsset: {fileID: 0} 626 | m_GameObject: {fileID: 0} 627 | m_Enabled: 1 628 | m_EditorHideFlags: 1 629 | m_Script: {fileID: 12015, guid: 0000000000000000e000000000000000, type: 0} 630 | m_Name: 631 | m_EditorClassIdentifier: 632 | m_MinSize: {x: 200, y: 200} 633 | m_MaxSize: {x: 4000, y: 4000} 634 | m_TitleContent: 635 | m_Text: Game 636 | m_Image: {fileID: -6423792434712278376, guid: 0000000000000000d000000000000000, type: 0} 637 | m_Tooltip: 638 | m_Pos: 639 | serializedVersion: 2 640 | x: 507 641 | y: 94 642 | width: 1532 643 | height: 790 644 | m_ViewDataDictionary: {fileID: 0} 645 | m_SerializedViewsNames: [] 646 | m_SerializedViewsValues: [] 647 | m_PlayModeViewName: GameView 648 | m_ShowGizmos: 0 649 | m_TargetDisplay: 0 650 | m_ClearColor: {r: 0, g: 0, b: 0, a: 0} 651 | m_TargetSize: {x: 640, y: 480} 652 | m_TextureFilterMode: 0 653 | m_TextureHideFlags: 61 654 | m_RenderIMGUI: 0 655 | m_MaximizeOnPlay: 0 656 | m_UseMipMap: 0 657 | m_VSyncEnabled: 0 658 | m_Gizmos: 0 659 | m_Stats: 0 660 | m_SelectedSizes: 00000000000000000000000000000000000000000000000000000000000000000000000000000000 661 | m_ZoomArea: 662 | m_HRangeLocked: 0 663 | m_VRangeLocked: 0 664 | hZoomLockedByDefault: 0 665 | vZoomLockedByDefault: 0 666 | m_HBaseRangeMin: -766 667 | m_HBaseRangeMax: 766 668 | m_VBaseRangeMin: -395 669 | m_VBaseRangeMax: 395 670 | m_HAllowExceedBaseRangeMin: 1 671 | m_HAllowExceedBaseRangeMax: 1 672 | m_VAllowExceedBaseRangeMin: 1 673 | m_VAllowExceedBaseRangeMax: 1 674 | m_ScaleWithWindow: 0 675 | m_HSlider: 0 676 | m_VSlider: 0 677 | m_IgnoreScrollWheelUntilClicked: 0 678 | m_EnableMouseInput: 1 679 | m_EnableSliderZoomHorizontal: 0 680 | m_EnableSliderZoomVertical: 0 681 | m_UniformScale: 1 682 | m_UpDirection: 1 683 | m_DrawArea: 684 | serializedVersion: 2 685 | x: 0 686 | y: 0 687 | width: 1532 688 | height: 790 689 | m_Scale: {x: 1, y: 1} 690 | m_Translation: {x: 766, y: 395} 691 | m_MarginLeft: 0 692 | m_MarginRight: 0 693 | m_MarginTop: 0 694 | m_MarginBottom: 0 695 | m_LastShownAreaInsideMargins: 696 | serializedVersion: 2 697 | x: -766 698 | y: -395 699 | width: 1532 700 | height: 790 701 | m_MinimalGUI: 1 702 | m_defaultScale: 1 703 | m_LastWindowPixelSize: {x: 1532, y: 790} 704 | m_ClearInEditMode: 1 705 | m_NoCameraWarning: 1 706 | m_LowResolutionForAspectRatios: 01000000000000000000 707 | m_XRRenderMode: 0 708 | m_RenderTexture: {fileID: 0} 709 | --- !u!114 &17 710 | MonoBehaviour: 711 | m_ObjectHideFlags: 52 712 | m_CorrespondingSourceObject: {fileID: 0} 713 | m_PrefabInstance: {fileID: 0} 714 | m_PrefabAsset: {fileID: 0} 715 | m_GameObject: {fileID: 0} 716 | m_Enabled: 1 717 | m_EditorHideFlags: 1 718 | m_Script: {fileID: 12003, guid: 0000000000000000e000000000000000, type: 0} 719 | m_Name: 720 | m_EditorClassIdentifier: 721 | m_MinSize: {x: 100, y: 100} 722 | m_MaxSize: {x: 4000, y: 4000} 723 | m_TitleContent: 724 | m_Text: Console 725 | m_Image: {fileID: -4327648978806127646, guid: 0000000000000000d000000000000000, type: 0} 726 | m_Tooltip: 727 | m_Pos: 728 | serializedVersion: 2 729 | x: 2249 730 | y: 726.5 731 | width: 920 732 | height: 250 733 | m_ViewDataDictionary: {fileID: 0} 734 | --- !u!114 &18 735 | MonoBehaviour: 736 | m_ObjectHideFlags: 0 737 | m_CorrespondingSourceObject: {fileID: 0} 738 | m_PrefabInstance: {fileID: 0} 739 | m_PrefabAsset: {fileID: 0} 740 | m_GameObject: {fileID: 0} 741 | m_Enabled: 1 742 | m_EditorHideFlags: 0 743 | m_Script: {fileID: 13963, guid: 0000000000000000e000000000000000, type: 0} 744 | m_Name: 745 | m_EditorClassIdentifier: 746 | m_DontSaveToLayout: 0 747 | --------------------------------------------------------------------------------