├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── NetworkManager.asset ├── XRSettings.asset ├── VersionControlSettings.asset ├── TimeManager.asset ├── VFXManager.asset ├── AudioManager.asset ├── TagManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── PresetManager.asset ├── UnityConnectSettings.asset ├── DynamicsManager.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── NavMeshAreas.asset ├── GraphicsSettings.asset ├── QualitySettings.asset ├── SceneTemplateSettings.json ├── InputManager.asset └── ProjectSettings.asset ├── Assets ├── AssetStore_Assets │ ├── auto_icon.png │ ├── autoattribute_cover_img.png │ ├── autoattribute_card_image.png │ ├── AssetStoreDescription.txt.meta │ ├── AssetStoreDescription.txt │ ├── auto_icon.png.meta │ ├── autoattribute_card_image.png.meta │ └── autoattribute_cover_img.png.meta ├── Releases │ ├── AutoV2.37.unitypackage │ ├── AutoV2.38.unitypackage │ ├── AutoV2.39.unitypackage │ ├── AutoV2.41.unitypackage │ ├── AutoAttribute_v2.5.4.unitypackage │ ├── AutoV2.38.unitypackage.meta │ ├── AutoV2.39.unitypackage.meta │ ├── AutoV2.41.unitypackage.meta │ ├── AutoAttribute_v2.5.4.unitypackage.meta │ └── AutoV2.37.unitypackage.meta ├── Tests │ ├── AutoSingleTestHelper_Child.cs │ ├── AutoSingleTestHelper.cs.meta │ ├── AutoSingleTestManager.cs.meta │ ├── AutoSingleTestHelper_Child.cs.meta │ ├── AutoSingleTestHelper.cs │ └── AutoSingleTestManager.cs ├── Auto_Attribute │ ├── Documentation │ │ ├── ~$toAttributes.rtf │ │ ├── AutoAttributes.rtf.meta │ │ ├── ~$toAttributes.rtf.meta │ │ └── AutoAttributes.rtf │ ├── license.md.meta │ ├── readme.md.meta │ ├── changelog.md.meta │ ├── package.json.meta │ ├── Editor.meta │ ├── Runtime.meta │ ├── Documentation.meta │ ├── Runtime │ │ ├── IAutoAttribute.cs │ │ ├── Utils.meta │ │ ├── BarbarO.AutoAttributes.Runtime.asmdef.meta │ │ ├── AutoEx.cs.meta │ │ ├── Utils │ │ │ ├── AutoUtils.cs.meta │ │ │ ├── GameObjectEx.cs.meta │ │ │ ├── ScriptTiming.cs.meta │ │ │ ├── UnityObjectEx.cs.meta │ │ │ ├── ReflectionHelperMethods.cs.meta │ │ │ ├── ScriptTiming.cs │ │ │ ├── UnityObjectEx.cs │ │ │ ├── AutoUtils.cs │ │ │ ├── GameObjectEx.cs │ │ │ └── ReflectionHelperMethods.cs │ │ ├── AutoAttributeManager.cs.meta │ │ ├── AutoReferencerOnInstantiation.cs.meta │ │ ├── AutoAttribute.cs.meta │ │ ├── IAutoAttribute.cs.meta │ │ ├── AutoChildrenAttribute.cs.meta │ │ ├── AutoParentAttribute.cs.meta │ │ ├── AutoFamily.cs.meta │ │ ├── BarbarO.AutoAttributes.Runtime.asmdef │ │ ├── AutoEx.cs │ │ ├── AutoReferencerOnInstantiation.cs │ │ ├── AutoParentAttribute.cs │ │ ├── AutoChildrenAttribute.cs │ │ ├── AutoAttribute.cs │ │ ├── AutoFamily.cs │ │ └── AutoAttributeManager.cs │ ├── readme.md │ ├── Editor │ │ ├── BarbarO.AutoAttributes.Editor.asmdef.meta │ │ ├── AutoAttributeManagerEditor.cs.meta │ │ ├── ScriptOrderManagerEditor.cs.meta │ │ ├── BarbarO.AutoAttributes.Editor.asmdef │ │ ├── ScriptOrderManagerEditor.cs │ │ └── AutoAttributeManagerEditor.cs │ ├── changelog.md │ ├── license.md │ └── package.json ├── Auto_Example.unity.meta ├── example-scene 1.unity.meta ├── example-scene.unity.meta ├── Prefabs.meta ├── Tests.meta ├── Releases.meta ├── AssetStore_Assets.meta ├── Auto_Attribute.meta ├── WebPlayerTemplates.meta ├── AutoAttribute_Test.cs.meta ├── AutoAttribute_Test.cs ├── example-scene 1.unity └── example-scene.unity ├── Packages ├── manifest.json └── packages-lock.json ├── .gitignore ├── packageDescription.md ├── UserSettings └── EditorUserSettings.asset ├── LICENSE ├── asset_store_readme.md └── README.md /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.3.23f1 2 | m_EditorVersionWithRevision: 2020.3.23f1 (c5d91304a876) 3 | -------------------------------------------------------------------------------- /Assets/AssetStore_Assets/auto_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OranBar/AutoAttribute-for-Unity3d/HEAD/Assets/AssetStore_Assets/auto_icon.png -------------------------------------------------------------------------------- /Assets/Releases/AutoV2.37.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OranBar/AutoAttribute-for-Unity3d/HEAD/Assets/Releases/AutoV2.37.unitypackage -------------------------------------------------------------------------------- /Assets/Releases/AutoV2.38.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OranBar/AutoAttribute-for-Unity3d/HEAD/Assets/Releases/AutoV2.38.unitypackage -------------------------------------------------------------------------------- /Assets/Releases/AutoV2.39.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OranBar/AutoAttribute-for-Unity3d/HEAD/Assets/Releases/AutoV2.39.unitypackage -------------------------------------------------------------------------------- /Assets/Releases/AutoV2.41.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OranBar/AutoAttribute-for-Unity3d/HEAD/Assets/Releases/AutoV2.41.unitypackage -------------------------------------------------------------------------------- /Assets/Tests/AutoSingleTestHelper_Child.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class AutoSingleTestHelper_Child : AutoSingleTestHelper { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /Assets/Releases/AutoAttribute_v2.5.4.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OranBar/AutoAttribute-for-Unity3d/HEAD/Assets/Releases/AutoAttribute_v2.5.4.unitypackage -------------------------------------------------------------------------------- /Assets/AssetStore_Assets/autoattribute_cover_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OranBar/AutoAttribute-for-Unity3d/HEAD/Assets/AssetStore_Assets/autoattribute_cover_img.png -------------------------------------------------------------------------------- /Assets/AssetStore_Assets/autoattribute_card_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OranBar/AutoAttribute-for-Unity3d/HEAD/Assets/AssetStore_Assets/autoattribute_card_image.png -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Documentation/~$toAttributes.rtf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OranBar/AutoAttribute-for-Unity3d/HEAD/Assets/Auto_Attribute/Documentation/~$toAttributes.rtf -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Assets/Auto_Example.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c9720ab356a0642a771bea13969a05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/example-scene 1.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a58d2e197643e3b44befc4fc1fc0a059 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/example-scene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e246aa9f6ad69146bcbe7ff2b559155 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/license.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5b2d8dc74938b547980192726e05591 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/readme.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4f0aca21512857428531f80e467c7ef 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9369bb404ea16f3478f88ba0c7006302 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b20abdd4e04acaf4aa8118a3d3a55b51 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/changelog.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84c05aa0b8e6a334f828bec34974bde0 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Releases.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3799435fbd97cd24080d44ad964235b9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Releases/AutoV2.38.unitypackage.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa083d3acaa0bf446af3aeb0ce925476 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Releases/AutoV2.39.unitypackage.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecb4934ac64980e4e81f5a17f7384ff7 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Releases/AutoV2.41.unitypackage.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5cbf4bc10fae95b49a037831135e6e0f 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/AssetStore_Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d8913302cea1c64a8140ac72bb7cfc4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b024f19374672c041acd6c67103696a3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43865d043e30a744a8cc7bb586cf19e9 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41ca2a1dd0967da4f9bc71517f9864c7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b612e2b23b040b441bf4e00f33f67baf 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Releases/AutoAttribute_v2.5.4.unitypackage.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3e710abf8d21e8439d6e02aec164a75 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/WebPlayerTemplates.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41e6f31cd3622f64eaf8bfbeb8025443 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 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 | } -------------------------------------------------------------------------------- /Assets/AssetStore_Assets/AssetStoreDescription.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: adc4328afb656be4d9a14b02aadbf330 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Documentation/AutoAttributes.rtf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81eeb08f0c68ae147bd96dd5e8e6a9ed 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Documentation/~$toAttributes.rtf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8ced7c52fcb29a418222c9606a71c14 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Documentation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27aa5eab0cc68414aad9730d78e3aeda 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/IAutoAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | public interface IAutoAttribute { 5 | bool Execute(MonoBehaviour mb, Type varType, Action SetVariableType); 6 | 7 | 8 | } 9 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5e44ba378f58464388ced71936d9732 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/readme.md: -------------------------------------------------------------------------------- 1 | Credits to Vecteezy.com https://www.vecteezy.com/free-vector/car-dealership-logo for the car logo symbol. 2 | Credits to Rizal Khurasan https://creativemarket.com/khurasan?u=khurasan for the font Tahu, used for Auto's logo. -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Editor/BarbarO.AutoAttributes.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e99a217507c8544b83e9d28cc8cff2f 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/BarbarO.AutoAttributes.Runtime.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2f440c9fef6c8c40ac5c50eea18c599 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /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/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.0167 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/Releases/AutoV2.37.unitypackage.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92e1d301cbac876409495d77dc8b0d3f 3 | timeCreated: 1520043097 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/AutoAttribute_Test.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77536cd48f22197438311638d94372a2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoEx.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61b232f1fe40bad4c83dc18a13d682ee 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Tests/AutoSingleTestHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27677395bd3787f4cb51dd4f75a3c125 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Tests/AutoSingleTestManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d780a4934f90854a9080daaadcfbd17 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Tests/AutoSingleTestHelper_Child.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 374eda931a32ea94f9265d8e32e6feb2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/Utils/AutoUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd3d3a9465ed29e4882a8032a9652e3d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/Utils/GameObjectEx.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8afec46a02a94d342ad80e46a02f97db 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/Utils/ScriptTiming.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b84ac89d3e8903a4f860929d66ea6ce3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/Utils/UnityObjectEx.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b04d81a3ed71839498bb5fdbf63b9899 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Editor/AutoAttributeManagerEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5bf6a724ae4eef4429ddda1c50e3faa0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Editor/ScriptOrderManagerEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd64ea13d843e384abd17fc3af05f209 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoAttributeManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b707ec86924986a42bd79edd38a34af8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: -500 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/Utils/ReflectionHelperMethods.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8687cf886e4fb174aa51d39583e9d81b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoReferencerOnInstantiation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c70f705a39e09e64692d803e96c4d966 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: -500 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb69dc55dc7703841847630857570171 3 | timeCreated: 1499549372 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/IAutoAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17162a776767f2544a847c8cfe0af74e 3 | timeCreated: 1507645143 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoChildrenAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a58e9f2672918754faeeddff15c9fc1e 3 | timeCreated: 1507645250 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoParentAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16d3c1ee1cfd7634a93c6815fae7892f 3 | timeCreated: 1507645250 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoFamily.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2bde92e64db76941aff5e39a824b6d0 3 | timeCreated: 1520042772 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/Utils/ScriptTiming.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Auto.Utils{ 4 | [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)] 5 | public class ScriptTiming : Attribute 6 | { 7 | public readonly int timing_offset; 8 | 9 | public ScriptTiming(int timing_offset) 10 | { 11 | this.timing_offset = timing_offset; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /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 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/BarbarO.AutoAttributes.Runtime.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "barbaro.autoattributes.Runtime", 3 | "rootNamespace": "", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": false 14 | } -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Editor/BarbarO.AutoAttributes.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "barbaro.autoattributes", 3 | "references": [ 4 | "GUID:c2f440c9fef6c8c40ac5c50eea18c599" 5 | ], 6 | "includePlatforms": [ 7 | "Editor" 8 | ], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": false, 12 | "precompiledReferences": [], 13 | "autoReferenced": true, 14 | "defineConstraints": [], 15 | "versionDefines": [], 16 | "noEngineReferences": false 17 | } -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ide.vscode": "1.2.5", 4 | "com.unity.test-framework": "1.1.29", 5 | "com.unity.ugui": "1.0.0", 6 | "com.unity.modules.ui": "1.0.0", 7 | "com.unity.modules.uielements": "1.0.0", 8 | "com.unity.modules.unitywebrequest": "1.0.0", 9 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 10 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 11 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 12 | "com.unity.modules.unitywebrequestwww": "1.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Visual Studio 2015 cache directory 9 | /.vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | # Unity3D generated meta files 27 | *.pidb.meta 28 | 29 | # Unity3D Generated File On Crash Reports 30 | sysinfo.txt 31 | 32 | # Builds 33 | *.apk 34 | 35 | \.vscode/ 36 | Logs 37 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/changelog.md: -------------------------------------------------------------------------------- 1 | v2.5.4 2 | - Fixed bug where Auto would not work on interfaces and abstract classes 3 | - Updated Readme 4 | - Added AddComponent_Auto extension methods 5 | 6 | v2.5.3 7 | - Removed some classes that were used for testing 8 | - Updated project to Unity 2020.3f 9 | 10 | v2.5.2 11 | - Added support for Additive scenes 12 | 13 | [...] 14 | 15 | v2.4.0 16 | - Project ufficially becomes a package 17 | - Updated Auto to Unity 2019.4 18 | - Removed use of dynamic word that would cause problems with Unity's compiler 19 | - Improved logging 20 | - Improved project structure 21 | -------------------------------------------------------------------------------- /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 | - PostProcessing 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/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 | - enabled: 1 9 | path: Assets/Auto_Attribute/Tests/Runtime/example-scene 1.unity 10 | guid: a4246202650c8e546bfdcf94c045b840 11 | - enabled: 1 12 | path: Assets/Auto_Attribute/Tests/Runtime/example-scene 2.unity 13 | guid: a888c0b1d9ffe644d913e127184cd549 14 | - enabled: 1 15 | path: Assets/Tests/Runtime/example-scene.unity 16 | guid: 9e246aa9f6ad69146bcbe7ff2b559155 17 | m_configObjects: {} 18 | -------------------------------------------------------------------------------- /Assets/Tests/AutoSingleTestHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | 4 | 5 | public class AutoSingleTestHelper : MonoBehaviour { 6 | 7 | [Auto] public MeshRenderer pub_meshRenderer; 8 | [Auto] private MeshRenderer priv_meshRenderer; 9 | [AutoChildren] public MeshRenderer[] pub_colldier_children; 10 | [AutoChildren] private MeshRenderer[] priv_colldier_children; 11 | 12 | [AutoParent] public AudioSource[] pub_audio_children; 13 | [AutoParent] private AudioSource[] priv_audio_children; 14 | public MeshRenderer PrivMeshRenderer => priv_meshRenderer; 15 | public AudioSource[] PrivAudioChildren => priv_audio_children; 16 | 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoEx.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Threading.Tasks; 4 | using Auto.Utils; 5 | using UnityEngine; 6 | 7 | public static class AutoEx 8 | { 9 | #region Instantiate_And_AssignAutoVariables 10 | 11 | public static T AddComponent_Auto(this GameObject go) where T : MonoBehaviour 12 | { 13 | T newComponent = go.AddComponent(); 14 | AutoAttributeManager.AutoReference(newComponent); 15 | 16 | return newComponent; 17 | } 18 | 19 | public static T AddComponent_Auto(this MonoBehaviour mb) where T : MonoBehaviour { 20 | return mb.gameObject.AddComponent_Auto(); 21 | } 22 | #endregion 23 | } 24 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/Utils/UnityObjectEx.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Assertions; 3 | 4 | namespace Auto.Utils 5 | { 6 | public static class UnityObjectEx 7 | { 8 | /// 9 | /// For instances of classes that are components, but don't have access to .gameObject (i.e. interfaces) 10 | /// 11 | /// The GameObject. 12 | public static GameObject GameObject(this object o) 13 | { 14 | Assert.IsTrue(o is Component, "The argument is not a component. Its type is " + o.GetType()); 15 | 16 | if ((Component)o == null) 17 | { 18 | return null; 19 | } 20 | else 21 | { 22 | return ((Component)o).gameObject; 23 | } 24 | } 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /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: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /Assets/AutoAttribute_Test.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public interface IInterface 6 | { 7 | 8 | } 9 | 10 | public class AutoAttribute_Test : MonoBehaviour, IInterface 11 | { 12 | // [Auto] private AutoAttribute_Test myself; 13 | [Auto] private IInterface myself_asInterface; 14 | 15 | public bool spawn = false; 16 | 17 | void Start() 18 | { 19 | // Debug.Assert(myself != null); 20 | Debug.Assert(myself_asInterface != null); 21 | 22 | myself_asInterface = gameObject.GetComponent(); 23 | Debug.Assert(myself_asInterface != null); 24 | 25 | if(spawn == false){ 26 | return; 27 | } 28 | var componentAdded = this.AddComponent_Auto(); 29 | Debug.Assert(componentAdded.myself_asInterface != null); 30 | 31 | } 32 | } -------------------------------------------------------------------------------- /packageDescription.md: -------------------------------------------------------------------------------- 1 | This package provides [Auto], [AutoParent] and [AutoChildren] attributes. \n 2 | \n 3 | They allow to automatically get/fetch references of components at the very start of the application. \n 4 | \n 5 | Using auto, getting your components is as simple as preprending the appropriate [Auto*] attribute to your variable declarations. \n 6 | \n 7 | Auto can be used with all access modifiers (private, protected, public), and all types (Unity components and custom monobehaviours). \n 8 | \n 9 | [AutoParent] and [AutoChildren] can be used either to get a single component, or get all the components as an array. \n 10 | \n 11 | Here are a couple of examples: \n 12 | \n 13 | \t[Auto] public Rigidbody myRb; \n 14 | \n 15 | \t[AutoParent] protected Collider[] myParentsColliders; \n 16 | \n 17 | \t[AutoChildren] private CustomScript scriptInOneOfChildren;\n -------------------------------------------------------------------------------- /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 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /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: 1 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_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 1 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/license.md: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 2 | 3 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 4 | 5 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /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: 224247031146467a181a031d353b5e1d061b1d6439262f2434 10 | flags: 0 11 | RecentlyUsedScenePath-1: 12 | value: 224247031146467a181a031d31374b021f150d3e29671425233d143ee7af003df1f325a6d52f3128300fea7301260032e2060c46e5080f05144eac4004f1190708 13 | flags: 0 14 | RecentlyUsedScenePath-2: 15 | value: 224247031146466f081d18315f114a1e021e152f632d3e3120391136aff3373dece276b8a92f31352d1b 16 | flags: 0 17 | vcSharedLogLevel: 18 | value: 0d5e400f0650 19 | flags: 0 20 | m_VCAutomaticAdd: 1 21 | m_VCDebugCom: 0 22 | m_VCDebugCmd: 0 23 | m_VCDebugOut: 0 24 | m_SemanticMergeMode: 2 25 | m_VCShowFailedCheckout: 1 26 | m_VCOverwriteFailedCheckoutAssets: 1 27 | m_VCProjectOverlayIcons: 1 28 | m_VCHierarchyOverlayIcons: 1 29 | m_VCOtherOverlayIcons: 1 30 | m_VCAllowAsyncUpdate: 0 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Oran 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Editor/ScriptOrderManagerEditor.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | 3 | using System; 4 | using UnityEditor; 5 | 6 | namespace Auto.Utils{ 7 | 8 | [InitializeOnLoad] 9 | public class ScriptExecutionManagerEditor : UnityEditor.AssetModificationProcessor 10 | { 11 | static ScriptExecutionManagerEditor() 12 | { 13 | foreach (MonoScript monoScript in MonoImporter.GetAllRuntimeMonoScripts()) 14 | { 15 | if (monoScript.GetClass() != null) 16 | { 17 | var scriptTimingAtt = Attribute.GetCustomAttribute(monoScript.GetClass(), typeof(ScriptTiming)) as ScriptTiming; 18 | if(scriptTimingAtt != null) 19 | { 20 | ProcessScriptTimingAttribute(monoScript, scriptTimingAtt); 21 | } 22 | } 23 | } 24 | 25 | EditorApplication.UnlockReloadAssemblies(); 26 | } 27 | 28 | private static void ProcessScriptTimingAttribute(MonoScript monoScript, ScriptTiming scriptTiming) 29 | { 30 | var currentTiming = MonoImporter.GetExecutionOrder(monoScript); 31 | var newTiming = scriptTiming.timing_offset; 32 | if (currentTiming != newTiming) 33 | MonoImporter.SetExecutionOrder(monoScript, newTiming); 34 | } 35 | 36 | } 37 | } 38 | 39 | #endif -------------------------------------------------------------------------------- /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: 7 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /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_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "barbaro.unity3d.auto", 3 | "version": "2.5.4", 4 | "displayName": "Auto Attribute", 5 | "description": "This package provides [Auto], [AutoParent] and [AutoChildren] attributes. \n\nThey allow to automatically get/fetch references of components at the very start of the application. \n\nUsing auto, getting your components is as simple as preprending the appropriate [Auto*] attribute to your variable declarations. \n\nAuto can be used with all access modifiers (private, protected, public), and all types (Unity components, custom monobehaviours, interfaces). \n\n[AutoParent] and [AutoChildren] can be used either to get a single component, or get all the components as an array. \n\nHere are a couple of examples: \n\n[Auto] public Rigidbody myRb; \n\n[AutoParent] protected Collider[] myParentsColliders; \n\n[AutoChildren] private CustomScript scriptInOneOfChildren;\n", 6 | "unity": "2020.3", 7 | "unityRelease": "23f1", 8 | "dependencies": { 9 | 10 | }, 11 | "keywords": [ 12 | "auto", 13 | "attribute", 14 | "utility", 15 | "tool", 16 | "development", 17 | "scripting" 18 | ], 19 | "author": { 20 | "name": "Oran Bar", 21 | "email": "baroran@hotmail.com" 22 | } 23 | } -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoReferencerOnInstantiation.cs: -------------------------------------------------------------------------------- 1 | /* Author: Oran Bar 2 | * Summary: If the instantiated object has this script prior to its instantiation, auto will reference all variables of attached components correctly. 3 | * The alsoReferenceChildren boolean will determine if the referencing has to be done recursively to all its children, or only on this gameobject. 4 | */ 5 | 6 | using UnityEngine; 7 | using Auto.Utils; 8 | 9 | [ScriptTiming(-500)] 10 | public class AutoReferencerOnInstantiation : MonoBehaviour { 11 | 12 | public bool alsoReferenceChildren = true; 13 | 14 | void Awake() 15 | { 16 | AutoAttributeManager.AutoReference(this.gameObject); 17 | 18 | if(alsoReferenceChildren) 19 | { 20 | foreach(Transform child in this.transform) 21 | { 22 | AutoAttributeManager.AutoReference(child.gameObject); 23 | } 24 | } 25 | } 26 | 27 | private void RecursivelyReferenceChildren(GameObject go) 28 | { 29 | AutoAttributeManager.AutoReference(go); 30 | 31 | foreach(Transform child in this.transform) 32 | { 33 | RecursivelyReferenceChildren(child.gameObject); 34 | } 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Documentation/AutoAttributes.rtf: -------------------------------------------------------------------------------- 1 | /* This is an example of a class using all variations of the Auto attribue 2 | */ 3 | 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using UnityEngine; 7 | 8 | 9 | public class AutoExampleUsage : MonoBehaviour { 10 | 11 | 12 | #region Single component Getters 13 | [Auto] public AutoExampleUsage mySelf; //Same as GetComponent() done in Awake 14 | [AutoParent] public AudioSource audioSource; //Same as GetComponentInParent() done in Awake 15 | [AutoChildren] public Collider firstCollider; //Same as GetComponentInChildren() done in Awake 16 | #endregion 17 | 18 | #region Multiple component Getters 19 | [AutoChildren] public Collider[] allChildrenColliders_Arr; //Same as GetComponentsInChildren() done in Awake 20 | #endregion 21 | 22 | #region Optional Parameters - Logging 23 | [Auto(true)] private CanvasGroup canvas1; //Passing true as parameter will log an error if the component was not found. This is the default 24 | [Auto(false)] public CanvasGroup canvas2; //Passing false as parameter will log a warning if the component was not found. 25 | #endregion 26 | 27 | void Awake () { 28 | firstCollider.isTrigger = true; //The variable is already referenced when awake starts 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoParentAttribute.cs: -------------------------------------------------------------------------------- 1 | /* Author: Oran Bar 2 | * Summary: This attribute automatically assigns a class variable to one of the gameobject's components; if nothing is found, it will continue to look for it going up the scene hiearchy (parents). 3 | * It acts as the equivalent of a GetComponentInParent call done in Awake. 4 | * Components that Auto has not been able to find are logged as errors in the console. 5 | * Using [Auto(true)], Auto will log warnings as opposed to errors. 6 | * 7 | * Usage example: 8 | * 9 | * public class Foo 10 | * { 11 | * [Auto] public BoxCollier myBoxCollier; //This assigns the variable to the BoxColider attached on your object 12 | * [Auto(true)] public Camera myCamera; //since we passed true as an argument, if the camera is not found, Auto will log a warning as opposed to an error, and won't halt the build. 13 | * 14 | * //[...] 15 | * } 16 | * 17 | */ 18 | 19 | using System; 20 | using UnityEngine; 21 | 22 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 23 | public class AutoParentAttribute : AutoFamily 24 | { 25 | protected override string GetMethodName() 26 | { 27 | return "GetComponentsInParent"; 28 | } 29 | 30 | protected override object GetTheSingleComponent(MonoBehaviour mb, Type componentType) 31 | { 32 | return mb.GetComponentInParent(componentType); 33 | } 34 | } -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoChildrenAttribute.cs: -------------------------------------------------------------------------------- 1 | /* Author: Oran Bar 2 | * Summary: This attribute automatically assigns a class variable to one of the gameobject's components; if nothing is found, it will continue to look for it going down the scene hiearchy (children). 3 | * It acts as the equivalent of a GetComponentInChildren call done in Awake. 4 | * Components that Auto has not been able to find are logged as errors in the console. 5 | * Using [Auto(true)], Auto will log warnings as opposed to errors. 6 | * 7 | * Usage example: 8 | * 9 | * public class Foo 10 | * { 11 | * [Auto] public BoxCollier myBoxCollier; //This assigns the variable to the BoxColider attached on your object 12 | * [Auto(true)] public Camera myCamera; //since we passed true as an argument, if the camera is not found, Auto will log a warning as opposed to an error, and won't halt the build. 13 | * 14 | * //[...] 15 | * } 16 | * 17 | */ 18 | 19 | 20 | using System; 21 | using UnityEngine; 22 | 23 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 24 | public class AutoChildrenAttribute : AutoFamily 25 | { 26 | protected override string GetMethodName() 27 | { 28 | return "GetComponentsInChildren"; 29 | } 30 | 31 | protected override object GetTheSingleComponent(MonoBehaviour mb, Type componentType) 32 | { 33 | return mb.GetComponentInChildren(componentType, true); 34 | } 35 | } -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/Utils/AutoUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Auto.Utils{ 5 | public static class AutoUtils 6 | { 7 | 8 | internal static Type GetElementType(Type seqType) 9 | { 10 | Type ienum = FindIEnumerable(seqType); 11 | if (ienum == null) return seqType; 12 | return ienum.GetGenericArguments()[0]; 13 | } 14 | 15 | // Credits to StackOverflow 16 | private static Type FindIEnumerable(Type seqType) 17 | { 18 | if (seqType == null || seqType == typeof(string)) 19 | { 20 | return null; 21 | } 22 | if (seqType.IsArray) 23 | { 24 | return typeof(IEnumerable<>).MakeGenericType(seqType.GetElementType()); 25 | } 26 | if (seqType.IsGenericType) 27 | { 28 | foreach (Type arg in seqType.GetGenericArguments()) 29 | { 30 | Type ienum = typeof(IEnumerable<>).MakeGenericType(arg); 31 | if (ienum.IsAssignableFrom(seqType)) 32 | { 33 | return ienum; 34 | } 35 | } 36 | } 37 | 38 | Type[] ifaces = seqType.GetInterfaces(); 39 | if (ifaces != null && ifaces.Length > 0) 40 | { 41 | foreach (Type iface in ifaces) 42 | { 43 | Type ienum = FindIEnumerable(iface); 44 | if (ienum != null) return ienum; 45 | } 46 | } 47 | if (seqType.BaseType != null && seqType.BaseType != typeof(object)) 48 | { 49 | return FindIEnumerable(seqType.BaseType); 50 | } 51 | return null; 52 | } 53 | 54 | } 55 | } -------------------------------------------------------------------------------- /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: 3 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_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /Assets/Tests/AutoSingleTestManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class AutoSingleTestManager : MonoBehaviour 6 | { 7 | public AutoSingleTestHelper activeWithAuto, inactiveWithAuto; 8 | public AutoSingleTestHelper_Child activeWithAuto_inherited, inactiveWithAuto_inherited; 9 | 10 | 11 | public void Awake() { 12 | Debug.Assert(activeWithAuto.pub_meshRenderer != null, "Auto on active go, public component not working"); 13 | Debug.Assert(activeWithAuto.PrivMeshRenderer != null, "Auto on active go, private component not working"); 14 | 15 | Debug.Assert(inactiveWithAuto.pub_meshRenderer != null, "Auto on inactive go, public component not working"); 16 | Debug.Assert(inactiveWithAuto.PrivMeshRenderer != null, "Auto on inactive go, private component not working"); 17 | // Debug.Assert(pub_meshRenderer_list != null, "Auto on public component list not working"); 18 | // Debug.Assert(priv_meshRenderer_list != null, "Auto on private component list not working"); 19 | Debug.Assert(activeWithAuto_inherited.pub_meshRenderer != null, "Auto inherited on active go, public component not working"); 20 | Debug.Assert(activeWithAuto_inherited.PrivMeshRenderer != null, "Auto inherited on active go, private component not working"); 21 | 22 | Debug.Assert(inactiveWithAuto_inherited.pub_meshRenderer != null, "Auto inherited on inactive go, public component not working"); 23 | Debug.Assert(inactiveWithAuto_inherited.PrivMeshRenderer != null, "Auto inherited on inactive go, private component not working"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Editor/AutoAttributeManagerEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using UnityEditor.SceneManagement; 4 | using System.Linq; 5 | 6 | [InitializeOnLoad] 7 | public class AutoAttributeManagerEditor : UnityEditor.AssetModificationProcessor 8 | { 9 | static AutoAttributeManagerEditor(){ 10 | } 11 | 12 | private static void MakeSureAutoManagerIsInScene() 13 | { 14 | var autoManagers = GameObject.FindObjectsOfType(true); 15 | bool noAutoAttributeManager_inScene = autoManagers == null || autoManagers.Length == 0; 16 | if (noAutoAttributeManager_inScene) { 17 | InstantiateAutoAttributeManager_InScene(); 18 | } 19 | else if (autoManagers.Length >=2) 20 | { 21 | autoManagers.Skip(1).ToList().ForEach(DestroyAutoAttributeManager); 22 | } 23 | } 24 | 25 | private static void DestroyAutoAttributeManager(AutoAttributeManager autoAttributeManager) 26 | { 27 | GameObject.DestroyImmediate(autoAttributeManager); 28 | EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene()); 29 | } 30 | 31 | private static void InstantiateAutoAttributeManager_InScene() { 32 | GameObject autoGo = new GameObject("Auto_Attribute_Manager"); 33 | autoGo.AddComponent(); 34 | //Make scene dirty, to notify it has changed following the creation of the AutoAttributeManager 35 | EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene()); 36 | } 37 | 38 | public static string[] OnWillSaveAssets(string[] paths) 39 | { 40 | MakeSureAutoManagerIsInScene(); 41 | var autoManager = GameObject.FindObjectOfType(); 42 | // autoManager.CacheMonobehavioursWithAuto(); 43 | return paths; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /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 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /asset_store_readme.md: -------------------------------------------------------------------------------- 1 | # AutoAttribute_unity3d
2 |
3 | # Auto Attributes
4 |
5 | This package provides 3 attributes:
6 | [Auto], [AutoParent], [AutoChildren]
7 |
8 | Autos are field/property attributes that allow to automatically get/fetch components' references at the very start of the application.
9 | This solution is presented as equivalent of having an Awake function containing GetComponent calls, without having to worry about ordering or disabled gameObjects.
10 |
11 | It runs before all other Awakes (using script execution ordering), so when Awake starts, one can assume that no variable with Auto will throw a null exception.
12 | In case a component couldn't be found, Auto will provide with descriptive logging.
13 |
14 | [AutoParent] and [AutoChildren] can also be used on Array variables and Lists, and respectively has the same behaviour you would expect from a T[] GetComponentsInParents() or T[] GetComponentsInChildren() call. 15 |
16 | Auto also works on inactive objects.
17 |
18 | Auto works by hooking into the awake function of a Manager monobehaviour script, which is automatically spawned in the scene whenever it is saved.
19 |
20 | # Instantiation
21 |
22 | In case of instantiated objects, please use the MonoBehaviour extension method this.Instantiate_And_AutoAssignVariables() to make sure Auto does the referencing before anyone else starts using that class
23 |
24 |
25 | # Requisites
26 |
27 | All scripts using Auto must have their script execution order delay < 990.
28 |
29 | # Installation
30 |
31 | As soon as the package is install, you can already make use of the Auto Attributes!
-------------------------------------------------------------------------------- /Assets/AssetStore_Assets/AssetStoreDescription.txt: -------------------------------------------------------------------------------- 1 | # Auto Attributes
2 |
3 | This package provides 3 attributes:
4 | [Auto], [AutoParent], [AutoChildren]
5 |
6 | 7 | 8 | - All variables with one of the three [Auto*] properties will automatically run a GetComponent call and set the value 9 | - Auto will assign the variables BEFORE Awake is called 10 | - Auto will work on private variables 11 | - Auto will work on inactive objects 12 | - Auto can work on Instantiated objects: replace any call of Istantiate([..]) to this.Instantiate_And_AutoAssignVariables([..]) 13 | - 14 | 15 | Autos are field/property attributes that allow to automatically get/fetch components' references when the application is started.
16 | This solution is presented as equivalent of having an Awake function containing GetComponent calls.
17 |
18 | It runs before all other Awakes (using script execution ordering), so whenever Awake starts execution, one can assume that no variable with Auto will throw a null exception.
19 | If a component is not found, Auto will provide descriptive logging.
20 |
21 | [AutoParent] and [AutoChildren] can also be used on Array variables, and respectively have the same behaviour you would expect from a T[] GetComponentsInParents() or T[] GetComponentsInChildren() call. 22 |
23 | Auto also works on inactive objects.
24 |
25 | Auto works by hooking into the awake function of a Manager monobehaviour script, which is automatically spawned in the scene whenever it is saved.
26 |
27 | # Instantiation
28 |
29 | In case of instantiated objects, please use the MonoBehaviour extension method this.Instantiate_And_AutoAssignVariables() to make sure Auto does the referencing before anyone else starts using that class
30 |
31 |
32 | # Requisites
33 |
34 | All scripts using Auto must have their script execution order delay < 990.
35 |
36 | # Installation
37 |
38 | As soon as the package is installed, you can already start making use of the Auto Attributes!
-------------------------------------------------------------------------------- /Assets/AssetStore_Assets/auto_icon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec9c2cc68f9d72b44bff900490c94ab3 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 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: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 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: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | bones: [] 80 | spriteID: 81 | internalID: 0 82 | vertices: [] 83 | indices: 84 | edges: [] 85 | weights: [] 86 | secondaryTextures: [] 87 | spritePackingTag: 88 | pSDRemoveMatte: 0 89 | pSDShowRemoveMatteOption: 0 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /Assets/AssetStore_Assets/autoattribute_card_image.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28764f374bc9d8a4ba8d7550196712f8 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 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: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 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: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | bones: [] 80 | spriteID: 81 | internalID: 0 82 | vertices: [] 83 | indices: 84 | edges: [] 85 | weights: [] 86 | secondaryTextures: [] 87 | spritePackingTag: 88 | pSDRemoveMatte: 0 89 | pSDShowRemoveMatteOption: 0 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /Assets/AssetStore_Assets/autoattribute_cover_img.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c335f62b16a1fa4da8e110b0be451a9 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 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: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 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: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | bones: [] 80 | spriteID: 81 | internalID: 0 82 | vertices: [] 83 | indices: 84 | edges: [] 85 | weights: [] 86 | secondaryTextures: [] 87 | spritePackingTag: 88 | pSDRemoveMatte: 0 89 | pSDShowRemoveMatteOption: 0 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoAttribute.cs: -------------------------------------------------------------------------------- 1 | /* Author: Oran Bar 2 | * Summary: This attribute automatically assigns a class variable to one of the gameobject's component. 3 | * It acts as the equivalent of a GetComponent call done in Awake. 4 | * Components that Auto has not been able to find are logged as errors in the console. 5 | * Using [Auto(true)], Auto will log warnings as opposed to errors. 6 | * This is important because, allowing Auto to log error will result in builds being halted whenever one of the [Auto] variables assignments was unsuccessful. 7 | * 8 | * Usage example: 9 | * 10 | * public class Foo 11 | * { 12 | * [Auto] public BoxCollier myBoxCollier; //This assigns the variable to the BoxColider attached on your object 13 | * [Auto(true)] public Camera myCamera; //since we passed true as an argument, if the camera is not found, Auto will log a warning as opposed to an error, and won't halt the build. 14 | * 15 | * //[...] 16 | * } 17 | * 18 | */ 19 | 20 | using System; 21 | using UnityEngine; 22 | 23 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 24 | public class AutoAttribute : Attribute, IAutoAttribute { 25 | 26 | private const string MonoBehaviourNameColor = "green"; //Changeme 27 | 28 | private bool logMissingAsError = true; 29 | 30 | private Component targetComponent; 31 | 32 | public AutoAttribute(bool logMissingAsError = true) 33 | { 34 | this.logMissingAsError = logMissingAsError; 35 | } 36 | 37 | /// 38 | /// Executes the call to fetch the component and assign it to the variable with [Auto*] 39 | /// 40 | public bool Execute(MonoBehaviour mb, Type componentType, Action SetVariableType) 41 | { 42 | GameObject go = mb.gameObject; 43 | 44 | Component componentToReference = go.GetComponent(componentType); 45 | if (componentToReference == null) 46 | { 47 | LogMissingComponent(mb, componentType, go); 48 | 49 | return false; 50 | } 51 | 52 | SetVariableType(mb, componentToReference); 53 | 54 | return true; 55 | } 56 | 57 | 58 | private void LogMissingComponent(MonoBehaviour mb, Type componentType, GameObject go){ 59 | string errorMessage = string.Format("[Auto]: {1} couldn't find {0} on {2}", 60 | componentType.Name, mb.GetType().Name, go.name, MonoBehaviourNameColor); 61 | 62 | if (logMissingAsError) 63 | { 64 | //Logging an error during PostProcessScene halts the build. 65 | Debug.LogError(errorMessage, mb); 66 | } 67 | else 68 | { 69 | Debug.LogWarning("" + errorMessage + "", mb); 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /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: 13 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_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 40 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 41 | m_PreloadedShaders: [] 42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 43 | type: 0} 44 | m_CustomRenderPipeline: {fileID: 0} 45 | m_TransparencySortMode: 0 46 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 47 | m_DefaultRenderingPath: 1 48 | m_DefaultMobileRenderingPath: 1 49 | m_TierSettings: [] 50 | m_LightmapStripping: 0 51 | m_FogStripping: 0 52 | m_InstancingStripping: 0 53 | m_LightmapKeepPlain: 1 54 | m_LightmapKeepDirCombined: 1 55 | m_LightmapKeepDynamicPlain: 1 56 | m_LightmapKeepDynamicDirCombined: 1 57 | m_LightmapKeepShadowMask: 1 58 | m_LightmapKeepSubtractive: 1 59 | m_FogKeepLinear: 1 60 | m_FogKeepExp: 1 61 | m_FogKeepExp2: 1 62 | m_AlbedoSwatchInfos: [] 63 | m_LightsUseLinearIntensity: 0 64 | m_LightsUseColorTemperature: 0 65 | m_LogWhenShaderIsCompiled: 0 66 | m_AllowEnlightenSupportForUpgradedProject: 1 67 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AutoAttribute_unity3d 2 | 3 | # Auto Attributes 4 | 5 | This package provides 3 attributes: 6 | [Auto], [AutoParent], [AutoChildren] 7 | 8 | Autos are field/property attributes that allow to automatically get/fetch components' references at the very start of the application. 9 | This solution is presented as equivalent of having an Awake function containing GetComponent calls, without having to worry about ordering or disabled gameObjects. 10 | 11 | It runs before all other Awakes (using script execution ordering), so when Awake starts, one can assume that no variable with Auto will throw a null exception. 12 | In case a component couldn't be found, Auto will provide with descriptive logging. 13 | 14 | [AutoParent] and [AutoChildren] can also be used on Array variables, and respectively has the same behaviour you would expect from a GetComponentsInParents() or GetComponentsInChildren() call. 15 | 16 | Auto also works on inactive objects and on private fields. 17 | 18 | Auto works by hooking into the awake function of a Manager MonoBehaviour script. 19 | The manager is automatically spawned whenever the scene whenever it is saved. 20 | 21 | # Instantiation 22 | 23 | In case of instantiated objects, attach the component AutoReferencer_OnInstantiation to the object that will be instantiated. 24 | This object will run its awake before any other component, requesting the Manager to reference the variables with the Auto attribute. 25 | 26 | # AddComponent 27 | 28 | Unfortunately, there is no easy and performant way to know when a component was added to a script. 29 | Becuase of that, Auto has a hard time dealing with an AddComponent call. 30 | If you need to do an AddComponent of a class that has variables with the [Auto*] attribute, Auto provides an extension method for MonoBehaviour scripts: 31 | AddComponent_Auto(). 32 | Calling this function, will make sure that the component is AutoReferences immediately after it was added. 33 | 34 | # Requisites 35 | 36 | All scripts using Auto must have their script execution order delay > -500 (This is the value used by the Auto scripts). 37 | 38 | # Installation 39 | 40 | ### Method 1: 41 | Add this line to the manifest.json file located in the Packages folder 42 | 43 | "barbaro.unity3d.auto": "https://github.com/OranBar/AutoAttribute-for-Unity3d.git?path=Assets/Auto_Attribute" 44 | 45 | ### Method 2: 46 | Open the package manager, and select "Add package from git URL". 47 | Paste this string as the URL: 48 | 49 | https://github.com/OranBar/AutoAttribute-for-Unity3d.git?path=Assets/Auto_Attribute 50 | 51 | ### Method 3: 52 | From the Releases page, download the unitypackage file, and import it in your project. 53 | 54 | As soon as the package is installed, you can already make use of the Auto Attributes! 55 | If you're using Assembly Definitions, remember to reference Auto's Assembly Definition **BarbarO.AutoAttributes.Runtime**. 56 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoFamily.cs: -------------------------------------------------------------------------------- 1 | /* Author: Oran Bar 2 | * This class contains the shared code for Auto attributes that fetch arrays of multiple components of the same type 3 | */ 4 | 5 | using System; 6 | using System.Linq; 7 | using System.Reflection; 8 | using UnityEngine; 9 | using Auto.Utils; 10 | 11 | public abstract class AutoFamily : Attribute, IAutoAttribute 12 | { 13 | private const string MonoBehaviourNameColor = "green"; 14 | private static ReflectionHelperMethods Rhm = new ReflectionHelperMethods(); 15 | 16 | private bool logErrorIfMissing = true; 17 | 18 | private Component targetComponent; 19 | 20 | public AutoFamily(bool getMadIfMissing = true) 21 | { 22 | this.logErrorIfMissing = getMadIfMissing; 23 | } 24 | 25 | public bool Execute(MonoBehaviour mb, Type componentType, Action setVariable) 26 | { 27 | GameObject go = mb.gameObject; 28 | 29 | if(componentType.IsArray){ 30 | return AssignArray(mb, go, componentType, setVariable); 31 | } else if ( 32 | Rhm.IsList(componentType)) 33 | { 34 | // Can't handle lists without using dynamic keyword. 35 | // Arrays will have to be enough. 36 | return false; 37 | } 38 | else 39 | { 40 | setVariable(mb, GetTheSingleComponent(mb, componentType)); 41 | return true; 42 | } 43 | } 44 | 45 | protected abstract object GetTheSingleComponent(MonoBehaviour mb, Type componentType); 46 | protected abstract string GetMethodName(); 47 | 48 | private object[] GetComponentsToReference(MonoBehaviour mb, GameObject go, Type componentType){ 49 | Type listElementType = AutoUtils.GetElementType(componentType); 50 | 51 | MethodInfo method = typeof(GameObject).GetMethods() 52 | .First(m => 53 | { 54 | bool result = true; 55 | result = result && m.Name == GetMethodName(); 56 | result = result && m.IsGenericMethod; 57 | result = result && m.GetParameters().Length == 1; 58 | result = result && m.GetParameters()[0].ParameterType == typeof(bool); 59 | return result; 60 | }); 61 | //we want to pass true as arg, to get from inactive objs too 62 | MethodInfo generic = method.MakeGenericMethod(listElementType); 63 | object[] componentsToReference = generic.Invoke(go, new object[] { true }) as object[]; 64 | 65 | return componentsToReference; 66 | } 67 | 68 | private bool AssignArray(MonoBehaviour mb, GameObject go, Type componentType, Action setVariable) 69 | { 70 | object[] componentsToReference = GetComponentsToReference(mb, go, componentType); 71 | 72 | if (logErrorIfMissing && componentsToReference.Length == 0) { 73 | Debug.LogError( 74 | string.Format("[Auto]: {1} couldn't find any components {0} on {2}.", 75 | componentType.Name, mb.GetType().Name, go.name, MonoBehaviourNameColor) 76 | , go); 77 | return false; 78 | } 79 | 80 | setVariable(mb, componentsToReference); 81 | return true; 82 | } 83 | 84 | 85 | } 86 | -------------------------------------------------------------------------------- /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.vscode": { 11 | "version": "1.2.5", 12 | "depth": 0, 13 | "source": "registry", 14 | "dependencies": {}, 15 | "url": "https://packages.unity.com" 16 | }, 17 | "com.unity.test-framework": { 18 | "version": "1.1.29", 19 | "depth": 0, 20 | "source": "registry", 21 | "dependencies": { 22 | "com.unity.ext.nunit": "1.0.6", 23 | "com.unity.modules.imgui": "1.0.0", 24 | "com.unity.modules.jsonserialize": "1.0.0" 25 | }, 26 | "url": "https://packages.unity.com" 27 | }, 28 | "com.unity.ugui": { 29 | "version": "1.0.0", 30 | "depth": 0, 31 | "source": "builtin", 32 | "dependencies": { 33 | "com.unity.modules.ui": "1.0.0", 34 | "com.unity.modules.imgui": "1.0.0" 35 | } 36 | }, 37 | "com.unity.modules.assetbundle": { 38 | "version": "1.0.0", 39 | "depth": 1, 40 | "source": "builtin", 41 | "dependencies": {} 42 | }, 43 | "com.unity.modules.audio": { 44 | "version": "1.0.0", 45 | "depth": 1, 46 | "source": "builtin", 47 | "dependencies": {} 48 | }, 49 | "com.unity.modules.imageconversion": { 50 | "version": "1.0.0", 51 | "depth": 1, 52 | "source": "builtin", 53 | "dependencies": {} 54 | }, 55 | "com.unity.modules.imgui": { 56 | "version": "1.0.0", 57 | "depth": 1, 58 | "source": "builtin", 59 | "dependencies": {} 60 | }, 61 | "com.unity.modules.jsonserialize": { 62 | "version": "1.0.0", 63 | "depth": 1, 64 | "source": "builtin", 65 | "dependencies": {} 66 | }, 67 | "com.unity.modules.ui": { 68 | "version": "1.0.0", 69 | "depth": 0, 70 | "source": "builtin", 71 | "dependencies": {} 72 | }, 73 | "com.unity.modules.uielements": { 74 | "version": "1.0.0", 75 | "depth": 0, 76 | "source": "builtin", 77 | "dependencies": { 78 | "com.unity.modules.ui": "1.0.0", 79 | "com.unity.modules.imgui": "1.0.0", 80 | "com.unity.modules.jsonserialize": "1.0.0", 81 | "com.unity.modules.uielementsnative": "1.0.0" 82 | } 83 | }, 84 | "com.unity.modules.uielementsnative": { 85 | "version": "1.0.0", 86 | "depth": 1, 87 | "source": "builtin", 88 | "dependencies": { 89 | "com.unity.modules.ui": "1.0.0", 90 | "com.unity.modules.imgui": "1.0.0", 91 | "com.unity.modules.jsonserialize": "1.0.0" 92 | } 93 | }, 94 | "com.unity.modules.unitywebrequest": { 95 | "version": "1.0.0", 96 | "depth": 0, 97 | "source": "builtin", 98 | "dependencies": {} 99 | }, 100 | "com.unity.modules.unitywebrequestassetbundle": { 101 | "version": "1.0.0", 102 | "depth": 0, 103 | "source": "builtin", 104 | "dependencies": { 105 | "com.unity.modules.assetbundle": "1.0.0", 106 | "com.unity.modules.unitywebrequest": "1.0.0" 107 | } 108 | }, 109 | "com.unity.modules.unitywebrequestaudio": { 110 | "version": "1.0.0", 111 | "depth": 0, 112 | "source": "builtin", 113 | "dependencies": { 114 | "com.unity.modules.unitywebrequest": "1.0.0", 115 | "com.unity.modules.audio": "1.0.0" 116 | } 117 | }, 118 | "com.unity.modules.unitywebrequesttexture": { 119 | "version": "1.0.0", 120 | "depth": 0, 121 | "source": "builtin", 122 | "dependencies": { 123 | "com.unity.modules.unitywebrequest": "1.0.0", 124 | "com.unity.modules.imageconversion": "1.0.0" 125 | } 126 | }, 127 | "com.unity.modules.unitywebrequestwww": { 128 | "version": "1.0.0", 129 | "depth": 0, 130 | "source": "builtin", 131 | "dependencies": { 132 | "com.unity.modules.unitywebrequest": "1.0.0", 133 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 134 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 135 | "com.unity.modules.audio": "1.0.0", 136 | "com.unity.modules.assetbundle": "1.0.0", 137 | "com.unity.modules.imageconversion": "1.0.0" 138 | } 139 | } 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /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: 4 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 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 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 2 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 40 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 1 136 | antiAliasing: 4 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 1 164 | antiAliasing: 4 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSP2: 2 183 | Standalone: 5 184 | Tizen: 2 185 | WebGL: 3 186 | WiiU: 5 187 | Windows Store Apps: 5 188 | XboxOne: 5 189 | iPhone: 2 190 | tvOS: 2 191 | -------------------------------------------------------------------------------- /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": 0, 121 | "supportsModification": false 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/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 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/AutoAttributeManager.cs: -------------------------------------------------------------------------------- 1 | /* Author: Oran Bar 2 | * Summary: 3 | * 4 | * This class executes the code to automatically set the references of the variables with the Auto attribute. 5 | * The code is executed at the beginning of the scene, 500 milliseconds before other Awake calls. (This is done using the ScriptTiming attribute, and can be changed manually) 6 | * Afterwards, all Auto variables will be assigned, and, in case of errors, [Auto] will log on the console with more info. 7 | 8 | * AutoAttributeManager will sneak into your scene upon saving it. 9 | * Don't be afraid of this little script. Apart from setting a few [Auto] variables, It's harmless. 10 | * Let him live happly in your scene. You'll learn to like him. 11 | * 12 | * If the #define DEB on top of this script is uncommented, Auto will log data about its performance in the console. 13 | * 14 | * Copyrights to Oran Bar™ 15 | */ 16 | 17 | 18 | #define DEB 19 | using System; 20 | using System.Collections.Generic; 21 | using System.Diagnostics; 22 | using System.Linq; 23 | using System.Reflection; 24 | using Auto.Utils; 25 | using UnityEngine; 26 | using UnityEngine.SceneManagement; 27 | 28 | 29 | [Auto.Utils.ScriptTiming(-500)] 30 | public class AutoAttributeManager : MonoBehaviour 31 | { 32 | 33 | private List monoBehavioursInSceneWithAuto = new List(); 34 | 35 | private void Awake() 36 | { 37 | SweeepScene(); 38 | } 39 | 40 | public static void AutoReference(GameObject targetGo) 41 | { 42 | AutoReference(targetGo, out _, out _); 43 | } 44 | 45 | public static void AutoReference(MonoBehaviour mb) 46 | { 47 | AutoReference(mb, out _, out _); 48 | } 49 | 50 | public static void AutoReference(GameObject targetGo, out int successfulAssigments, out int failedAssignments) 51 | { 52 | successfulAssigments = 0; 53 | failedAssignments = 0; 54 | 55 | foreach(var mb in targetGo.GetComponents(true)) 56 | { 57 | AutoReference(mb, out int successes, out int failures); 58 | successfulAssigments += successes; 59 | failedAssignments += failures; 60 | } 61 | } 62 | 63 | public static void AutoReference(MonoBehaviour targetMb, out int successfullyAssigments, out int failedAssignments) 64 | { 65 | successfullyAssigments = 0; 66 | failedAssignments = 0; 67 | 68 | //Fields 69 | IEnumerable fields = GetFieldsWithAuto(targetMb); 70 | 71 | foreach (var field in fields) 72 | { 73 | foreach (IAutoAttribute autoAttribute in field.GetCustomAttributes(typeof(IAutoAttribute), true)) 74 | { 75 | bool result = autoAttribute.Execute(targetMb, field.FieldType, (mb, val) => field.SetValue(mb, val)); 76 | if(result){ 77 | successfullyAssigments++; 78 | }else{ 79 | failedAssignments++; 80 | } 81 | } 82 | } 83 | 84 | //Properties 85 | IEnumerable properties = GetPropertiesWithAuto(targetMb); 86 | 87 | foreach (var prop in properties) 88 | { 89 | foreach (IAutoAttribute autofind in prop.GetCustomAttributes(typeof(IAutoAttribute), true)) 90 | { 91 | bool result = autofind.Execute(targetMb, prop.PropertyType, (mb, val) => prop.SetValue(mb, val)); 92 | if(result){ 93 | successfullyAssigments++; 94 | }else{ 95 | failedAssignments++; 96 | } 97 | } 98 | } 99 | } 100 | 101 | public void SweeepScene() 102 | { 103 | #if DEB 104 | Stopwatch sw = new Stopwatch(); 105 | 106 | sw.Start(); 107 | #endif 108 | IEnumerable monoBehaviours = null; 109 | if(monoBehavioursInSceneWithAuto?.Any() != true){ 110 | //Fallback if, for some reason, the monobehaviours were not previously cached 111 | monoBehaviours = GetAllMonobehavioursWithAuto(); 112 | } else { 113 | monoBehaviours = monoBehavioursInSceneWithAuto; 114 | } 115 | 116 | int autoVarialbesAssigned_count = 0; 117 | int autoVarialbesNotAssigned_count = 0; 118 | 119 | foreach (var mb in monoBehaviours) 120 | { 121 | AutoReference(mb, out int succ, out int fail); 122 | autoVarialbesAssigned_count += succ; 123 | autoVarialbesNotAssigned_count += fail; 124 | } 125 | 126 | #if DEB 127 | sw.Stop(); 128 | 129 | int variablesAnalized = monoBehaviours 130 | .Select(mb => mb.GetType()) 131 | .Aggregate(0, (agg, mbType) => 132 | agg = agg + mbType.GetFields().Count() + mbType.GetProperties().Count() 133 | ); 134 | 135 | int variablesWithAuto = monoBehaviours 136 | .Aggregate(0, (agg, mb) => 137 | agg = agg + GetFieldsWithAuto(mb).Count() + GetPropertiesWithAuto(mb).Count() 138 | ); 139 | 140 | string result_color = (autoVarialbesNotAssigned_count > 0) ? "red" : "green"; 141 | UnityEngine.Debug.LogFormat("[Auto] Assigned {4}/{2} [Auto*] variables in {3} Milliseconds - Analized {0} MonoBehaviours and {1} variables", 142 | monoBehavioursInSceneWithAuto.Count(), variablesAnalized, variablesWithAuto, sw.ElapsedMilliseconds, autoVarialbesAssigned_count, autoVarialbesAssigned_count+autoVarialbesNotAssigned_count, result_color ); 143 | #endif 144 | } 145 | 146 | // public void CacheMonobehavioursWithAuto(){ 147 | // var start = Time.time; 148 | // monoBehavioursInSceneWithAuto = GetAllMonobehavioursWithAuto().ToList(); 149 | // UnityEngine.Debug.Log($"Cached {monoBehavioursInSceneWithAuto.Count} MonoBehaviours in {Time.time - start} mills"); 150 | // } 151 | 152 | private IEnumerable GetAllMonobehavioursWithAuto(){ 153 | 154 | IEnumerable monoBehaviours = GameObject.FindObjectsOfType(true) 155 | .Where(mb => mb.gameObject.scene == this.gameObject.scene); 156 | 157 | monoBehaviours = monoBehaviours.Where(mb => GetFieldsWithAuto(mb).Count() + GetPropertiesWithAuto(mb).Count() > 0); 158 | 159 | return monoBehaviours; 160 | } 161 | 162 | private static IEnumerable GetFieldsWithAuto(MonoBehaviour mb) 163 | { 164 | ReflectionHelperMethods rhm = new ReflectionHelperMethods(); 165 | 166 | return mb.GetType() 167 | .GetFields(BindingFlags.Instance | BindingFlags.Public) 168 | .Where(prop => prop.FieldType.IsPrimitive == false) 169 | .Where(prop => Attribute.IsDefined(prop, typeof(AutoAttribute)) || 170 | Attribute.IsDefined(prop, typeof(AutoChildrenAttribute)) || 171 | Attribute.IsDefined(prop, typeof(AutoParentAttribute)) 172 | ) 173 | .Concat( 174 | rhm.GetNonPublicFieldsInBaseClasses(mb.GetType()) 175 | .Where(prop => prop.FieldType.IsPrimitive == false) 176 | .Where(prop => Attribute.IsDefined(prop, typeof(AutoAttribute)) || 177 | Attribute.IsDefined(prop, typeof(AutoChildrenAttribute)) || 178 | Attribute.IsDefined(prop, typeof(AutoParentAttribute)) 179 | ) 180 | ); 181 | } 182 | 183 | private static IEnumerable GetPropertiesWithAuto(MonoBehaviour mb) 184 | { 185 | ReflectionHelperMethods rhm = new ReflectionHelperMethods(); 186 | 187 | return mb.GetType() 188 | .GetProperties(BindingFlags.Instance | BindingFlags.Public) 189 | .Where(prop => prop.PropertyType.IsPrimitive == false) 190 | .Where(prop => Attribute.IsDefined(prop, typeof(AutoAttribute)) || 191 | Attribute.IsDefined(prop, typeof(AutoChildrenAttribute)) || 192 | Attribute.IsDefined(prop, typeof(AutoParentAttribute)) 193 | ) 194 | .Concat( 195 | rhm.GetNonPublicPropertiesInBaseClasses(mb.GetType()) 196 | .Where(prop => prop.PropertyType.IsPrimitive == false) 197 | .Where(prop => Attribute.IsDefined(prop, typeof(AutoAttribute)) || 198 | Attribute.IsDefined(prop, typeof(AutoChildrenAttribute)) || 199 | Attribute.IsDefined(prop, typeof(AutoParentAttribute)) 200 | ) 201 | ); 202 | } 203 | } -------------------------------------------------------------------------------- /Assets/example-scene 1.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: 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.37311953, g: 0.38074014, b: 0.3587274, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 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: 1 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: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 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_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &707698999 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 707699001} 135 | - component: {fileID: 707699000} 136 | - component: {fileID: 707699002} 137 | m_Layer: 0 138 | m_Name: Auto_Attribute_Manager 139 | m_TagString: Untagged 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!114 &707699000 145 | MonoBehaviour: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 707698999} 151 | m_Enabled: 1 152 | m_EditorHideFlags: 0 153 | m_Script: {fileID: 11500000, guid: b707ec86924986a42bd79edd38a34af8, type: 3} 154 | m_Name: 155 | m_EditorClassIdentifier: 156 | --- !u!4 &707699001 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: 707698999} 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: 0 169 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 170 | --- !u!82 &707699002 171 | AudioSource: 172 | m_ObjectHideFlags: 0 173 | m_CorrespondingSourceObject: {fileID: 0} 174 | m_PrefabInstance: {fileID: 0} 175 | m_PrefabAsset: {fileID: 0} 176 | m_GameObject: {fileID: 707698999} 177 | m_Enabled: 1 178 | serializedVersion: 4 179 | OutputAudioMixerGroup: {fileID: 0} 180 | m_audioClip: {fileID: 0} 181 | m_PlayOnAwake: 1 182 | m_Volume: 1 183 | m_Pitch: 1 184 | Loop: 0 185 | Mute: 0 186 | Spatialize: 0 187 | SpatializePostEffects: 0 188 | Priority: 128 189 | DopplerLevel: 1 190 | MinDistance: 1 191 | MaxDistance: 500 192 | Pan2D: 0 193 | rolloffMode: 0 194 | BypassEffects: 0 195 | BypassListenerEffects: 0 196 | BypassReverbZones: 0 197 | rolloffCustomCurve: 198 | serializedVersion: 2 199 | m_Curve: 200 | - serializedVersion: 3 201 | time: 0 202 | value: 1 203 | inSlope: 0 204 | outSlope: 0 205 | tangentMode: 0 206 | weightedMode: 0 207 | inWeight: 0.33333334 208 | outWeight: 0.33333334 209 | - serializedVersion: 3 210 | time: 1 211 | value: 0 212 | inSlope: 0 213 | outSlope: 0 214 | tangentMode: 0 215 | weightedMode: 0 216 | inWeight: 0.33333334 217 | outWeight: 0.33333334 218 | m_PreInfinity: 2 219 | m_PostInfinity: 2 220 | m_RotationOrder: 4 221 | panLevelCustomCurve: 222 | serializedVersion: 2 223 | m_Curve: 224 | - serializedVersion: 3 225 | time: 0 226 | value: 0 227 | inSlope: 0 228 | outSlope: 0 229 | tangentMode: 0 230 | weightedMode: 0 231 | inWeight: 0.33333334 232 | outWeight: 0.33333334 233 | m_PreInfinity: 2 234 | m_PostInfinity: 2 235 | m_RotationOrder: 4 236 | spreadCustomCurve: 237 | serializedVersion: 2 238 | m_Curve: 239 | - serializedVersion: 3 240 | time: 0 241 | value: 0 242 | inSlope: 0 243 | outSlope: 0 244 | tangentMode: 0 245 | weightedMode: 0 246 | inWeight: 0.33333334 247 | outWeight: 0.33333334 248 | m_PreInfinity: 2 249 | m_PostInfinity: 2 250 | m_RotationOrder: 4 251 | reverbZoneMixCustomCurve: 252 | serializedVersion: 2 253 | m_Curve: 254 | - serializedVersion: 3 255 | time: 0 256 | value: 1 257 | inSlope: 0 258 | outSlope: 0 259 | tangentMode: 0 260 | weightedMode: 0 261 | inWeight: 0.33333334 262 | outWeight: 0.33333334 263 | m_PreInfinity: 2 264 | m_PostInfinity: 2 265 | m_RotationOrder: 4 266 | --- !u!1 &724927563 267 | GameObject: 268 | m_ObjectHideFlags: 0 269 | m_CorrespondingSourceObject: {fileID: 0} 270 | m_PrefabInstance: {fileID: 0} 271 | m_PrefabAsset: {fileID: 0} 272 | serializedVersion: 6 273 | m_Component: 274 | - component: {fileID: 724927565} 275 | - component: {fileID: 724927564} 276 | m_Layer: 0 277 | m_Name: GameObject (1) 278 | m_TagString: Untagged 279 | m_Icon: {fileID: 0} 280 | m_NavMeshLayer: 0 281 | m_StaticEditorFlags: 0 282 | m_IsActive: 1 283 | --- !u!114 &724927564 284 | MonoBehaviour: 285 | m_ObjectHideFlags: 0 286 | m_CorrespondingSourceObject: {fileID: 0} 287 | m_PrefabInstance: {fileID: 0} 288 | m_PrefabAsset: {fileID: 0} 289 | m_GameObject: {fileID: 724927563} 290 | m_Enabled: 1 291 | m_EditorHideFlags: 0 292 | m_Script: {fileID: 11500000, guid: 77536cd48f22197438311638d94372a2, type: 3} 293 | m_Name: 294 | m_EditorClassIdentifier: 295 | --- !u!4 &724927565 296 | Transform: 297 | m_ObjectHideFlags: 0 298 | m_CorrespondingSourceObject: {fileID: 0} 299 | m_PrefabInstance: {fileID: 0} 300 | m_PrefabAsset: {fileID: 0} 301 | m_GameObject: {fileID: 724927563} 302 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 303 | m_LocalPosition: {x: 0, y: 0, z: 0} 304 | m_LocalScale: {x: 1, y: 1, z: 1} 305 | m_Children: [] 306 | m_Father: {fileID: 0} 307 | m_RootOrder: 1 308 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 309 | -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/Utils/GameObjectEx.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | using System; 4 | using System.Linq; 5 | using SceneManager = UnityEngine.SceneManagement.SceneManager; 6 | 7 | namespace Auto.Utils{ 8 | public static class GameObjectEx 9 | { 10 | 11 | /// 12 | /// Same as GameObject.FindObjectsOfType, but also get inactive objects 13 | /// 14 | /// 15 | /// 16 | public static T[] FindAllOfType() where T : UnityEngine.Object 17 | { 18 | if (typeof(T) == typeof(GameObject)) 19 | { 20 | throw new Exception("Use Transform instead of GameObject when calling GameObjectEx.FindAllOfType<>"); 21 | } 22 | 23 | return Resources.FindObjectsOfTypeAll() 24 | .Where(obj => obj.GameObject().scene == SceneManager.GetActiveScene()) 25 | .ToArray(); 26 | } 27 | 28 | /// 29 | /// Generic version of Instantiate 30 | /// 31 | public static T Instantiate(T prefab) where T : Component 32 | { 33 | return (T)UnityEngine.Object.Instantiate(prefab); 34 | } 35 | 36 | /// 37 | /// Generic version of Instantiate 38 | /// 39 | public static T Instantiate(T prefab, Vector3 position, Quaternion rotation) where T : Component 40 | { 41 | var newObj = Instantiate(prefab); 42 | 43 | newObj.transform.position = position; 44 | newObj.transform.rotation = rotation; 45 | 46 | return newObj; 47 | } 48 | 49 | /// 50 | /// If a component of type T is already attached to the target go, that component is returned. Else, the component is added. 51 | /// Useful to avoid duplication of the same component on objects when adding new components, since usually only one is needed. 52 | /// 53 | public static T AddOrGetComponent(this GameObject go, out bool wasComponentAdded) where T : Component 54 | { 55 | T myComponent = go.GetComponent(); 56 | wasComponentAdded = myComponent == null; 57 | return (myComponent != null) ? myComponent : go.AddComponent(); 58 | } 59 | 60 | public static Component AddOrGetComponent(this GameObject go, Type componentType, out bool wasComponentAdded) 61 | { 62 | Component myComponent = go.GetComponent(componentType); 63 | wasComponentAdded = myComponent == null; 64 | return (myComponent != null) ? myComponent : go.AddComponent(componentType); 65 | } 66 | 67 | 68 | /// 69 | /// If a component of type T is already attached to the target go, that component is returned. Else, the component is added. 70 | /// Useful to avoid duplication of the same component on objects when adding new components, since usually only one is needed. 71 | /// 72 | //[System.Obsolete("Use AddOrGetComponent")] 73 | public static T GetOrAddComponent(this GameObject go) where T : Component 74 | { 75 | T myComponent = go.GetComponent(); 76 | return (myComponent != null) ? myComponent : go.AddComponent(); 77 | } 78 | 79 | /// 80 | /// If a component of type T is already attached to the target go, that component is returned. Else, the component is added. 81 | /// Useful to avoid duplication of the same component on objects when adding new components, since usually only one is needed. 82 | /// 83 | public static T AddOrGetComponent(this GameObject go) where T : Component 84 | { 85 | bool wasComponentAdded; 86 | return go.AddOrGetComponent(out wasComponentAdded); 87 | } 88 | 89 | 90 | public static Component AddOrGetComponent(this GameObject go, Type componentType) 91 | { 92 | Component myComponent = go.GetComponent(componentType); 93 | return (myComponent != null) ? myComponent : go.AddComponent(componentType); 94 | } 95 | 96 | 97 | #region GetComponent 98 | 99 | public static Component GetComponent(this GameObject go, Type componentType, bool includeInactiveObjects) 100 | { 101 | foreach (var component in go.GetComponentsInChildren(componentType, includeInactiveObjects)) 102 | { 103 | if (component.GameObject() != go) 104 | { 105 | break; 106 | } 107 | return component; 108 | } 109 | return null; 110 | } 111 | 112 | public static T GetComponent(this GameObject go, bool includeInactiveObjects) 113 | { 114 | if (go.activeSelf) 115 | { 116 | return go.GetComponent(); 117 | } 118 | 119 | T result = default(T); 120 | foreach (var component in go.GetComponentsInChildren(includeInactiveObjects)) 121 | { 122 | if (component.GameObject() != go) 123 | { 124 | break; 125 | } 126 | if (component is T) 127 | { 128 | result = (T)component; 129 | break; 130 | } 131 | } 132 | 133 | return result; 134 | } 135 | 136 | 137 | public static T[] GetComponents(this GameObject go, bool includeInactiveObjects) where T : Component 138 | { 139 | List result = new List(); 140 | foreach (var component in go.GetComponentsInChildren(includeInactiveObjects)) 141 | { 142 | //In case the monoBehaviour is missing, the component will be be null. 143 | if (component == null) { continue; } 144 | 145 | 146 | if (component.GameObject() != go) 147 | { 148 | break; 149 | } 150 | if (component is T) 151 | { 152 | result.Add((T)component); 153 | } 154 | } 155 | return result.ToArray(); 156 | } 157 | 158 | public static Component GetComponentInParent(this GameObject go, Type componentType, bool includeInactiveObjects) 159 | { 160 | Component result = null; 161 | 162 | do 163 | { 164 | result = go.GetComponent(componentType, true); 165 | go = go.transform?.parent.gameObject; 166 | } while (result == null && go != null); 167 | 168 | return result; 169 | } 170 | 171 | public static Component GetComponentInParent(this GameObject go, bool includeInactiveObjects) where T : Component 172 | { 173 | return go.GetComponentInParent(typeof(T), includeInactiveObjects); 174 | } 175 | 176 | /// 177 | /// This method will immediately throw an exception if the component is not found. Use this when the T component is necessary for the correct execution of the program, 178 | /// as opposed to a normal GetComponent with a null check 179 | /// 180 | public static T GetRequiredComponent(this GameObject thisGameobject, bool includeInactiveObjects = false) 181 | { 182 | var retrievedComponent = thisGameobject.GetComponent(includeInactiveObjects); 183 | if (retrievedComponent is Component == false) 184 | { 185 | string msg = string.Format("Script {1} on GameObject \"{0}\" does not have the required component of type {2}", thisGameobject.name, typeof(T).Name, typeof(T)); 186 | throw new Exception(msg); 187 | } 188 | //Debug.Assert(retrievedComponent is Component, 189 | // string.Format("Script {1} on GameObject \"{0}\" does not have the required component of type {2}", thisGameobject.name, thisGameobject.GetType(), typeof(T)), thisGameobject); 190 | 191 | return retrievedComponent; 192 | } 193 | /// 194 | /// This method will immediately throw an exception if no component is found. Use this when the T component is necessary for the correct execution of the program, 195 | /// as opposed to a normal GetComponent with a null check 196 | /// 197 | public static T GetRequiredComponentInChildren(this GameObject thisGameobject, bool includeInactiveObjects = false) 198 | { 199 | var retrievedComponent = thisGameobject.GetComponentInChildren(includeInactiveObjects); 200 | if (retrievedComponent != null) 201 | { 202 | string msg = string.Format("Script {1} on GameObject \"{0}\" does not have a child with component of type {2}", thisGameobject.name, thisGameobject.GetType(), typeof(T)); 203 | throw new Exception(msg); 204 | } 205 | //Assert.IsNotNull(retrievedComponent as Component, 206 | // string.Format("Script {1} on GameObject \"{0}\" (NetId={3}) does not have a child with component of type {2}", thisGameobject.name, thisGameobject.GetType(), typeof(T), thisGameobject.GetNetId()); 207 | 208 | return retrievedComponent; 209 | } 210 | 211 | /// 212 | /// This method will immediately throw an exception if no component is found. Use this when the T component is necessary for the correct execution of the program, 213 | /// as opposed to a normal GetComponent with a null check 214 | /// 215 | public static T GetRequiredComponentInParent(this GameObject thisGameobject) 216 | { 217 | var retrievedComponent = thisGameobject.GetComponentInParent(); 218 | if (retrievedComponent == null) 219 | { 220 | string msg = string.Format("Script {1} on GameObject \"{0}\" does not have a parent with component of type {2}", thisGameobject.name, thisGameobject.GetType(), typeof(T)); 221 | throw new Exception(msg); 222 | } 223 | //Assert.IsNotNull(retrievedComponent as Component, 224 | // string.Format("Script {1} on GameObject \"{0}\" (NetId={3}) does not have a parent with component of type {2}", thisGameobject.name, thisGameobject.GetType(), typeof(T), thisGameobject.GetNetId()); 225 | 226 | return retrievedComponent; 227 | } 228 | 229 | public static T FindComponentInChildWithTag(this GameObject parent, string tag, bool forceActive = false) where T : Component 230 | { 231 | if (parent == null) { throw new System.ArgumentNullException(); } 232 | if (string.IsNullOrEmpty(tag) == true) { throw new System.ArgumentNullException(); } 233 | 234 | T[] list = parent.GetComponentsInChildren(forceActive); 235 | foreach (T t in list) 236 | { 237 | if (t.CompareTag(tag) == true) 238 | { 239 | return t; 240 | } 241 | } 242 | return null; 243 | } 244 | 245 | #endregion 246 | } 247 | 248 | 249 | namespace OranUnityUtils 250 | { 251 | public static class GameObjectEx1 252 | { 253 | 254 | /// 255 | /// This method returns the first component in parent excluding the one who called it. 256 | /// 257 | public static T GetComponentInParentExceptThis(this GameObject go) where T : Component 258 | { 259 | if (go.transform.parent == null) 260 | { 261 | Debug.LogWarning("There are no parents"); 262 | return null; 263 | } 264 | 265 | return go.transform.parent.GetComponentInParent(); 266 | } 267 | 268 | /// 269 | /// This method returns the first component in children excluding the one who called it. 270 | /// 271 | public static T GetComponentInChildrenExceptThis(this GameObject go) where T : Component 272 | { 273 | T[] components = go.GetComponentsInChildren().ToArray(); 274 | T component = null; 275 | for (int i = 0; i < components.Length; i++) 276 | { 277 | if (components[i].gameObject == go) continue; 278 | else { component = components[i]; break; } 279 | } 280 | return component; 281 | } 282 | 283 | /// 284 | /// This method returns all components in parent excluding the one who called it. 285 | /// 286 | public static T[] GetComponentsInParentExceptThis(this GameObject go) where T : Component 287 | { 288 | if (go.transform.parent == null) 289 | { 290 | Debug.LogWarning("There are no parents"); 291 | return null; 292 | } 293 | 294 | return go.transform.parent.GetComponentsInParent(); 295 | } 296 | 297 | /// 298 | /// This method returns all components in children excluding the one who called it. 299 | /// 300 | public static T[] GetComponentsInChildrenExceptThis(this GameObject go) where T : Component 301 | { 302 | return go.GetComponentsInChildren().Where(myGo => myGo.gameObject != go).ToArray(); 303 | } 304 | } 305 | } 306 | } -------------------------------------------------------------------------------- /Assets/Auto_Attribute/Runtime/Utils/ReflectionHelperMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEngine; 5 | using System.Reflection; 6 | 7 | namespace Auto.Utils{ 8 | 9 | public struct GetInterfaceQuery 10 | { 11 | public Type targetType; 12 | public string targetInterface; 13 | 14 | public GetInterfaceQuery(Type type, string targetInterface) : this() 15 | { 16 | this.targetType = type; 17 | this.targetInterface = targetInterface; 18 | } 19 | } 20 | 21 | public class ReflectionHelperMethods { 22 | 23 | public static Dictionary getInterfaceCache = new Dictionary(); 24 | 25 | public bool ImplementsInterface(Type type, string @interface) 26 | { 27 | bool result = false; 28 | GetInterfaceQuery query = new GetInterfaceQuery(type, @interface); 29 | if (getInterfaceCache.ContainsKey(query)) 30 | { 31 | result = getInterfaceCache[query]; 32 | } 33 | else 34 | { 35 | result = type.GetInterface(@interface) != null; 36 | getInterfaceCache[query] = result; 37 | } 38 | 39 | return result; 40 | } 41 | 42 | public IEnumerable GetAllVariables(object instanceObj) 43 | { 44 | return GetAllVariables(instanceObj.GetType()); 45 | } 46 | 47 | public IEnumerable GetAllVariables(Type objectType) 48 | { 49 | //Fields that are automatically generated backing fields will be serialized as properties, and skipped as fields. 50 | FieldInfo[] componentFields = objectType 51 | .GetFields(/*BindingFlags.NonPublic |*/ BindingFlags.Instance | BindingFlags.Public) 52 | .Where(f => f.Name.Contains("__BackingField") == false) 53 | .ToArray(); 54 | 55 | //Although it might sound like an incredible idea to ignore all properties, life is not so beautiful.... Unity's components only declare properties, and no fields. 56 | //Those properties are connected to the C++ side of things.... And they do not contain the info as fields. 57 | //Because of this, it is essential to also get the properties. Else a Rigidbody or ConfigurableJoint will result in having 0 variables. 58 | //Also, we can take out of the equation all properties that can't be written or read. Nothing we can do about them. 59 | //Oh, and, last thing, the third where (rop.GetIndexParameters().Length == 0) is used to filder out indexers. I do not support them, because never use them and couldn't be bothered 60 | PropertyInfo[] componentProperties = objectType.GetProperties(/*BindingFlags.NonPublic |*/ BindingFlags.Instance | BindingFlags.Public) 61 | .Where(prop => prop.DeclaringType != typeof(Component) ) 62 | .Where(prop => prop.CanRead && prop.CanWrite) 63 | .Where(prop => prop.GetIndexParameters().Length == 0) 64 | .ToArray(); 65 | 66 | 67 | //Adding protected, internal and private members 68 | componentFields = componentFields.Concat( 69 | GetNonPublicFieldsInBaseClasses(objectType) 70 | .Where(f => f.Name.Contains("__BackingField") == false) 71 | ).ToArray(); 72 | 73 | 74 | componentProperties = componentProperties.Concat( 75 | GetNonPublicPropertiesInBaseClasses(objectType) 76 | .Where(prop => prop.DeclaringType != typeof(Component)) 77 | .Where(prop => prop.CanRead && prop.CanWrite) 78 | .Where(prop => prop.GetIndexParameters().Length == 0) 79 | ).ToArray(); 80 | 81 | 82 | IEnumerable typeVariables = 83 | componentFields.Cast() 84 | .Concat( 85 | componentProperties.Cast() 86 | ); 87 | 88 | return typeVariables; 89 | } 90 | 91 | public string GetName(MemberInfo variable) 92 | { 93 | if (variable is PropertyInfo) 94 | { 95 | PropertyInfo propInfo = (PropertyInfo)variable; 96 | return propInfo.Name; 97 | } 98 | else 99 | { 100 | if (variable.Name.Contains("BackingField")) 101 | { 102 | return new string(variable.Name.Skip(1).TakeWhile(c => c != '>').ToArray()); 103 | } 104 | return variable.Name; 105 | } 106 | } 107 | 108 | public object GetValue(MemberInfo info, object instance) 109 | { 110 | if (info as PropertyInfo != null) 111 | { 112 | PropertyInfo propInfo = (PropertyInfo)info; 113 | if (propInfo.GetIndexParameters().Length > 0) 114 | { 115 | Debug.LogWarning("Sorry. We do not support indexed properties yet. It's not hard, it's just a lot of work, and we have lived without it until now."); 116 | return null; 117 | } 118 | return propInfo.GetValue(instance, null); 119 | } 120 | if (info as FieldInfo != null) 121 | { 122 | FieldInfo memberInfo = (FieldInfo)info; 123 | return memberInfo.GetValue(instance); 124 | } 125 | else 126 | { 127 | throw new Exception("Couldn't Get the value"); 128 | } 129 | } 130 | 131 | 132 | public void SetValue(MemberInfo info, object instance, object value) 133 | { 134 | if (info is PropertyInfo) 135 | { 136 | PropertyInfo propInfo = (PropertyInfo)info; 137 | if (propInfo.GetIndexParameters().Length > 0) 138 | { 139 | Debug.LogWarning("Sorry. We do not support indexed properties yet. It's not hard, it's just a lot of work, and we have lived without it until now."); 140 | return; 141 | } 142 | propInfo.SetValue(instance, value, null); 143 | } 144 | else if (info is FieldInfo) 145 | { 146 | FieldInfo memberInfo = (FieldInfo)info; 147 | memberInfo.SetValue(instance, value); 148 | } 149 | else 150 | { 151 | throw new Exception("Couldn't Set the value"); 152 | } 153 | } 154 | 155 | public bool IsStruct(MemberInfo memberInfo) 156 | { 157 | var variableType = GetVariableType(memberInfo); 158 | return IsStruct(variableType); 159 | } 160 | 161 | public bool IsStruct(Type variableType) 162 | { 163 | return variableType.IsValueType && (variableType.IsPrimitive == false && variableType.IsEnum == false); 164 | } 165 | 166 | public bool IsList(Type componentType) 167 | { 168 | return componentType.IsGenericType && componentType.GetGenericTypeDefinition() == typeof(List<>); 169 | } 170 | 171 | public bool IsReferenceType(MemberInfo memberInfo) 172 | { 173 | var variableType = GetVariableType(memberInfo); 174 | return IsReferenceType(variableType); 175 | } 176 | 177 | public bool IsReferenceType(Type variableType) 178 | { 179 | return variableType.IsClass; 180 | } 181 | 182 | public bool IsCollectionType(MemberInfo variable) 183 | { 184 | var variableType = GetVariableType(variable); 185 | return IsCollectionType(variableType); 186 | } 187 | 188 | /// 189 | /// Arrays return false 190 | /// 191 | /// 192 | /// 193 | public bool IsCollectionType(Type variableType) 194 | { 195 | return ImplementsInterface(variableType, "ICollection`1") || ImplementsInterface(variableType, "ICollection"); 196 | } 197 | 198 | 199 | public Type GetVariableType(MemberInfo info) 200 | { 201 | if (info is PropertyInfo) 202 | { 203 | PropertyInfo propertyInfo = (PropertyInfo)info; 204 | return propertyInfo.PropertyType; 205 | } 206 | if (info is FieldInfo) 207 | { 208 | FieldInfo fieldInfo = (FieldInfo)info; 209 | return fieldInfo.FieldType; 210 | } 211 | throw new Exception("Sorry, I couldn't find out the Variable Type"); 212 | } 213 | 214 | #region Singles 215 | public MethodInfo GetNonPublicMethodInBaseClasses(Type type, string name, bool excludeOverriddenMethods = true) 216 | { 217 | Type baseType = type; 218 | while (baseType != typeof(object) && baseType != typeof(Component) && baseType != typeof(Behaviour)) 219 | { 220 | var methodFound = baseType.GetMethod(name, BindingFlags.NonPublic | BindingFlags.Instance); 221 | 222 | //Obviously, if we didn't find anything, don't add nulls to my precious result list. 223 | if (methodFound != null) 224 | { 225 | return methodFound; 226 | } 227 | 228 | baseType = baseType.BaseType; 229 | if (baseType == null) break; 230 | } 231 | 232 | return null; 233 | } 234 | 235 | public FieldInfo GetNonPublicFieldInBaseClasses(Type type, string name, bool excludeOverriddenMethods = true) 236 | { 237 | Type baseType = type; 238 | while (baseType != typeof(object) && baseType != typeof(Component) && baseType != typeof(Behaviour)) 239 | { 240 | var fieldFound = baseType.GetField(name, BindingFlags.NonPublic | BindingFlags.Instance); 241 | 242 | //Obviously, if we didn't find anything, don't add nulls to my precious result list. 243 | if (fieldFound != null) 244 | { 245 | return fieldFound; 246 | } 247 | 248 | baseType = baseType.BaseType; 249 | if (baseType == null) break; 250 | } 251 | 252 | return null; 253 | } 254 | 255 | public PropertyInfo GetNonPublicPropertyInBaseClasses(Type type, string name, bool excludeOverriddenMethods = true) 256 | { 257 | Type baseType = type; 258 | while (baseType != typeof(object) && baseType != typeof(Component) && baseType != typeof(Behaviour)) 259 | { 260 | var fieldFound = baseType.GetProperty(name, BindingFlags.NonPublic | BindingFlags.Instance); 261 | 262 | //Obviously, if we didn't find anything, don't add nulls to my precious result list. 263 | if (fieldFound != null) 264 | { 265 | return fieldFound; 266 | } 267 | 268 | baseType = baseType.BaseType; 269 | if (baseType == null) break; 270 | } 271 | 272 | return null; 273 | } 274 | 275 | #endregion 276 | 277 | #region Plurals 278 | public List GetNonPublicMethodsInBaseClasses(Type type, bool excludeOverriddenMethods = true) 279 | { 280 | List result = new List(); 281 | 282 | HashSet methodsFoundSoFar = new HashSet(); 283 | 284 | Type baseType = type; 285 | while (baseType != typeof(object) && baseType != typeof(Component) && baseType != typeof(Behaviour)) 286 | { 287 | var methodsFound = baseType.GetMethods(BindingFlags.NonPublic | BindingFlags.Instance).ToList(); 288 | 289 | //Obviously, if we didn't find anything, don't add nulls to my precious result list. 290 | if (methodsFound.Any()) 291 | { 292 | //Add the methods that have a name that I've never seen before. (If I have, they are probabily overrides) 293 | IEnumerable methodsToAdd = methodsFound; 294 | if (excludeOverriddenMethods) 295 | { 296 | methodsToAdd = methodsFound.Where(m => methodsFoundSoFar.Contains(m.Name) == false); 297 | } 298 | 299 | result.AddRange(methodsToAdd); 300 | methodsFoundSoFar.UnionWith( methodsToAdd.Select(m => m.Name) ); 301 | } 302 | 303 | baseType = baseType.BaseType; 304 | if (baseType == null) break; 305 | } 306 | 307 | return result; 308 | } 309 | 310 | 311 | 312 | public List GetNonPublicPropertiesInBaseClasses(Type type, bool excludeOverriddenMethods = true) 313 | { 314 | List result = new List(); 315 | 316 | HashSet propertiesFoundSoFar = new HashSet(); 317 | 318 | Type baseType = type; 319 | while (baseType != typeof(object) && baseType != typeof(Component) && baseType != typeof(Behaviour)) 320 | { 321 | var propertiesFound = baseType.GetProperties(BindingFlags.NonPublic | BindingFlags.Instance).ToList(); 322 | 323 | //Obviously, if we didn't find anything, don't add nulls to my precious result list. 324 | if (propertiesFound.Any()) 325 | { 326 | //Add the methods that have a name that I've never seen before. (If I have, they are probabily overrides) 327 | IEnumerable propertiesToAdd = propertiesFound; 328 | if (excludeOverriddenMethods) 329 | { 330 | propertiesToAdd = propertiesFound.Where(m => propertiesFoundSoFar.Contains(m.Name) == false); 331 | } 332 | 333 | result.AddRange(propertiesToAdd); 334 | propertiesFoundSoFar.UnionWith(propertiesToAdd.Select(m => m.Name)); 335 | } 336 | 337 | baseType = baseType.BaseType; 338 | if (baseType == null) break; 339 | } 340 | 341 | return result; 342 | } 343 | 344 | public List GetNonPublicFieldsInBaseClasses(Type type, bool excludeOverriddenMethods = true) 345 | { 346 | List result = new List(); 347 | 348 | HashSet fieldsFoundSoFar = new HashSet(); 349 | 350 | Type baseType = type; 351 | while (baseType != typeof(object) && baseType != typeof(Component) && baseType != typeof(Behaviour)) 352 | { 353 | var fieldsFound = baseType.GetFields(BindingFlags.NonPublic | BindingFlags.Instance).ToList(); 354 | 355 | //Obviously, if we didn't find anything, don't add nulls to my precious result list. 356 | if (fieldsFound.Any()) 357 | { 358 | //Add the methods that have a name that I've never seen before. (If I have, they are probabily overrides) 359 | IEnumerable fieldsToAdd = fieldsFound; 360 | if (excludeOverriddenMethods) 361 | { 362 | fieldsToAdd = fieldsFound.Where(m => fieldsFoundSoFar.Contains(m.Name) == false); 363 | } 364 | 365 | result.AddRange(fieldsToAdd); 366 | fieldsFoundSoFar.UnionWith(fieldsToAdd.Select(m => m.Name)); 367 | } 368 | 369 | baseType = baseType.BaseType; 370 | if (baseType == null) break; 371 | } 372 | 373 | return result; 374 | } 375 | #endregion 376 | 377 | /// 378 | /// Uses reflection to call a method in a class. It will aggressively search all methods, and will be successful even if the method is a private AND in a base/upper class. 379 | /// This thing is really powerful. It is not cheap on performances, and is best only used for testing. It also breaks most OOP rules. 380 | /// Use it sparingly 381 | /// 382 | /// 383 | /// 384 | /// 385 | public bool CallMethod(T instance, string methodName) where T : class 386 | { 387 | var method = instance.GetType().GetMethod(methodName, BindingFlags.Public | BindingFlags.Instance); 388 | if (method == null) 389 | { 390 | //let's try to see if it's a private method declared in one of the parent classes 391 | method = GetNonPublicMethodInBaseClasses(instance.GetType(), methodName); 392 | } 393 | 394 | if (method != null) 395 | { 396 | method.Invoke(instance, null); 397 | return true; 398 | } 399 | return false; 400 | } 401 | 402 | } 403 | 404 | } -------------------------------------------------------------------------------- /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: 15 7 | productGUID: 96a425e15e552b14ea8e33a66f6a9c92 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: AutoAttribute 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 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | tizenShowActivityIndicatorOnLoading: -1 56 | iosAppInBackgroundBehavior: 0 57 | displayResolutionDialog: 1 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 | androidBlitType: 0 68 | defaultIsNativeResolution: 1 69 | macRetinaSupport: 1 70 | runInBackground: 1 71 | captureSingleScreen: 0 72 | muteOtherAudioSources: 0 73 | Prepare IOS For Recording: 0 74 | Force IOS Speakers When Recording: 0 75 | deferSystemGesturesMode: 0 76 | hideHomeButton: 0 77 | submitAnalytics: 1 78 | usePlayerLog: 1 79 | bakeCollisionMeshes: 0 80 | forceSingleInstance: 0 81 | resizableWindow: 0 82 | useMacAppStoreValidation: 0 83 | macAppStoreCategory: public.app-category.games 84 | gpuSkinning: 1 85 | graphicsJobs: 0 86 | xboxPIXTextureCapture: 0 87 | xboxEnableAvatar: 0 88 | xboxEnableKinect: 0 89 | xboxEnableKinectAutoTracking: 0 90 | xboxEnableFitness: 0 91 | visibleInBackground: 1 92 | allowFullscreenSwitch: 1 93 | graphicsJobMode: 0 94 | fullscreenMode: 1 95 | xboxSpeechDB: 0 96 | xboxEnableHeadOrientation: 0 97 | xboxEnableGuest: 0 98 | xboxEnablePIXSampling: 0 99 | metalFramebufferOnly: 0 100 | n3dsDisableStereoscopicView: 0 101 | n3dsEnableSharedListOpt: 1 102 | n3dsEnableVSync: 0 103 | xboxOneResolution: 0 104 | xboxOneSResolution: 0 105 | xboxOneXResolution: 3 106 | xboxOneMonoLoggingLevel: 0 107 | xboxOneLoggingLevel: 1 108 | xboxOneDisableEsram: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 0 111 | videoMemoryForVertexBuffers: 0 112 | psp2PowerMode: 0 113 | psp2AcquireBGM: 1 114 | m_SupportedAspectRatios: 115 | 4:3: 1 116 | 5:4: 1 117 | 16:10: 1 118 | 16:9: 1 119 | Others: 1 120 | bundleVersion: 0.1 121 | preloadedAssets: [] 122 | metroInputSource: 0 123 | wsaTransparentSwapchain: 0 124 | m_HolographicPauseOnTrackingLoss: 1 125 | xboxOneDisableKinectGpuReservation: 0 126 | xboxOneEnable7thCore: 0 127 | vrSettings: 128 | cardboard: 129 | depthFormat: 0 130 | enableTransitionView: 0 131 | daydream: 132 | depthFormat: 0 133 | useSustainedPerformanceMode: 0 134 | enableVideoLayer: 0 135 | useProtectedVideoMemory: 0 136 | minimumSupportedHeadTracking: 0 137 | maximumSupportedHeadTracking: 1 138 | hololens: 139 | depthFormat: 1 140 | depthBufferSharingEnabled: 0 141 | enable360StereoCapture: 0 142 | oculus: 143 | sharedDepthBuffer: 0 144 | dashSupport: 0 145 | protectGraphicsMemory: 0 146 | useHDRDisplay: 0 147 | m_ColorGamuts: 00000000 148 | targetPixelDensity: 30 149 | resolutionScalingMode: 0 150 | androidSupportedAspectRatio: 1 151 | androidMaxAspectRatio: 2.1 152 | applicationIdentifier: {} 153 | buildNumber: {} 154 | AndroidBundleVersionCode: 1 155 | AndroidMinSdkVersion: 16 156 | AndroidTargetSdkVersion: 0 157 | AndroidPreferredInstallLocation: 1 158 | aotOptions: 159 | stripEngineCode: 1 160 | iPhoneStrippingLevel: 0 161 | iPhoneScriptCallOptimization: 0 162 | ForceInternetPermission: 0 163 | ForceSDCardPermission: 0 164 | CreateWallpaper: 0 165 | APKExpansionFiles: 0 166 | keepLoadedShadersAlive: 0 167 | StripUnusedMeshComponents: 1 168 | VertexChannelCompressionMask: 4054 169 | iPhoneSdkVersion: 988 170 | iOSTargetOSVersionString: 8.0 171 | tvOSSdkVersion: 0 172 | tvOSRequireExtendedGameController: 0 173 | tvOSTargetOSVersionString: 9.0 174 | uIPrerenderedIcon: 0 175 | uIRequiresPersistentWiFi: 0 176 | uIRequiresFullScreen: 1 177 | uIStatusBarHidden: 1 178 | uIExitOnSuspend: 0 179 | uIStatusBarStyle: 0 180 | iPhoneSplashScreen: {fileID: 0} 181 | iPhoneHighResSplashScreen: {fileID: 0} 182 | iPhoneTallHighResSplashScreen: {fileID: 0} 183 | iPhone47inSplashScreen: {fileID: 0} 184 | iPhone55inPortraitSplashScreen: {fileID: 0} 185 | iPhone55inLandscapeSplashScreen: {fileID: 0} 186 | iPhone58inPortraitSplashScreen: {fileID: 0} 187 | iPhone58inLandscapeSplashScreen: {fileID: 0} 188 | iPadPortraitSplashScreen: {fileID: 0} 189 | iPadHighResPortraitSplashScreen: {fileID: 0} 190 | iPadLandscapeSplashScreen: {fileID: 0} 191 | iPadHighResLandscapeSplashScreen: {fileID: 0} 192 | appleTVSplashScreen: {fileID: 0} 193 | appleTVSplashScreen2x: {fileID: 0} 194 | tvOSSmallIconLayers: [] 195 | tvOSSmallIconLayers2x: [] 196 | tvOSLargeIconLayers: [] 197 | tvOSLargeIconLayers2x: [] 198 | tvOSTopShelfImageLayers: [] 199 | tvOSTopShelfImageLayers2x: [] 200 | tvOSTopShelfImageWideLayers: [] 201 | tvOSTopShelfImageWideLayers2x: [] 202 | iOSLaunchScreenType: 0 203 | iOSLaunchScreenPortrait: {fileID: 0} 204 | iOSLaunchScreenLandscape: {fileID: 0} 205 | iOSLaunchScreenBackgroundColor: 206 | serializedVersion: 2 207 | rgba: 0 208 | iOSLaunchScreenFillPct: 100 209 | iOSLaunchScreenSize: 100 210 | iOSLaunchScreenCustomXibPath: 211 | iOSLaunchScreeniPadType: 0 212 | iOSLaunchScreeniPadImage: {fileID: 0} 213 | iOSLaunchScreeniPadBackgroundColor: 214 | serializedVersion: 2 215 | rgba: 0 216 | iOSLaunchScreeniPadFillPct: 100 217 | iOSLaunchScreeniPadSize: 100 218 | iOSLaunchScreeniPadCustomXibPath: 219 | iOSUseLaunchScreenStoryboard: 0 220 | iOSLaunchScreenCustomStoryboardPath: 221 | iOSDeviceRequirements: [] 222 | iOSURLSchemes: [] 223 | iOSBackgroundModes: 0 224 | iOSMetalForceHardShadows: 0 225 | metalEditorSupport: 1 226 | metalAPIValidation: 1 227 | iOSRenderExtraFrameOnPause: 0 228 | appleDeveloperTeamID: 229 | iOSManualSigningProvisioningProfileID: 230 | tvOSManualSigningProvisioningProfileID: 231 | iOSManualSigningProvisioningProfileType: 0 232 | tvOSManualSigningProvisioningProfileType: 0 233 | appleEnableAutomaticSigning: 0 234 | iOSRequireARKit: 0 235 | appleEnableProMotion: 0 236 | clonedFromGUID: 56e7a2d3a00f33d44bdd161b773c35b5 237 | templatePackageId: com.unity.template.3d@1.0.0 238 | templateDefaultScene: Assets/Scenes/SampleScene.unity 239 | AndroidTargetArchitectures: 5 240 | AndroidSplashScreenScale: 0 241 | androidSplashScreen: {fileID: 0} 242 | AndroidKeystoreName: 243 | AndroidKeyaliasName: 244 | AndroidTVCompatibility: 1 245 | AndroidIsGame: 1 246 | AndroidEnableTango: 0 247 | androidEnableBanner: 1 248 | androidUseLowAccuracyLocation: 0 249 | m_AndroidBanners: 250 | - width: 320 251 | height: 180 252 | banner: {fileID: 0} 253 | androidGamepadSupportLevel: 0 254 | resolutionDialogBanner: {fileID: 0} 255 | m_BuildTargetIcons: [] 256 | m_BuildTargetPlatformIcons: [] 257 | m_BuildTargetBatching: 258 | - m_BuildTarget: Standalone 259 | m_StaticBatching: 1 260 | m_DynamicBatching: 0 261 | - m_BuildTarget: tvOS 262 | m_StaticBatching: 1 263 | m_DynamicBatching: 0 264 | - m_BuildTarget: Android 265 | m_StaticBatching: 1 266 | m_DynamicBatching: 0 267 | - m_BuildTarget: iPhone 268 | m_StaticBatching: 1 269 | m_DynamicBatching: 0 270 | - m_BuildTarget: WebGL 271 | m_StaticBatching: 0 272 | m_DynamicBatching: 0 273 | m_BuildTargetGraphicsAPIs: 274 | - m_BuildTarget: AndroidPlayer 275 | m_APIs: 0b00000015000000 276 | m_Automatic: 1 277 | - m_BuildTarget: iOSSupport 278 | m_APIs: 10000000 279 | m_Automatic: 1 280 | - m_BuildTarget: AppleTVSupport 281 | m_APIs: 10000000 282 | m_Automatic: 0 283 | - m_BuildTarget: WebGLSupport 284 | m_APIs: 0b000000 285 | m_Automatic: 1 286 | m_BuildTargetVRSettings: 287 | - m_BuildTarget: Standalone 288 | m_Enabled: 0 289 | m_Devices: 290 | - Oculus 291 | - OpenVR 292 | m_BuildTargetEnableVuforiaSettings: [] 293 | openGLRequireES31: 0 294 | openGLRequireES31AEP: 0 295 | m_TemplateCustomTags: {} 296 | mobileMTRendering: 297 | Android: 1 298 | iPhone: 1 299 | tvOS: 1 300 | m_BuildTargetGroupLightmapEncodingQuality: [] 301 | playModeTestRunnerEnabled: 0 302 | runPlayModeTestAsEditModeTest: 0 303 | actionOnDotNetUnhandledException: 1 304 | enableInternalProfiler: 0 305 | logObjCUncaughtExceptions: 1 306 | enableCrashReportAPI: 0 307 | cameraUsageDescription: 308 | locationUsageDescription: 309 | microphoneUsageDescription: 310 | switchNetLibKey: 311 | switchSocketMemoryPoolSize: 6144 312 | switchSocketAllocatorPoolSize: 128 313 | switchSocketConcurrencyLimit: 14 314 | switchScreenResolutionBehavior: 2 315 | switchUseCPUProfiler: 0 316 | switchApplicationID: 0x01004b9000490000 317 | switchNSODependencies: 318 | switchTitleNames_0: 319 | switchTitleNames_1: 320 | switchTitleNames_2: 321 | switchTitleNames_3: 322 | switchTitleNames_4: 323 | switchTitleNames_5: 324 | switchTitleNames_6: 325 | switchTitleNames_7: 326 | switchTitleNames_8: 327 | switchTitleNames_9: 328 | switchTitleNames_10: 329 | switchTitleNames_11: 330 | switchTitleNames_12: 331 | switchTitleNames_13: 332 | switchTitleNames_14: 333 | switchPublisherNames_0: 334 | switchPublisherNames_1: 335 | switchPublisherNames_2: 336 | switchPublisherNames_3: 337 | switchPublisherNames_4: 338 | switchPublisherNames_5: 339 | switchPublisherNames_6: 340 | switchPublisherNames_7: 341 | switchPublisherNames_8: 342 | switchPublisherNames_9: 343 | switchPublisherNames_10: 344 | switchPublisherNames_11: 345 | switchPublisherNames_12: 346 | switchPublisherNames_13: 347 | switchPublisherNames_14: 348 | switchIcons_0: {fileID: 0} 349 | switchIcons_1: {fileID: 0} 350 | switchIcons_2: {fileID: 0} 351 | switchIcons_3: {fileID: 0} 352 | switchIcons_4: {fileID: 0} 353 | switchIcons_5: {fileID: 0} 354 | switchIcons_6: {fileID: 0} 355 | switchIcons_7: {fileID: 0} 356 | switchIcons_8: {fileID: 0} 357 | switchIcons_9: {fileID: 0} 358 | switchIcons_10: {fileID: 0} 359 | switchIcons_11: {fileID: 0} 360 | switchIcons_12: {fileID: 0} 361 | switchIcons_13: {fileID: 0} 362 | switchIcons_14: {fileID: 0} 363 | switchSmallIcons_0: {fileID: 0} 364 | switchSmallIcons_1: {fileID: 0} 365 | switchSmallIcons_2: {fileID: 0} 366 | switchSmallIcons_3: {fileID: 0} 367 | switchSmallIcons_4: {fileID: 0} 368 | switchSmallIcons_5: {fileID: 0} 369 | switchSmallIcons_6: {fileID: 0} 370 | switchSmallIcons_7: {fileID: 0} 371 | switchSmallIcons_8: {fileID: 0} 372 | switchSmallIcons_9: {fileID: 0} 373 | switchSmallIcons_10: {fileID: 0} 374 | switchSmallIcons_11: {fileID: 0} 375 | switchSmallIcons_12: {fileID: 0} 376 | switchSmallIcons_13: {fileID: 0} 377 | switchSmallIcons_14: {fileID: 0} 378 | switchManualHTML: 379 | switchAccessibleURLs: 380 | switchLegalInformation: 381 | switchMainThreadStackSize: 1048576 382 | switchPresenceGroupId: 383 | switchLogoHandling: 0 384 | switchReleaseVersion: 0 385 | switchDisplayVersion: 1.0.0 386 | switchStartupUserAccount: 0 387 | switchTouchScreenUsage: 0 388 | switchSupportedLanguagesMask: 0 389 | switchLogoType: 0 390 | switchApplicationErrorCodeCategory: 391 | switchUserAccountSaveDataSize: 0 392 | switchUserAccountSaveDataJournalSize: 0 393 | switchApplicationAttribute: 0 394 | switchCardSpecSize: -1 395 | switchCardSpecClock: -1 396 | switchRatingsMask: 0 397 | switchRatingsInt_0: 0 398 | switchRatingsInt_1: 0 399 | switchRatingsInt_2: 0 400 | switchRatingsInt_3: 0 401 | switchRatingsInt_4: 0 402 | switchRatingsInt_5: 0 403 | switchRatingsInt_6: 0 404 | switchRatingsInt_7: 0 405 | switchRatingsInt_8: 0 406 | switchRatingsInt_9: 0 407 | switchRatingsInt_10: 0 408 | switchRatingsInt_11: 0 409 | switchLocalCommunicationIds_0: 410 | switchLocalCommunicationIds_1: 411 | switchLocalCommunicationIds_2: 412 | switchLocalCommunicationIds_3: 413 | switchLocalCommunicationIds_4: 414 | switchLocalCommunicationIds_5: 415 | switchLocalCommunicationIds_6: 416 | switchLocalCommunicationIds_7: 417 | switchParentalControl: 0 418 | switchAllowsScreenshot: 1 419 | switchAllowsVideoCapturing: 1 420 | switchAllowsRuntimeAddOnContentInstall: 0 421 | switchDataLossConfirmation: 0 422 | switchSupportedNpadStyles: 3 423 | switchSocketConfigEnabled: 0 424 | switchTcpInitialSendBufferSize: 32 425 | switchTcpInitialReceiveBufferSize: 64 426 | switchTcpAutoSendBufferSizeMax: 256 427 | switchTcpAutoReceiveBufferSizeMax: 256 428 | switchUdpSendBufferSize: 9 429 | switchUdpReceiveBufferSize: 42 430 | switchSocketBufferEfficiency: 4 431 | switchSocketInitializeEnabled: 1 432 | switchNetworkInterfaceManagerInitializeEnabled: 1 433 | switchPlayerConnectionEnabled: 1 434 | ps4NPAgeRating: 12 435 | ps4NPTitleSecret: 436 | ps4NPTrophyPackPath: 437 | ps4ParentalLevel: 11 438 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 439 | ps4Category: 0 440 | ps4MasterVersion: 01.00 441 | ps4AppVersion: 01.00 442 | ps4AppType: 0 443 | ps4ParamSfxPath: 444 | ps4VideoOutPixelFormat: 0 445 | ps4VideoOutInitialWidth: 1920 446 | ps4VideoOutBaseModeInitialWidth: 1920 447 | ps4VideoOutReprojectionRate: 60 448 | ps4PronunciationXMLPath: 449 | ps4PronunciationSIGPath: 450 | ps4BackgroundImagePath: 451 | ps4StartupImagePath: 452 | ps4StartupImagesFolder: 453 | ps4IconImagesFolder: 454 | ps4SaveDataImagePath: 455 | ps4SdkOverride: 456 | ps4BGMPath: 457 | ps4ShareFilePath: 458 | ps4ShareOverlayImagePath: 459 | ps4PrivacyGuardImagePath: 460 | ps4NPtitleDatPath: 461 | ps4RemotePlayKeyAssignment: -1 462 | ps4RemotePlayKeyMappingDir: 463 | ps4PlayTogetherPlayerCount: 0 464 | ps4EnterButtonAssignment: 1 465 | ps4ApplicationParam1: 0 466 | ps4ApplicationParam2: 0 467 | ps4ApplicationParam3: 0 468 | ps4ApplicationParam4: 0 469 | ps4DownloadDataSize: 0 470 | ps4GarlicHeapSize: 2048 471 | ps4ProGarlicHeapSize: 2560 472 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 473 | ps4pnSessions: 1 474 | ps4pnPresence: 1 475 | ps4pnFriends: 1 476 | ps4pnGameCustomData: 1 477 | playerPrefsSupport: 0 478 | enableApplicationExit: 0 479 | restrictedAudioUsageRights: 0 480 | ps4UseResolutionFallback: 0 481 | ps4ReprojectionSupport: 0 482 | ps4UseAudio3dBackend: 0 483 | ps4SocialScreenEnabled: 0 484 | ps4ScriptOptimizationLevel: 0 485 | ps4Audio3dVirtualSpeakerCount: 14 486 | ps4attribCpuUsage: 0 487 | ps4PatchPkgPath: 488 | ps4PatchLatestPkgPath: 489 | ps4PatchChangeinfoPath: 490 | ps4PatchDayOne: 0 491 | ps4attribUserManagement: 0 492 | ps4attribMoveSupport: 0 493 | ps4attrib3DSupport: 0 494 | ps4attribShareSupport: 0 495 | ps4attribExclusiveVR: 0 496 | ps4disableAutoHideSplash: 0 497 | ps4videoRecordingFeaturesUsed: 0 498 | ps4contentSearchFeaturesUsed: 0 499 | ps4attribEyeToEyeDistanceSettingVR: 0 500 | ps4IncludedModules: [] 501 | monoEnv: 502 | psp2Splashimage: {fileID: 0} 503 | psp2NPTrophyPackPath: 504 | psp2NPSupportGBMorGJP: 0 505 | psp2NPAgeRating: 12 506 | psp2NPTitleDatPath: 507 | psp2NPCommsID: 508 | psp2NPCommunicationsID: 509 | psp2NPCommsPassphrase: 510 | psp2NPCommsSig: 511 | psp2ParamSfxPath: 512 | psp2ManualPath: 513 | psp2LiveAreaGatePath: 514 | psp2LiveAreaBackroundPath: 515 | psp2LiveAreaPath: 516 | psp2LiveAreaTrialPath: 517 | psp2PatchChangeInfoPath: 518 | psp2PatchOriginalPackage: 519 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 520 | psp2KeystoneFile: 521 | psp2MemoryExpansionMode: 0 522 | psp2DRMType: 0 523 | psp2StorageType: 0 524 | psp2MediaCapacity: 0 525 | psp2DLCConfigPath: 526 | psp2ThumbnailPath: 527 | psp2BackgroundPath: 528 | psp2SoundPath: 529 | psp2TrophyCommId: 530 | psp2TrophyPackagePath: 531 | psp2PackagedResourcesPath: 532 | psp2SaveDataQuota: 10240 533 | psp2ParentalLevel: 1 534 | psp2ShortTitle: Not Set 535 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 536 | psp2Category: 0 537 | psp2MasterVersion: 01.00 538 | psp2AppVersion: 01.00 539 | psp2TVBootMode: 0 540 | psp2EnterButtonAssignment: 2 541 | psp2TVDisableEmu: 0 542 | psp2AllowTwitterDialog: 1 543 | psp2Upgradable: 0 544 | psp2HealthWarning: 0 545 | psp2UseLibLocation: 0 546 | psp2InfoBarOnStartup: 0 547 | psp2InfoBarColor: 0 548 | psp2ScriptOptimizationLevel: 0 549 | splashScreenBackgroundSourceLandscape: {fileID: 0} 550 | splashScreenBackgroundSourcePortrait: {fileID: 0} 551 | spritePackerPolicy: 552 | webGLMemorySize: 256 553 | webGLExceptionSupport: 1 554 | webGLNameFilesAsHashes: 0 555 | webGLDataCaching: 0 556 | webGLDebugSymbols: 0 557 | webGLEmscriptenArgs: 558 | webGLModulesDirectory: 559 | webGLTemplate: APPLICATION:Default 560 | webGLAnalyzeBuildSize: 0 561 | webGLUseEmbeddedResources: 0 562 | webGLCompressionFormat: 1 563 | webGLLinkerTarget: 0 564 | scriptingDefineSymbols: 565 | 1: UNITY_POST_PROCESSING_STACK_V2 566 | 4: UNITY_POST_PROCESSING_STACK_V2 567 | 7: UNITY_POST_PROCESSING_STACK_V2 568 | 13: UNITY_POST_PROCESSING_STACK_V2 569 | 17: UNITY_POST_PROCESSING_STACK_V2 570 | 18: UNITY_POST_PROCESSING_STACK_V2 571 | 19: UNITY_POST_PROCESSING_STACK_V2 572 | 21: UNITY_POST_PROCESSING_STACK_V2 573 | 23: UNITY_POST_PROCESSING_STACK_V2 574 | 24: UNITY_POST_PROCESSING_STACK_V2 575 | 25: UNITY_POST_PROCESSING_STACK_V2 576 | 26: UNITY_POST_PROCESSING_STACK_V2 577 | 27: UNITY_POST_PROCESSING_STACK_V2 578 | platformArchitecture: {} 579 | scriptingBackend: {} 580 | il2cppCompilerConfiguration: {} 581 | incrementalIl2cppBuild: {} 582 | allowUnsafeCode: 0 583 | additionalIl2CppArgs: 584 | scriptingRuntimeVersion: 1 585 | apiCompatibilityLevelPerPlatform: 586 | Standalone: 3 587 | m_RenderingPath: 1 588 | m_MobileRenderingPath: 1 589 | metroPackageName: Template_3D 590 | metroPackageVersion: 591 | metroCertificatePath: 592 | metroCertificatePassword: 593 | metroCertificateSubject: 594 | metroCertificateIssuer: 595 | metroCertificateNotAfter: 0000000000000000 596 | metroApplicationDescription: Template_3D 597 | wsaImages: {} 598 | metroTileShortName: 599 | metroCommandLineArgsFile: 600 | metroTileShowName: 0 601 | metroMediumTileShowName: 0 602 | metroLargeTileShowName: 0 603 | metroWideTileShowName: 0 604 | metroDefaultTileSize: 1 605 | metroTileForegroundText: 2 606 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 607 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 608 | a: 1} 609 | metroSplashScreenUseBackgroundColor: 0 610 | platformCapabilities: {} 611 | metroFTAName: 612 | metroFTAFileTypes: [] 613 | metroProtocolName: 614 | metroCompilationOverrides: 1 615 | tizenProductDescription: 616 | tizenProductURL: 617 | tizenSigningProfileName: 618 | tizenGPSPermissions: 0 619 | tizenMicrophonePermissions: 0 620 | tizenDeploymentTarget: 621 | tizenDeploymentTargetType: -1 622 | tizenMinOSVersion: 1 623 | n3dsUseExtSaveData: 0 624 | n3dsCompressStaticMem: 1 625 | n3dsExtSaveDataNumber: 0x12345 626 | n3dsStackSize: 131072 627 | n3dsTargetPlatform: 2 628 | n3dsRegion: 7 629 | n3dsMediaSize: 0 630 | n3dsLogoStyle: 3 631 | n3dsTitle: GameName 632 | n3dsProductCode: 633 | n3dsApplicationId: 0xFF3FF 634 | XboxOneProductId: 635 | XboxOneUpdateKey: 636 | XboxOneSandboxId: 637 | XboxOneContentId: 638 | XboxOneTitleId: 639 | XboxOneSCId: 640 | XboxOneGameOsOverridePath: 641 | XboxOnePackagingOverridePath: 642 | XboxOneAppManifestOverridePath: 643 | XboxOnePackageEncryption: 0 644 | XboxOnePackageUpdateGranularity: 2 645 | XboxOneDescription: 646 | XboxOneLanguage: 647 | - enus 648 | XboxOneCapability: [] 649 | XboxOneGameRating: {} 650 | XboxOneIsContentPackage: 0 651 | XboxOneEnableGPUVariability: 0 652 | XboxOneSockets: {} 653 | XboxOneSplashScreen: {fileID: 0} 654 | XboxOneAllowedProductIds: [] 655 | XboxOnePersistentLocalStorageSize: 0 656 | XboxOneXTitleMemory: 8 657 | xboxOneScriptCompiler: 0 658 | vrEditorSettings: 659 | daydream: 660 | daydreamIconForeground: {fileID: 0} 661 | daydreamIconBackground: {fileID: 0} 662 | cloudServicesEnabled: 663 | UNet: 1 664 | facebookSdkVersion: 7.9.4 665 | apiCompatibilityLevel: 3 666 | cloudProjectId: 667 | projectName: Template_3D 668 | organizationId: 669 | cloudEnabled: 0 670 | enableNativePlatformBackendsForNewInputSystem: 0 671 | disableOldInputManagerSupport: 0 672 | -------------------------------------------------------------------------------- /Assets/example-scene.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: 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.37311953, g: 0.38074014, b: 0.3587274, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 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: 1 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: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 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_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &9215860 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 9215861} 135 | - component: {fileID: 9215862} 136 | m_Layer: 0 137 | m_Name: GameObject 138 | m_TagString: Untagged 139 | m_Icon: {fileID: 0} 140 | m_NavMeshLayer: 0 141 | m_StaticEditorFlags: 0 142 | m_IsActive: 0 143 | --- !u!4 &9215861 144 | Transform: 145 | m_ObjectHideFlags: 0 146 | m_CorrespondingSourceObject: {fileID: 0} 147 | m_PrefabInstance: {fileID: 0} 148 | m_PrefabAsset: {fileID: 0} 149 | m_GameObject: {fileID: 9215860} 150 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 151 | m_LocalPosition: {x: 0, y: 0, z: 0} 152 | m_LocalScale: {x: 1, y: 1, z: 1} 153 | m_Children: 154 | - {fileID: 965612299} 155 | m_Father: {fileID: 67570402} 156 | m_RootOrder: 0 157 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 158 | --- !u!23 &9215862 159 | MeshRenderer: 160 | m_ObjectHideFlags: 0 161 | m_CorrespondingSourceObject: {fileID: 0} 162 | m_PrefabInstance: {fileID: 0} 163 | m_PrefabAsset: {fileID: 0} 164 | m_GameObject: {fileID: 9215860} 165 | m_Enabled: 1 166 | m_CastShadows: 1 167 | m_ReceiveShadows: 1 168 | m_DynamicOccludee: 1 169 | m_MotionVectors: 1 170 | m_LightProbeUsage: 1 171 | m_ReflectionProbeUsage: 1 172 | m_RayTracingMode: 2 173 | m_RayTraceProcedural: 0 174 | m_RenderingLayerMask: 1 175 | m_RendererPriority: 0 176 | m_Materials: 177 | - {fileID: 0} 178 | m_StaticBatchInfo: 179 | firstSubMesh: 0 180 | subMeshCount: 0 181 | m_StaticBatchRoot: {fileID: 0} 182 | m_ProbeAnchor: {fileID: 0} 183 | m_LightProbeVolumeOverride: {fileID: 0} 184 | m_ScaleInLightmap: 1 185 | m_ReceiveGI: 1 186 | m_PreserveUVs: 0 187 | m_IgnoreNormalsForChartDetection: 0 188 | m_ImportantGI: 0 189 | m_StitchLightmapSeams: 1 190 | m_SelectedEditorRenderState: 3 191 | m_MinimumChartSize: 4 192 | m_AutoUVMaxDistance: 0.5 193 | m_AutoUVMaxAngle: 89 194 | m_LightmapParameters: {fileID: 0} 195 | m_SortingLayerID: 0 196 | m_SortingLayer: 0 197 | m_SortingOrder: 0 198 | m_AdditionalVertexStreams: {fileID: 0} 199 | --- !u!1 &67570399 200 | GameObject: 201 | m_ObjectHideFlags: 0 202 | m_CorrespondingSourceObject: {fileID: 0} 203 | m_PrefabInstance: {fileID: 0} 204 | m_PrefabAsset: {fileID: 0} 205 | serializedVersion: 6 206 | m_Component: 207 | - component: {fileID: 67570402} 208 | - component: {fileID: 67570401} 209 | - component: {fileID: 67570400} 210 | - component: {fileID: 67570403} 211 | m_Layer: 0 212 | m_Name: Auto_Inherited_Start_Active 213 | m_TagString: Untagged 214 | m_Icon: {fileID: 0} 215 | m_NavMeshLayer: 0 216 | m_StaticEditorFlags: 0 217 | m_IsActive: 0 218 | --- !u!23 &67570400 219 | MeshRenderer: 220 | m_ObjectHideFlags: 0 221 | m_CorrespondingSourceObject: {fileID: 0} 222 | m_PrefabInstance: {fileID: 0} 223 | m_PrefabAsset: {fileID: 0} 224 | m_GameObject: {fileID: 67570399} 225 | m_Enabled: 1 226 | m_CastShadows: 1 227 | m_ReceiveShadows: 1 228 | m_DynamicOccludee: 1 229 | m_MotionVectors: 1 230 | m_LightProbeUsage: 1 231 | m_ReflectionProbeUsage: 1 232 | m_RayTracingMode: 2 233 | m_RayTraceProcedural: 0 234 | m_RenderingLayerMask: 1 235 | m_RendererPriority: 0 236 | m_Materials: 237 | - {fileID: 0} 238 | m_StaticBatchInfo: 239 | firstSubMesh: 0 240 | subMeshCount: 0 241 | m_StaticBatchRoot: {fileID: 0} 242 | m_ProbeAnchor: {fileID: 0} 243 | m_LightProbeVolumeOverride: {fileID: 0} 244 | m_ScaleInLightmap: 1 245 | m_ReceiveGI: 1 246 | m_PreserveUVs: 0 247 | m_IgnoreNormalsForChartDetection: 0 248 | m_ImportantGI: 0 249 | m_StitchLightmapSeams: 1 250 | m_SelectedEditorRenderState: 3 251 | m_MinimumChartSize: 4 252 | m_AutoUVMaxDistance: 0.5 253 | m_AutoUVMaxAngle: 89 254 | m_LightmapParameters: {fileID: 0} 255 | m_SortingLayerID: 0 256 | m_SortingLayer: 0 257 | m_SortingOrder: 0 258 | m_AdditionalVertexStreams: {fileID: 0} 259 | --- !u!114 &67570401 260 | MonoBehaviour: 261 | m_ObjectHideFlags: 0 262 | m_CorrespondingSourceObject: {fileID: 0} 263 | m_PrefabInstance: {fileID: 0} 264 | m_PrefabAsset: {fileID: 0} 265 | m_GameObject: {fileID: 67570399} 266 | m_Enabled: 1 267 | m_EditorHideFlags: 0 268 | m_Script: {fileID: 11500000, guid: 374eda931a32ea94f9265d8e32e6feb2, type: 3} 269 | m_Name: 270 | m_EditorClassIdentifier: 271 | pub_meshRenderer: {fileID: 0} 272 | pub_colldier_children: [] 273 | pub_audio_children: [] 274 | --- !u!4 &67570402 275 | Transform: 276 | m_ObjectHideFlags: 0 277 | m_CorrespondingSourceObject: {fileID: 0} 278 | m_PrefabInstance: {fileID: 0} 279 | m_PrefabAsset: {fileID: 0} 280 | m_GameObject: {fileID: 67570399} 281 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 282 | m_LocalPosition: {x: 0, y: 0, z: 0} 283 | m_LocalScale: {x: 1, y: 1, z: 1} 284 | m_Children: 285 | - {fileID: 9215861} 286 | m_Father: {fileID: 2047082777} 287 | m_RootOrder: 0 288 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 289 | --- !u!82 &67570403 290 | AudioSource: 291 | m_ObjectHideFlags: 0 292 | m_CorrespondingSourceObject: {fileID: 0} 293 | m_PrefabInstance: {fileID: 0} 294 | m_PrefabAsset: {fileID: 0} 295 | m_GameObject: {fileID: 67570399} 296 | m_Enabled: 1 297 | serializedVersion: 4 298 | OutputAudioMixerGroup: {fileID: 0} 299 | m_audioClip: {fileID: 0} 300 | m_PlayOnAwake: 1 301 | m_Volume: 1 302 | m_Pitch: 1 303 | Loop: 0 304 | Mute: 0 305 | Spatialize: 0 306 | SpatializePostEffects: 0 307 | Priority: 128 308 | DopplerLevel: 1 309 | MinDistance: 1 310 | MaxDistance: 500 311 | Pan2D: 0 312 | rolloffMode: 0 313 | BypassEffects: 0 314 | BypassListenerEffects: 0 315 | BypassReverbZones: 0 316 | rolloffCustomCurve: 317 | serializedVersion: 2 318 | m_Curve: 319 | - serializedVersion: 3 320 | time: 0 321 | value: 1 322 | inSlope: 0 323 | outSlope: 0 324 | tangentMode: 0 325 | weightedMode: 0 326 | inWeight: 0.33333334 327 | outWeight: 0.33333334 328 | - serializedVersion: 3 329 | time: 1 330 | value: 0 331 | inSlope: 0 332 | outSlope: 0 333 | tangentMode: 0 334 | weightedMode: 0 335 | inWeight: 0.33333334 336 | outWeight: 0.33333334 337 | m_PreInfinity: 2 338 | m_PostInfinity: 2 339 | m_RotationOrder: 4 340 | panLevelCustomCurve: 341 | serializedVersion: 2 342 | m_Curve: 343 | - serializedVersion: 3 344 | time: 0 345 | value: 0 346 | inSlope: 0 347 | outSlope: 0 348 | tangentMode: 0 349 | weightedMode: 0 350 | inWeight: 0.33333334 351 | outWeight: 0.33333334 352 | m_PreInfinity: 2 353 | m_PostInfinity: 2 354 | m_RotationOrder: 4 355 | spreadCustomCurve: 356 | serializedVersion: 2 357 | m_Curve: 358 | - serializedVersion: 3 359 | time: 0 360 | value: 0 361 | inSlope: 0 362 | outSlope: 0 363 | tangentMode: 0 364 | weightedMode: 0 365 | inWeight: 0.33333334 366 | outWeight: 0.33333334 367 | m_PreInfinity: 2 368 | m_PostInfinity: 2 369 | m_RotationOrder: 4 370 | reverbZoneMixCustomCurve: 371 | serializedVersion: 2 372 | m_Curve: 373 | - serializedVersion: 3 374 | time: 0 375 | value: 1 376 | inSlope: 0 377 | outSlope: 0 378 | tangentMode: 0 379 | weightedMode: 0 380 | inWeight: 0.33333334 381 | outWeight: 0.33333334 382 | m_PreInfinity: 2 383 | m_PostInfinity: 2 384 | m_RotationOrder: 4 385 | --- !u!1 &189738090 386 | GameObject: 387 | m_ObjectHideFlags: 0 388 | m_CorrespondingSourceObject: {fileID: 0} 389 | m_PrefabInstance: {fileID: 0} 390 | m_PrefabAsset: {fileID: 0} 391 | serializedVersion: 6 392 | m_Component: 393 | - component: {fileID: 189738093} 394 | - component: {fileID: 189738092} 395 | - component: {fileID: 189738091} 396 | m_Layer: 0 397 | m_Name: Auto_Starts_Inactive 398 | m_TagString: Untagged 399 | m_Icon: {fileID: 0} 400 | m_NavMeshLayer: 0 401 | m_StaticEditorFlags: 0 402 | m_IsActive: 0 403 | --- !u!23 &189738091 404 | MeshRenderer: 405 | m_ObjectHideFlags: 0 406 | m_CorrespondingSourceObject: {fileID: 0} 407 | m_PrefabInstance: {fileID: 0} 408 | m_PrefabAsset: {fileID: 0} 409 | m_GameObject: {fileID: 189738090} 410 | m_Enabled: 1 411 | m_CastShadows: 1 412 | m_ReceiveShadows: 1 413 | m_DynamicOccludee: 1 414 | m_MotionVectors: 1 415 | m_LightProbeUsage: 1 416 | m_ReflectionProbeUsage: 1 417 | m_RayTracingMode: 2 418 | m_RayTraceProcedural: 0 419 | m_RenderingLayerMask: 1 420 | m_RendererPriority: 0 421 | m_Materials: 422 | - {fileID: 0} 423 | m_StaticBatchInfo: 424 | firstSubMesh: 0 425 | subMeshCount: 0 426 | m_StaticBatchRoot: {fileID: 0} 427 | m_ProbeAnchor: {fileID: 0} 428 | m_LightProbeVolumeOverride: {fileID: 0} 429 | m_ScaleInLightmap: 1 430 | m_ReceiveGI: 1 431 | m_PreserveUVs: 0 432 | m_IgnoreNormalsForChartDetection: 0 433 | m_ImportantGI: 0 434 | m_StitchLightmapSeams: 1 435 | m_SelectedEditorRenderState: 3 436 | m_MinimumChartSize: 4 437 | m_AutoUVMaxDistance: 0.5 438 | m_AutoUVMaxAngle: 89 439 | m_LightmapParameters: {fileID: 0} 440 | m_SortingLayerID: 0 441 | m_SortingLayer: 0 442 | m_SortingOrder: 0 443 | m_AdditionalVertexStreams: {fileID: 0} 444 | --- !u!114 &189738092 445 | MonoBehaviour: 446 | m_ObjectHideFlags: 0 447 | m_CorrespondingSourceObject: {fileID: 0} 448 | m_PrefabInstance: {fileID: 0} 449 | m_PrefabAsset: {fileID: 0} 450 | m_GameObject: {fileID: 189738090} 451 | m_Enabled: 1 452 | m_EditorHideFlags: 0 453 | m_Script: {fileID: 11500000, guid: 27677395bd3787f4cb51dd4f75a3c125, type: 3} 454 | m_Name: 455 | m_EditorClassIdentifier: 456 | pub_meshRenderer: {fileID: 0} 457 | pub_colldier_children: [] 458 | pub_audio_children: [] 459 | --- !u!4 &189738093 460 | Transform: 461 | m_ObjectHideFlags: 0 462 | m_CorrespondingSourceObject: {fileID: 0} 463 | m_PrefabInstance: {fileID: 0} 464 | m_PrefabAsset: {fileID: 0} 465 | m_GameObject: {fileID: 189738090} 466 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 467 | m_LocalPosition: {x: 0, y: 0, z: 0} 468 | m_LocalScale: {x: 1, y: 1, z: 1} 469 | m_Children: [] 470 | m_Father: {fileID: 0} 471 | m_RootOrder: 5 472 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 473 | --- !u!1 &359417294 474 | GameObject: 475 | m_ObjectHideFlags: 0 476 | m_CorrespondingSourceObject: {fileID: 0} 477 | m_PrefabInstance: {fileID: 0} 478 | m_PrefabAsset: {fileID: 0} 479 | serializedVersion: 6 480 | m_Component: 481 | - component: {fileID: 359417295} 482 | m_Layer: 0 483 | m_Name: ---------------------- 484 | m_TagString: Untagged 485 | m_Icon: {fileID: 0} 486 | m_NavMeshLayer: 0 487 | m_StaticEditorFlags: 0 488 | m_IsActive: 1 489 | --- !u!4 &359417295 490 | Transform: 491 | m_ObjectHideFlags: 0 492 | m_CorrespondingSourceObject: {fileID: 0} 493 | m_PrefabInstance: {fileID: 0} 494 | m_PrefabAsset: {fileID: 0} 495 | m_GameObject: {fileID: 359417294} 496 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 497 | m_LocalPosition: {x: 0, y: 0, z: 0} 498 | m_LocalScale: {x: 1, y: 1, z: 1} 499 | m_Children: [] 500 | m_Father: {fileID: 0} 501 | m_RootOrder: 1 502 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 503 | --- !u!1 &390557291 504 | GameObject: 505 | m_ObjectHideFlags: 0 506 | m_CorrespondingSourceObject: {fileID: 0} 507 | m_PrefabInstance: {fileID: 0} 508 | m_PrefabAsset: {fileID: 0} 509 | serializedVersion: 6 510 | m_Component: 511 | - component: {fileID: 390557292} 512 | m_Layer: 0 513 | m_Name: '---------------------- ' 514 | m_TagString: Untagged 515 | m_Icon: {fileID: 0} 516 | m_NavMeshLayer: 0 517 | m_StaticEditorFlags: 0 518 | m_IsActive: 1 519 | --- !u!4 &390557292 520 | Transform: 521 | m_ObjectHideFlags: 0 522 | m_CorrespondingSourceObject: {fileID: 0} 523 | m_PrefabInstance: {fileID: 0} 524 | m_PrefabAsset: {fileID: 0} 525 | m_GameObject: {fileID: 390557291} 526 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 527 | m_LocalPosition: {x: 0, y: 0, z: 0} 528 | m_LocalScale: {x: 1, y: 1, z: 1} 529 | m_Children: [] 530 | m_Father: {fileID: 0} 531 | m_RootOrder: 8 532 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 533 | --- !u!1 &707698999 534 | GameObject: 535 | m_ObjectHideFlags: 0 536 | m_CorrespondingSourceObject: {fileID: 0} 537 | m_PrefabInstance: {fileID: 0} 538 | m_PrefabAsset: {fileID: 0} 539 | serializedVersion: 6 540 | m_Component: 541 | - component: {fileID: 707699001} 542 | - component: {fileID: 707699000} 543 | - component: {fileID: 707699002} 544 | m_Layer: 0 545 | m_Name: Auto_Attribute_Manager 546 | m_TagString: Untagged 547 | m_Icon: {fileID: 0} 548 | m_NavMeshLayer: 0 549 | m_StaticEditorFlags: 0 550 | m_IsActive: 1 551 | --- !u!114 &707699000 552 | MonoBehaviour: 553 | m_ObjectHideFlags: 0 554 | m_CorrespondingSourceObject: {fileID: 0} 555 | m_PrefabInstance: {fileID: 0} 556 | m_PrefabAsset: {fileID: 0} 557 | m_GameObject: {fileID: 707698999} 558 | m_Enabled: 1 559 | m_EditorHideFlags: 0 560 | m_Script: {fileID: 11500000, guid: b707ec86924986a42bd79edd38a34af8, type: 3} 561 | m_Name: 562 | m_EditorClassIdentifier: 563 | monoBehavioursInSceneWithAuto: [] 564 | --- !u!4 &707699001 565 | Transform: 566 | m_ObjectHideFlags: 0 567 | m_CorrespondingSourceObject: {fileID: 0} 568 | m_PrefabInstance: {fileID: 0} 569 | m_PrefabAsset: {fileID: 0} 570 | m_GameObject: {fileID: 707698999} 571 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 572 | m_LocalPosition: {x: 0, y: 0, z: 0} 573 | m_LocalScale: {x: 1, y: 1, z: 1} 574 | m_Children: [] 575 | m_Father: {fileID: 0} 576 | m_RootOrder: 0 577 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 578 | --- !u!82 &707699002 579 | AudioSource: 580 | m_ObjectHideFlags: 0 581 | m_CorrespondingSourceObject: {fileID: 0} 582 | m_PrefabInstance: {fileID: 0} 583 | m_PrefabAsset: {fileID: 0} 584 | m_GameObject: {fileID: 707698999} 585 | m_Enabled: 1 586 | serializedVersion: 4 587 | OutputAudioMixerGroup: {fileID: 0} 588 | m_audioClip: {fileID: 0} 589 | m_PlayOnAwake: 1 590 | m_Volume: 1 591 | m_Pitch: 1 592 | Loop: 0 593 | Mute: 0 594 | Spatialize: 0 595 | SpatializePostEffects: 0 596 | Priority: 128 597 | DopplerLevel: 1 598 | MinDistance: 1 599 | MaxDistance: 500 600 | Pan2D: 0 601 | rolloffMode: 0 602 | BypassEffects: 0 603 | BypassListenerEffects: 0 604 | BypassReverbZones: 0 605 | rolloffCustomCurve: 606 | serializedVersion: 2 607 | m_Curve: 608 | - serializedVersion: 3 609 | time: 0 610 | value: 1 611 | inSlope: 0 612 | outSlope: 0 613 | tangentMode: 0 614 | weightedMode: 0 615 | inWeight: 0.33333334 616 | outWeight: 0.33333334 617 | - serializedVersion: 3 618 | time: 1 619 | value: 0 620 | inSlope: 0 621 | outSlope: 0 622 | tangentMode: 0 623 | weightedMode: 0 624 | inWeight: 0.33333334 625 | outWeight: 0.33333334 626 | m_PreInfinity: 2 627 | m_PostInfinity: 2 628 | m_RotationOrder: 4 629 | panLevelCustomCurve: 630 | serializedVersion: 2 631 | m_Curve: 632 | - serializedVersion: 3 633 | time: 0 634 | value: 0 635 | inSlope: 0 636 | outSlope: 0 637 | tangentMode: 0 638 | weightedMode: 0 639 | inWeight: 0.33333334 640 | outWeight: 0.33333334 641 | m_PreInfinity: 2 642 | m_PostInfinity: 2 643 | m_RotationOrder: 4 644 | spreadCustomCurve: 645 | serializedVersion: 2 646 | m_Curve: 647 | - serializedVersion: 3 648 | time: 0 649 | value: 0 650 | inSlope: 0 651 | outSlope: 0 652 | tangentMode: 0 653 | weightedMode: 0 654 | inWeight: 0.33333334 655 | outWeight: 0.33333334 656 | m_PreInfinity: 2 657 | m_PostInfinity: 2 658 | m_RotationOrder: 4 659 | reverbZoneMixCustomCurve: 660 | serializedVersion: 2 661 | m_Curve: 662 | - serializedVersion: 3 663 | time: 0 664 | value: 1 665 | inSlope: 0 666 | outSlope: 0 667 | tangentMode: 0 668 | weightedMode: 0 669 | inWeight: 0.33333334 670 | outWeight: 0.33333334 671 | m_PreInfinity: 2 672 | m_PostInfinity: 2 673 | m_RotationOrder: 4 674 | --- !u!1 &965612298 675 | GameObject: 676 | m_ObjectHideFlags: 0 677 | m_CorrespondingSourceObject: {fileID: 0} 678 | m_PrefabInstance: {fileID: 0} 679 | m_PrefabAsset: {fileID: 0} 680 | serializedVersion: 6 681 | m_Component: 682 | - component: {fileID: 965612299} 683 | - component: {fileID: 965612300} 684 | m_Layer: 0 685 | m_Name: GameObject (1) 686 | m_TagString: Untagged 687 | m_Icon: {fileID: 0} 688 | m_NavMeshLayer: 0 689 | m_StaticEditorFlags: 0 690 | m_IsActive: 0 691 | --- !u!4 &965612299 692 | Transform: 693 | m_ObjectHideFlags: 0 694 | m_CorrespondingSourceObject: {fileID: 0} 695 | m_PrefabInstance: {fileID: 0} 696 | m_PrefabAsset: {fileID: 0} 697 | m_GameObject: {fileID: 965612298} 698 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 699 | m_LocalPosition: {x: 0, y: 0, z: 0} 700 | m_LocalScale: {x: 1, y: 1, z: 1} 701 | m_Children: [] 702 | m_Father: {fileID: 9215861} 703 | m_RootOrder: 0 704 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 705 | --- !u!23 &965612300 706 | MeshRenderer: 707 | m_ObjectHideFlags: 0 708 | m_CorrespondingSourceObject: {fileID: 0} 709 | m_PrefabInstance: {fileID: 0} 710 | m_PrefabAsset: {fileID: 0} 711 | m_GameObject: {fileID: 965612298} 712 | m_Enabled: 1 713 | m_CastShadows: 1 714 | m_ReceiveShadows: 1 715 | m_DynamicOccludee: 1 716 | m_MotionVectors: 1 717 | m_LightProbeUsage: 1 718 | m_ReflectionProbeUsage: 1 719 | m_RayTracingMode: 2 720 | m_RayTraceProcedural: 0 721 | m_RenderingLayerMask: 1 722 | m_RendererPriority: 0 723 | m_Materials: 724 | - {fileID: 0} 725 | m_StaticBatchInfo: 726 | firstSubMesh: 0 727 | subMeshCount: 0 728 | m_StaticBatchRoot: {fileID: 0} 729 | m_ProbeAnchor: {fileID: 0} 730 | m_LightProbeVolumeOverride: {fileID: 0} 731 | m_ScaleInLightmap: 1 732 | m_ReceiveGI: 1 733 | m_PreserveUVs: 0 734 | m_IgnoreNormalsForChartDetection: 0 735 | m_ImportantGI: 0 736 | m_StitchLightmapSeams: 1 737 | m_SelectedEditorRenderState: 3 738 | m_MinimumChartSize: 4 739 | m_AutoUVMaxDistance: 0.5 740 | m_AutoUVMaxAngle: 89 741 | m_LightmapParameters: {fileID: 0} 742 | m_SortingLayerID: 0 743 | m_SortingLayer: 0 744 | m_SortingOrder: 0 745 | m_AdditionalVertexStreams: {fileID: 0} 746 | --- !u!1 &1507138425 747 | GameObject: 748 | m_ObjectHideFlags: 0 749 | m_CorrespondingSourceObject: {fileID: 0} 750 | m_PrefabInstance: {fileID: 0} 751 | m_PrefabAsset: {fileID: 0} 752 | serializedVersion: 6 753 | m_Component: 754 | - component: {fileID: 1507138428} 755 | - component: {fileID: 1507138426} 756 | - component: {fileID: 1507138427} 757 | m_Layer: 0 758 | m_Name: Auto_Start_Active 759 | m_TagString: Untagged 760 | m_Icon: {fileID: 0} 761 | m_NavMeshLayer: 0 762 | m_StaticEditorFlags: 0 763 | m_IsActive: 1 764 | --- !u!114 &1507138426 765 | MonoBehaviour: 766 | m_ObjectHideFlags: 0 767 | m_CorrespondingSourceObject: {fileID: 0} 768 | m_PrefabInstance: {fileID: 0} 769 | m_PrefabAsset: {fileID: 0} 770 | m_GameObject: {fileID: 1507138425} 771 | m_Enabled: 1 772 | m_EditorHideFlags: 0 773 | m_Script: {fileID: 11500000, guid: 27677395bd3787f4cb51dd4f75a3c125, type: 3} 774 | m_Name: 775 | m_EditorClassIdentifier: 776 | pub_meshRenderer: {fileID: 0} 777 | pub_colldier_children: [] 778 | pub_audio_children: [] 779 | --- !u!23 &1507138427 780 | MeshRenderer: 781 | m_ObjectHideFlags: 0 782 | m_CorrespondingSourceObject: {fileID: 0} 783 | m_PrefabInstance: {fileID: 0} 784 | m_PrefabAsset: {fileID: 0} 785 | m_GameObject: {fileID: 1507138425} 786 | m_Enabled: 1 787 | m_CastShadows: 1 788 | m_ReceiveShadows: 1 789 | m_DynamicOccludee: 1 790 | m_MotionVectors: 1 791 | m_LightProbeUsage: 1 792 | m_ReflectionProbeUsage: 1 793 | m_RayTracingMode: 2 794 | m_RayTraceProcedural: 0 795 | m_RenderingLayerMask: 1 796 | m_RendererPriority: 0 797 | m_Materials: 798 | - {fileID: 0} 799 | m_StaticBatchInfo: 800 | firstSubMesh: 0 801 | subMeshCount: 0 802 | m_StaticBatchRoot: {fileID: 0} 803 | m_ProbeAnchor: {fileID: 0} 804 | m_LightProbeVolumeOverride: {fileID: 0} 805 | m_ScaleInLightmap: 1 806 | m_ReceiveGI: 1 807 | m_PreserveUVs: 0 808 | m_IgnoreNormalsForChartDetection: 0 809 | m_ImportantGI: 0 810 | m_StitchLightmapSeams: 1 811 | m_SelectedEditorRenderState: 3 812 | m_MinimumChartSize: 4 813 | m_AutoUVMaxDistance: 0.5 814 | m_AutoUVMaxAngle: 89 815 | m_LightmapParameters: {fileID: 0} 816 | m_SortingLayerID: 0 817 | m_SortingLayer: 0 818 | m_SortingOrder: 0 819 | m_AdditionalVertexStreams: {fileID: 0} 820 | --- !u!4 &1507138428 821 | Transform: 822 | m_ObjectHideFlags: 0 823 | m_CorrespondingSourceObject: {fileID: 0} 824 | m_PrefabInstance: {fileID: 0} 825 | m_PrefabAsset: {fileID: 0} 826 | m_GameObject: {fileID: 1507138425} 827 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 828 | m_LocalPosition: {x: 0, y: 0, z: 0} 829 | m_LocalScale: {x: 1, y: 1, z: 1} 830 | m_Children: [] 831 | m_Father: {fileID: 0} 832 | m_RootOrder: 4 833 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 834 | --- !u!1 &1719075756 835 | GameObject: 836 | m_ObjectHideFlags: 0 837 | m_CorrespondingSourceObject: {fileID: 0} 838 | m_PrefabInstance: {fileID: 0} 839 | m_PrefabAsset: {fileID: 0} 840 | serializedVersion: 6 841 | m_Component: 842 | - component: {fileID: 1719075758} 843 | - component: {fileID: 1719075757} 844 | m_Layer: 0 845 | m_Name: TestManager 846 | m_TagString: Untagged 847 | m_Icon: {fileID: 0} 848 | m_NavMeshLayer: 0 849 | m_StaticEditorFlags: 0 850 | m_IsActive: 1 851 | --- !u!114 &1719075757 852 | MonoBehaviour: 853 | m_ObjectHideFlags: 0 854 | m_CorrespondingSourceObject: {fileID: 0} 855 | m_PrefabInstance: {fileID: 0} 856 | m_PrefabAsset: {fileID: 0} 857 | m_GameObject: {fileID: 1719075756} 858 | m_Enabled: 1 859 | m_EditorHideFlags: 0 860 | m_Script: {fileID: 11500000, guid: 5d780a4934f90854a9080daaadcfbd17, type: 3} 861 | m_Name: 862 | m_EditorClassIdentifier: 863 | activeWithAuto: {fileID: 1507138426} 864 | inactiveWithAuto: {fileID: 189738092} 865 | activeWithAuto_inherited: {fileID: 67570401} 866 | inactiveWithAuto_inherited: {fileID: 67570401} 867 | --- !u!4 &1719075758 868 | Transform: 869 | m_ObjectHideFlags: 0 870 | m_CorrespondingSourceObject: {fileID: 0} 871 | m_PrefabInstance: {fileID: 0} 872 | m_PrefabAsset: {fileID: 0} 873 | m_GameObject: {fileID: 1719075756} 874 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 875 | m_LocalPosition: {x: 0, y: 0, z: 0} 876 | m_LocalScale: {x: 1, y: 1, z: 1} 877 | m_Children: [] 878 | m_Father: {fileID: 0} 879 | m_RootOrder: 2 880 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 881 | --- !u!1 &1895773788 882 | GameObject: 883 | m_ObjectHideFlags: 0 884 | m_CorrespondingSourceObject: {fileID: 0} 885 | m_PrefabInstance: {fileID: 0} 886 | m_PrefabAsset: {fileID: 0} 887 | serializedVersion: 6 888 | m_Component: 889 | - component: {fileID: 1895773789} 890 | m_Layer: 0 891 | m_Name: '---------------------- ' 892 | m_TagString: Untagged 893 | m_Icon: {fileID: 0} 894 | m_NavMeshLayer: 0 895 | m_StaticEditorFlags: 0 896 | m_IsActive: 1 897 | --- !u!4 &1895773789 898 | Transform: 899 | m_ObjectHideFlags: 0 900 | m_CorrespondingSourceObject: {fileID: 0} 901 | m_PrefabInstance: {fileID: 0} 902 | m_PrefabAsset: {fileID: 0} 903 | m_GameObject: {fileID: 1895773788} 904 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 905 | m_LocalPosition: {x: 0, y: 0, z: 0} 906 | m_LocalScale: {x: 1, y: 1, z: 1} 907 | m_Children: [] 908 | m_Father: {fileID: 0} 909 | m_RootOrder: 3 910 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 911 | --- !u!1 &1953351999 912 | GameObject: 913 | m_ObjectHideFlags: 0 914 | m_CorrespondingSourceObject: {fileID: 0} 915 | m_PrefabInstance: {fileID: 0} 916 | m_PrefabAsset: {fileID: 0} 917 | serializedVersion: 6 918 | m_Component: 919 | - component: {fileID: 1953352000} 920 | m_Layer: 0 921 | m_Name: '---------------------- ' 922 | m_TagString: Untagged 923 | m_Icon: {fileID: 0} 924 | m_NavMeshLayer: 0 925 | m_StaticEditorFlags: 0 926 | m_IsActive: 1 927 | --- !u!4 &1953352000 928 | Transform: 929 | m_ObjectHideFlags: 0 930 | m_CorrespondingSourceObject: {fileID: 0} 931 | m_PrefabInstance: {fileID: 0} 932 | m_PrefabAsset: {fileID: 0} 933 | m_GameObject: {fileID: 1953351999} 934 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 935 | m_LocalPosition: {x: 0, y: 0, z: 0} 936 | m_LocalScale: {x: 1, y: 1, z: 1} 937 | m_Children: [] 938 | m_Father: {fileID: 0} 939 | m_RootOrder: 6 940 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 941 | --- !u!1 &2047082775 942 | GameObject: 943 | m_ObjectHideFlags: 0 944 | m_CorrespondingSourceObject: {fileID: 0} 945 | m_PrefabInstance: {fileID: 0} 946 | m_PrefabAsset: {fileID: 0} 947 | serializedVersion: 6 948 | m_Component: 949 | - component: {fileID: 2047082777} 950 | - component: {fileID: 2047082776} 951 | m_Layer: 0 952 | m_Name: GameObject 953 | m_TagString: Untagged 954 | m_Icon: {fileID: 0} 955 | m_NavMeshLayer: 0 956 | m_StaticEditorFlags: 0 957 | m_IsActive: 0 958 | --- !u!82 &2047082776 959 | AudioSource: 960 | m_ObjectHideFlags: 0 961 | m_CorrespondingSourceObject: {fileID: 0} 962 | m_PrefabInstance: {fileID: 0} 963 | m_PrefabAsset: {fileID: 0} 964 | m_GameObject: {fileID: 2047082775} 965 | m_Enabled: 1 966 | serializedVersion: 4 967 | OutputAudioMixerGroup: {fileID: 0} 968 | m_audioClip: {fileID: 0} 969 | m_PlayOnAwake: 1 970 | m_Volume: 1 971 | m_Pitch: 1 972 | Loop: 0 973 | Mute: 0 974 | Spatialize: 0 975 | SpatializePostEffects: 0 976 | Priority: 128 977 | DopplerLevel: 1 978 | MinDistance: 1 979 | MaxDistance: 500 980 | Pan2D: 0 981 | rolloffMode: 0 982 | BypassEffects: 0 983 | BypassListenerEffects: 0 984 | BypassReverbZones: 0 985 | rolloffCustomCurve: 986 | serializedVersion: 2 987 | m_Curve: 988 | - serializedVersion: 3 989 | time: 0 990 | value: 1 991 | inSlope: 0 992 | outSlope: 0 993 | tangentMode: 0 994 | weightedMode: 0 995 | inWeight: 0.33333334 996 | outWeight: 0.33333334 997 | - serializedVersion: 3 998 | time: 1 999 | value: 0 1000 | inSlope: 0 1001 | outSlope: 0 1002 | tangentMode: 0 1003 | weightedMode: 0 1004 | inWeight: 0.33333334 1005 | outWeight: 0.33333334 1006 | m_PreInfinity: 2 1007 | m_PostInfinity: 2 1008 | m_RotationOrder: 4 1009 | panLevelCustomCurve: 1010 | serializedVersion: 2 1011 | m_Curve: 1012 | - serializedVersion: 3 1013 | time: 0 1014 | value: 0 1015 | inSlope: 0 1016 | outSlope: 0 1017 | tangentMode: 0 1018 | weightedMode: 0 1019 | inWeight: 0.33333334 1020 | outWeight: 0.33333334 1021 | m_PreInfinity: 2 1022 | m_PostInfinity: 2 1023 | m_RotationOrder: 4 1024 | spreadCustomCurve: 1025 | serializedVersion: 2 1026 | m_Curve: 1027 | - serializedVersion: 3 1028 | time: 0 1029 | value: 0 1030 | inSlope: 0 1031 | outSlope: 0 1032 | tangentMode: 0 1033 | weightedMode: 0 1034 | inWeight: 0.33333334 1035 | outWeight: 0.33333334 1036 | m_PreInfinity: 2 1037 | m_PostInfinity: 2 1038 | m_RotationOrder: 4 1039 | reverbZoneMixCustomCurve: 1040 | serializedVersion: 2 1041 | m_Curve: 1042 | - serializedVersion: 3 1043 | time: 0 1044 | value: 1 1045 | inSlope: 0 1046 | outSlope: 0 1047 | tangentMode: 0 1048 | weightedMode: 0 1049 | inWeight: 0.33333334 1050 | outWeight: 0.33333334 1051 | m_PreInfinity: 2 1052 | m_PostInfinity: 2 1053 | m_RotationOrder: 4 1054 | --- !u!4 &2047082777 1055 | Transform: 1056 | m_ObjectHideFlags: 0 1057 | m_CorrespondingSourceObject: {fileID: 0} 1058 | m_PrefabInstance: {fileID: 0} 1059 | m_PrefabAsset: {fileID: 0} 1060 | m_GameObject: {fileID: 2047082775} 1061 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1062 | m_LocalPosition: {x: 0, y: 0, z: 0} 1063 | m_LocalScale: {x: 1, y: 1, z: 1} 1064 | m_Children: 1065 | - {fileID: 67570402} 1066 | m_Father: {fileID: 0} 1067 | m_RootOrder: 7 1068 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1069 | --------------------------------------------------------------------------------