diff --git a/.exrc b/.exrc new file mode 100644 index 0000000..e69de29 diff --git a/Assets/ActionEventSystem.cs b/Assets/ActionEventSystem.cs new file mode 100644 index 0000000..f13aa33 --- /dev/null +++ b/Assets/ActionEventSystem.cs @@ -0,0 +1,149 @@ +using FishNet.Example.ColliderRollbacks; +using UnityEngine; + +public class ActionEventSystem : MonoBehaviour +{ + //public static ActionEventSystem instance; + [SerializeField] private Camera PlayerCamera; + public float actionRange = 200f; + public LayerMask actionMask; + + // Attach network scripts from player to this script + //[TextArea] + [Header("Player harvesting scripts")] + public TreeCutting treeCutting; + public OreCutting oreCutting; + + // Start is called once before the first execution of Update after the MonoBehaviour is created + void Start() + { + actionMask = LayerMask.GetMask("HarvestObject"); + } + /* + private void Awake() + { + if (instance != null) + { + Destroy(gameObject); + } + else + { + DontDestroyOnLoad(gameObject); + instance = this; + } + } + */ + // Update is called once per frame + void Update() + { + if (Input.GetMouseButtonDown(0)) + { + //if (Animator != null) Animator.SetTrigger("Attack"); + //FunctionTimer.Create(AnimationEvent_OnHit, 0.5f); + + //Ray CameraRay = PlayerCamera.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0f)); + + Ray ray = PlayerCamera.ScreenPointToRay(Input.mousePosition); + //RaycastHit hit; + Debug.Log("apple"); + Debug.DrawRay(PlayerCamera.transform.position, PlayerCamera.ScreenToWorldPoint(Input.mousePosition), Color.green); + Debug.Log("banana"); + + if (Physics.Raycast(ray, out RaycastHit HitInfo, 200f)) + { + Debug.Log("Kiwi"); + Debug.Log("HitInfo.collider.gameObject: " + HitInfo.collider.gameObject); + if (HitInfo.collider.gameObject.GetComponent()) + { + + + + Debug.Log("Peach"); + GameObject localPlayer = PlayerBehaviour.instance.gameObject; + + Vector3 directionToTarget = localPlayer.transform.position - HitInfo.transform.position; + float angle = Vector3.Angle(localPlayer.transform.forward, directionToTarget); + + // Print angle + Debug.Log("angle: " + angle); + + if (angle > 90) + { + Debug.Log("angle is greater than 90"); + // Cut the tree here + } + + + Debug.Log("Orange"); + Debug.Log("HitInfo.transform.gameObject: " + HitInfo.transform.gameObject); + GameObject objectToAction = HitInfo.transform.gameObject; + + if (objectToAction.TryGetComponent(out ResourceNode resourceNode)) + { + // Check if the object is a tree + if (objectToAction.TryGetComponent(out TreeHealth treeHealth)) + { + // Not sure if the following "if" statements work. + if (treeHealth == null) + { + Debug.LogError("treeHealth is null"); + } + if (resourceNode == null) + { + Debug.LogError("resourceNode is null"); + } + if (objectToAction == null) + { + Debug.LogError("objectToAction is null"); + } + // + if (HitInfo.collider == null) + { + Debug.LogError("HitInfo is null"); + } + if (treeCutting == null) + { + Debug.LogError("treeCutting is null"); + } + + // Print all values + Debug.Log("treeHealth: " + treeHealth); + Debug.Log("resourceNode: " + resourceNode); + Debug.Log("objectToAction: " + objectToAction); + Debug.Log("HitInfo: " + HitInfo); + + + treeCutting.StartCuttingEvent(treeHealth, resourceNode, objectToAction, HitInfo, gameObject); + + } + + // Check if object is an ore + else if (objectToAction.TryGetComponent(out OreHealth oreHealth)) + { + // Not sure if the following "if" statements work. + if (oreHealth == null) + { + Debug.LogError("oreHealth is null"); + } + if (resourceNode == null) + { + Debug.LogError("resourceNode is null"); + } + if (objectToAction == null) + { + Debug.LogError("objectToAction is null"); + } + // + if (HitInfo.collider == null) + { + Debug.LogError("HitInfo is null"); + } + + oreCutting.StartMiningEvent(oreHealth, resourceNode, objectToAction, HitInfo, gameObject); + } + } + } + } + } + } +} diff --git a/Assets/ActionEventSystem.cs.meta b/Assets/ActionEventSystem.cs.meta new file mode 100644 index 0000000..e97310d --- /dev/null +++ b/Assets/ActionEventSystem.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 7222d1b71a06d9f4fbefd34c63d8d3cb \ No newline at end of file diff --git a/Assets/Packages/FishNet/Demos/Prediction V1.meta b/Assets/AddressableAssetsData.meta similarity index 77% rename from Assets/Packages/FishNet/Demos/Prediction V1.meta rename to Assets/AddressableAssetsData.meta index 164e4c8..fa2a33e 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1.meta +++ b/Assets/AddressableAssetsData.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8aeb1a8074d28ab4fac6980af44d315c +guid: 84d1cfc0cadcc6c479abf91d2079eb29 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/AddressableAssetsData/AddressableAssetSettings.asset b/Assets/AddressableAssetsData/AddressableAssetSettings.asset new file mode 100644 index 0000000..f4dece9 --- /dev/null +++ b/Assets/AddressableAssetsData/AddressableAssetSettings.asset @@ -0,0 +1,114 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 468a46d0ae32c3544b7d98094e6448a9, type: 3} + m_Name: AddressableAssetSettings + m_EditorClassIdentifier: + m_DefaultGroup: 562e54830f7fa6c4a9dc4b28b9b7114a + m_currentHash: + serializedVersion: 2 + Hash: a867fe6cc77641794dfe54e2b21ea9db + m_OptimizeCatalogSize: 0 + m_BuildRemoteCatalog: 0 + m_CatalogRequestsTimeout: 0 + m_DisableCatalogUpdateOnStart: 0 + m_InternalIdNamingMode: 0 + m_InternalBundleIdMode: 1 + m_AssetLoadMode: 0 + m_BundledAssetProviderType: + m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider + m_AssetBundleProviderType: + m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider + m_IgnoreUnsupportedFilesInBuild: 0 + m_UniqueBundleIds: 0 + m_EnableJsonCatalog: 0 + m_NonRecursiveBuilding: 1 + m_CCDEnabled: 0 + m_maxConcurrentWebRequests: 3 + m_UseUWRForLocalBundles: 0 + m_BundleTimeout: 0 + m_BundleRetryCount: 0 + m_BundleRedirectLimit: -1 + m_SharedBundleSettings: 0 + m_SharedBundleSettingsCustomGroupIndex: 0 + m_ContiguousBundles: 1 + m_StripUnityVersionFromBundleBuild: 0 + m_DisableVisibleSubAssetRepresentations: 0 + m_BuiltInBundleNaming: 0 + mBuiltInBundleCustomNaming: + m_MonoScriptBundleNaming: 0 + m_CheckForContentUpdateRestrictionsOption: 0 + m_MonoScriptBundleCustomNaming: + m_RemoteCatalogBuildPath: + m_Id: + m_RemoteCatalogLoadPath: + m_Id: + m_ContentStateBuildPathProfileVariableName: + m_CustomContentStateBuildPath: + m_ContentStateBuildPath: + m_BuildAddressablesWithPlayerBuild: 0 + m_overridePlayerVersion: '[UnityEditor.PlayerSettings.bundleVersion]' + m_GroupAssets: + - {fileID: 11400000, guid: 507cc395d7f736148ab69ad1100a8001, type: 2} + m_BuildSettings: + m_LogResourceManagerExceptions: 1 + m_BundleBuildPath: Temp/com.unity.addressables/AssetBundles + m_ProfileSettings: + m_Profiles: + - m_InheritedParent: + m_Id: d03c44aa155744d47bfb77b2420b842b + m_ProfileName: Default + m_Values: + - m_Id: 2783672f151d07b4fa4db6700a9dca9b + m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]' + - m_Id: 5645313b35e066a4aaf32695845a92c0 + m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]' + - m_Id: b1d511631d8387840b80e66cdfc71024 + m_Value: + - m_Id: d58bc4176e21d9744a442841d2e52d06 + m_Value: 'ServerData/[BuildTarget]' + - m_Id: fa2274866e0aeb74e894560f33e41b6d + m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]' + m_ProfileEntryNames: + - m_Id: 2783672f151d07b4fa4db6700a9dca9b + m_Name: Local.LoadPath + m_InlineUsage: 0 + - m_Id: 5645313b35e066a4aaf32695845a92c0 + m_Name: Local.BuildPath + m_InlineUsage: 0 + - m_Id: b1d511631d8387840b80e66cdfc71024 + m_Name: Remote.LoadPath + m_InlineUsage: 0 + - m_Id: d58bc4176e21d9744a442841d2e52d06 + m_Name: Remote.BuildPath + m_InlineUsage: 0 + - m_Id: fa2274866e0aeb74e894560f33e41b6d + m_Name: BuildTarget + m_InlineUsage: 0 + m_ProfileVersion: 1 + m_LabelTable: + m_LabelNames: + - default + m_SchemaTemplates: [] + m_GroupTemplateObjects: + - {fileID: 11400000, guid: a5dac73b603d79446829db7ed9c48829, type: 2} + m_InitializationObjects: [] + m_CertificateHandlerType: + m_AssemblyName: + m_ClassName: + m_ActivePlayerDataBuilderIndex: 2 + m_DataBuilders: + - {fileID: 11400000, guid: d0cbc252516600c4cab02ae7136cbec7, type: 2} + - {fileID: 11400000, guid: 1f6f04afbdae44146bed71b1f74bce84, type: 2} + - {fileID: 11400000, guid: 32ae2e68f7ae7334bb751c769464e3a1, type: 2} + m_ActiveProfileId: d03c44aa155744d47bfb77b2420b842b diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Prefabs/_CharacterControllerPredictionV1_Prefabs.asset.meta b/Assets/AddressableAssetsData/AddressableAssetSettings.asset.meta similarity index 79% rename from Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Prefabs/_CharacterControllerPredictionV1_Prefabs.asset.meta rename to Assets/AddressableAssetsData/AddressableAssetSettings.asset.meta index 72c0d14..f8f1b28 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Prefabs/_CharacterControllerPredictionV1_Prefabs.asset.meta +++ b/Assets/AddressableAssetsData/AddressableAssetSettings.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e6dd3b3c563e29d48a7713686d8ddc3f +guid: c6ae8d145acb1c84ab9aa0422fdc5b52 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController.meta b/Assets/AddressableAssetsData/AssetGroupTemplates.meta similarity index 77% rename from Assets/Packages/FishNet/Demos/Prediction V1/CharacterController.meta rename to Assets/AddressableAssetsData/AssetGroupTemplates.meta index 17976a5..1bc18f4 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController.meta +++ b/Assets/AddressableAssetsData/AssetGroupTemplates.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 230c2017a86406d4a8ec35e17d5208a7 +guid: 8db7952ab0033bd4dbfad6d0de58d519 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset b/Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset new file mode 100644 index 0000000..78bb78c --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset @@ -0,0 +1,78 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1a3c5d64ac83548c09dd1678b9f6f1cd, type: 3} + m_Name: Packed Assets + m_EditorClassIdentifier: + m_SchemaObjects: + - {fileID: 3689498582553609845} + - {fileID: 5830244726355074738} + m_Description: Pack assets into asset bundles. + m_Settings: {fileID: 11400000, guid: c6ae8d145acb1c84ab9aa0422fdc5b52, type: 2} +--- !u!114 &3689498582553609845 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3} + m_Name: BundledAssetGroupSchema + m_EditorClassIdentifier: + m_Group: {fileID: 0} + m_InternalBundleIdMode: 1 + m_Compression: 1 + m_IncludeAddressInCatalog: 1 + m_IncludeGUIDInCatalog: 1 + m_IncludeLabelsInCatalog: 1 + m_InternalIdNamingMode: 0 + m_CacheClearBehavior: 0 + m_IncludeInBuild: 1 + m_BundledAssetProviderType: + m_AssemblyName: + m_ClassName: + m_ForceUniqueProvider: 0 + m_UseAssetBundleCache: 1 + m_UseAssetBundleCrc: 1 + m_UseAssetBundleCrcForCachedBundles: 1 + m_UseUWRForLocalBundles: 0 + m_Timeout: 0 + m_ChunkedTransfer: 0 + m_RedirectLimit: -1 + m_RetryCount: 0 + m_BuildPath: + m_Id: + m_LoadPath: + m_Id: + m_BundleMode: 0 + m_AssetBundleProviderType: + m_AssemblyName: + m_ClassName: + m_UseDefaultSchemaSettings: 0 + m_SelectedPathPairIndex: 0 + m_BundleNaming: 0 + m_AssetLoadMode: 0 +--- !u!114 &5830244726355074738 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3} + m_Name: ContentUpdateGroupSchema + m_EditorClassIdentifier: + m_Group: {fileID: 0} + m_StaticContent: 0 diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/_RigidbodyPredictionV1_Prefabs.asset.meta b/Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset.meta similarity index 79% rename from Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/_RigidbodyPredictionV1_Prefabs.asset.meta rename to Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset.meta index 984d740..c484730 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/_RigidbodyPredictionV1_Prefabs.asset.meta +++ b/Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8b2d830335dadc34d8691d8402179638 +guid: a5dac73b603d79446829db7ed9c48829 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Prefabs.meta b/Assets/AddressableAssetsData/AssetGroups.meta similarity index 77% rename from Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Prefabs.meta rename to Assets/AddressableAssetsData/AssetGroups.meta index 4c5848c..89a12dc 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Prefabs.meta +++ b/Assets/AddressableAssetsData/AssetGroups.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e80beaf17328f7b47b034104cd15eff3 +guid: 03e7a8200a9a44747b81b56032d304da folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset new file mode 100644 index 0000000..a2d8236 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset @@ -0,0 +1,23 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3} + m_Name: Default Local Group + m_EditorClassIdentifier: + m_GroupName: Default Local Group + m_GUID: 562e54830f7fa6c4a9dc4b28b9b7114a + m_SerializeEntries: [] + m_ReadOnly: 0 + m_Settings: {fileID: 11400000, guid: c6ae8d145acb1c84ab9aa0422fdc5b52, type: 2} + m_SchemaSet: + m_Schemas: + - {fileID: 11400000, guid: 9c4d750e2df891b46ace1be7f8aceb40, type: 2} + - {fileID: 11400000, guid: d5f6d98d014db11418f67833fb656005, type: 2} diff --git a/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset.meta new file mode 100644 index 0000000..dc35ae1 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 507cc395d7f736148ab69ad1100a8001 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scenes.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas.meta similarity index 77% rename from Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scenes.meta rename to Assets/AddressableAssetsData/AssetGroups/Schemas.meta index 8d8cc36..b509363 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scenes.meta +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f7b6af2e9dbad8149bef3a9951f34a6e +guid: a156e3052b093c143b495d84eeb619e6 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset new file mode 100644 index 0000000..b7da04a --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset @@ -0,0 +1,47 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3} + m_Name: Default Local Group_BundledAssetGroupSchema + m_EditorClassIdentifier: + m_Group: {fileID: 11400000, guid: 507cc395d7f736148ab69ad1100a8001, type: 2} + m_InternalBundleIdMode: 1 + m_Compression: 1 + m_IncludeAddressInCatalog: 1 + m_IncludeGUIDInCatalog: 1 + m_IncludeLabelsInCatalog: 1 + m_InternalIdNamingMode: 0 + m_CacheClearBehavior: 0 + m_IncludeInBuild: 1 + m_BundledAssetProviderType: + m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider + m_ForceUniqueProvider: 0 + m_UseAssetBundleCache: 1 + m_UseAssetBundleCrc: 1 + m_UseAssetBundleCrcForCachedBundles: 1 + m_UseUWRForLocalBundles: 0 + m_Timeout: 0 + m_ChunkedTransfer: 0 + m_RedirectLimit: -1 + m_RetryCount: 0 + m_BuildPath: + m_Id: 5645313b35e066a4aaf32695845a92c0 + m_LoadPath: + m_Id: 2783672f151d07b4fa4db6700a9dca9b + m_BundleMode: 0 + m_AssetBundleProviderType: + m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider + m_UseDefaultSchemaSettings: 0 + m_SelectedPathPairIndex: 0 + m_BundleNaming: 0 + m_AssetLoadMode: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset.meta new file mode 100644 index 0000000..cac2c64 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9c4d750e2df891b46ace1be7f8aceb40 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/_RigidbodyPredictionV1_Prefabs.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset similarity index 50% rename from Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/_RigidbodyPredictionV1_Prefabs.asset rename to Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset index f0f0495..e6971d3 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/_RigidbodyPredictionV1_Prefabs.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset @@ -9,9 +9,8 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4489d77032a81ef42b0067acf2737d4d, type: 3} - m_Name: _RigidbodyPredictionV1_Prefabs + m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3} + m_Name: Default Local Group_ContentUpdateGroupSchema m_EditorClassIdentifier: - _prefabs: - - {fileID: 201277550, guid: d904f93bc171bb144ba33c5155282f6f, type: 3} - - {fileID: 3624261834906416601, guid: 4e1673ccc2acac543871855a0e8bed71, type: 3} + m_Group: {fileID: 11400000, guid: 507cc395d7f736148ab69ad1100a8001, type: 2} + m_StaticContent: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset.meta new file mode 100644 index 0000000..3e70caa --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d5f6d98d014db11418f67833fb656005 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/DataBuilders.meta b/Assets/AddressableAssetsData/DataBuilders.meta new file mode 100644 index 0000000..fdb8e03 --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6a138f277a7ce5640a817351883d44c8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset b/Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset new file mode 100644 index 0000000..50d30dc --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 88d21199f5d473f4db36845f2318f180, type: 3} + m_Name: BuildScriptFastMode + m_EditorClassIdentifier: + instanceProviderType: + m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider + sceneProviderType: + m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider diff --git a/Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset.meta b/Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset.meta new file mode 100644 index 0000000..0eab572 --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d0cbc252516600c4cab02ae7136cbec7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset new file mode 100644 index 0000000..ec875f9 --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3e2e0ffa088c91d41a086d0b8cb16bdc, type: 3} + m_Name: BuildScriptPackedMode + m_EditorClassIdentifier: + instanceProviderType: + m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider + sceneProviderType: + m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider diff --git a/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset.meta b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset.meta new file mode 100644 index 0000000..889ef36 --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 32ae2e68f7ae7334bb751c769464e3a1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset new file mode 100644 index 0000000..7628845 --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ad8c280d42ee0ed41a27db23b43dd2bf, type: 3} + m_Name: BuildScriptPackedPlayMode + m_EditorClassIdentifier: + instanceProviderType: + m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider + sceneProviderType: + m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider diff --git a/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset.meta b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset.meta new file mode 100644 index 0000000..fd072f9 --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1f6f04afbdae44146bed71b1f74bce84 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Prefabs/_CharacterControllerPredictionV1_Prefabs.asset b/Assets/AddressableAssetsData/DefaultObject.asset similarity index 56% rename from Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Prefabs/_CharacterControllerPredictionV1_Prefabs.asset rename to Assets/AddressableAssetsData/DefaultObject.asset index 301ff08..b0a5004 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Prefabs/_CharacterControllerPredictionV1_Prefabs.asset +++ b/Assets/AddressableAssetsData/DefaultObject.asset @@ -9,8 +9,7 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4489d77032a81ef42b0067acf2737d4d, type: 3} - m_Name: _CharacterControllerPredictionV1_Prefabs + m_Script: {fileID: 11500000, guid: 3a189bb168d8d90478a09ea08c2f3d72, type: 3} + m_Name: DefaultObject m_EditorClassIdentifier: - _prefabs: - - {fileID: 9117857247562382210, guid: b2991431a5f893e49937d01b6da44ff8, type: 3} + m_AddressableAssetSettingsGuid: c6ae8d145acb1c84ab9aa0422fdc5b52 diff --git a/Assets/AddressableAssetsData/DefaultObject.asset.meta b/Assets/AddressableAssetsData/DefaultObject.asset.meta new file mode 100644 index 0000000..f504932 --- /dev/null +++ b/Assets/AddressableAssetsData/DefaultObject.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c9a8c8c6818bfef4f869985a69c1911a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/DefaultPrefabObjects.asset b/Assets/DefaultPrefabObjects.asset index 63a1c49..c750e2c 100644 --- a/Assets/DefaultPrefabObjects.asset +++ b/Assets/DefaultPrefabObjects.asset @@ -26,10 +26,9 @@ MonoBehaviour: - {fileID: 4512293259955182956, guid: f32d4c19de900e64cb73cedcb8ba6f70, type: 3} - {fileID: 4512293259955182956, guid: 300370bdf7819da41937e0beac65b32c, type: 3} - {fileID: 611616139817875448, guid: bf5f023b4017a5e41a9815ec5745df3d, type: 3} - - {fileID: 9117857247562382210, guid: b2991431a5f893e49937d01b6da44ff8, type: 3} - - {fileID: 3624261834906416601, guid: 4e1673ccc2acac543871855a0e8bed71, type: 3} - - {fileID: 201277550, guid: d904f93bc171bb144ba33c5155282f6f, type: 3} - - {fileID: 27039729695437543, guid: f820efff6a2871447b961fc755212ba3, type: 3} - - {fileID: 201277550, guid: 5b712878ecece354ba4ffb026c0a221c, type: 3} - - {fileID: 201277550, guid: 8ef354bfc16ca8a459074c3fa9b6727e, type: 3} - {fileID: 8192566354860284824, guid: 6331b3542e64a564c81bc39cedf70c8d, type: 3} + - {fileID: 5709519418627318175, guid: 62f6191494f161340b448c5f6a7f56d8, type: 3} + - {fileID: 8044742303634670091, guid: 3dd97330b2ebd884e9f796894e026064, type: 3} + - {fileID: 4551307129314773795, guid: 4202bcf0261b7184381139880446dfd6, type: 3} + - {fileID: 3996993051428017444, guid: c31bf8ec8e29cd74f9fb9a970fde7a53, type: 3} + - {fileID: 3140467927907951877, guid: d250af4848f51154f9a2bf6a85b60ac2, type: 3} diff --git a/Assets/DefaultVolumeProfile.asset b/Assets/DefaultVolumeProfile.asset new file mode 100644 index 0000000..b6b68aa --- /dev/null +++ b/Assets/DefaultVolumeProfile.asset @@ -0,0 +1,792 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-7484661196479564513 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3eb4b772797da9440885e8bd939e9560, type: 3} + m_Name: ColorCurves + m_EditorClassIdentifier: + active: 1 + master: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + red: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + green: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + blue: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + hueVsHue: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 1 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + hueVsSat: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 1 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + satVsSat: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 0 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + lumVsSat: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 0 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!114 &-5865781932985697865 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 899c54efeace73346a0a16faa3afe726, type: 3} + m_Name: Vignette + m_EditorClassIdentifier: + active: 1 + color: + m_OverrideState: 1 + m_Value: {r: 0, g: 0, b: 0, a: 1} + center: + m_OverrideState: 1 + m_Value: {x: 0.5, y: 0.5} + intensity: + m_OverrideState: 1 + m_Value: 0 + smoothness: + m_OverrideState: 1 + m_Value: 0.2 + rounded: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &-4234806046711696961 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ccf1aba9553839d41ae37dd52e9ebcce, type: 3} + m_Name: MotionBlur + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 0 + quality: + m_OverrideState: 1 + m_Value: 0 + intensity: + m_OverrideState: 1 + m_Value: 0 + clamp: + m_OverrideState: 1 + m_Value: 0.05 +--- !u!114 &-2666695696549068436 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 81180773991d8724ab7f2d216912b564, type: 3} + m_Name: ChromaticAberration + m_EditorClassIdentifier: + active: 1 + intensity: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &-2240273641677796588 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3} + m_Name: Bloom + m_EditorClassIdentifier: + active: 1 + skipIterations: + m_OverrideState: 1 + m_Value: 1 + threshold: + m_OverrideState: 1 + m_Value: 0.9 + intensity: + m_OverrideState: 1 + m_Value: 0 + scatter: + m_OverrideState: 1 + m_Value: 0.7 + clamp: + m_OverrideState: 1 + m_Value: 65472 + tint: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + highQualityFiltering: + m_OverrideState: 1 + m_Value: 0 + downscale: + m_OverrideState: 1 + m_Value: 0 + maxIterations: + m_OverrideState: 1 + m_Value: 6 + dirtTexture: + m_OverrideState: 1 + m_Value: {fileID: 0} + dimension: 1 + dirtIntensity: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &-2093160870549110050 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb60a22f311433c4c962b888d1393f88, type: 3} + m_Name: PaniniProjection + m_EditorClassIdentifier: + active: 1 + distance: + m_OverrideState: 1 + m_Value: 0 + cropToFit: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &-1520794775209376633 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 29fa0085f50d5e54f8144f766051a691, type: 3} + m_Name: FilmGrain + m_EditorClassIdentifier: + active: 1 + type: + m_OverrideState: 1 + m_Value: 0 + intensity: + m_OverrideState: 1 + m_Value: 0 + response: + m_OverrideState: 1 + m_Value: 0.8 + texture: + m_OverrideState: 1 + m_Value: {fileID: 0} +--- !u!114 &-1339229886305648739 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5485954d14dfb9a4c8ead8edb0ded5b1, type: 3} + m_Name: LiftGammaGain + m_EditorClassIdentifier: + active: 1 + lift: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + gamma: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + gain: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} +--- !u!114 &-535291149289589148 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cdfbdbb87d3286943a057f7791b43141, type: 3} + m_Name: ChannelMixer + m_EditorClassIdentifier: + active: 1 + redOutRedIn: + m_OverrideState: 1 + m_Value: 100 + redOutGreenIn: + m_OverrideState: 1 + m_Value: 0 + redOutBlueIn: + m_OverrideState: 1 + m_Value: 0 + greenOutRedIn: + m_OverrideState: 1 + m_Value: 0 + greenOutGreenIn: + m_OverrideState: 1 + m_Value: 100 + greenOutBlueIn: + m_OverrideState: 1 + m_Value: 0 + blueOutRedIn: + m_OverrideState: 1 + m_Value: 0 + blueOutGreenIn: + m_OverrideState: 1 + m_Value: 0 + blueOutBlueIn: + m_OverrideState: 1 + m_Value: 100 +--- !u!114 &-20546021647213045 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 221518ef91623a7438a71fef23660601, type: 3} + m_Name: WhiteBalance + m_EditorClassIdentifier: + active: 1 + temperature: + m_OverrideState: 1 + m_Value: 0 + tint: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: DefaultVolumeProfile + m_EditorClassIdentifier: + components: + - {fileID: 8271864942732200948} + - {fileID: -4234806046711696961} + - {fileID: -20546021647213045} + - {fileID: 4022655911936789629} + - {fileID: -2666695696549068436} + - {fileID: 927738304468461926} + - {fileID: 7771133030641843505} + - {fileID: 5225980394055025235} + - {fileID: -1339229886305648739} + - {fileID: -2093160870549110050} + - {fileID: 8252998849913213991} + - {fileID: 606325636720167840} + - {fileID: -535291149289589148} + - {fileID: 6755560124153291243} + - {fileID: -5865781932985697865} + - {fileID: -1520794775209376633} + - {fileID: -7484661196479564513} + - {fileID: -2240273641677796588} + - {fileID: 8316415860330165568} +--- !u!114 &606325636720167840 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e021b4c809a781e468c2988c016ebbea, type: 3} + m_Name: ColorLookup + m_EditorClassIdentifier: + active: 1 + texture: + m_OverrideState: 1 + m_Value: {fileID: 0} + dimension: 1 + contribution: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &927738304468461926 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 66f335fb1ffd8684294ad653bf1c7564, type: 3} + m_Name: ColorAdjustments + m_EditorClassIdentifier: + active: 1 + postExposure: + m_OverrideState: 1 + m_Value: 0 + contrast: + m_OverrideState: 1 + m_Value: 0 + colorFilter: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + hueShift: + m_OverrideState: 1 + m_Value: 0 + saturation: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &4022655911936789629 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c5e1dc532bcb41949b58bc4f2abfbb7e, type: 3} + m_Name: LensDistortion + m_EditorClassIdentifier: + active: 1 + intensity: + m_OverrideState: 1 + m_Value: 0 + xMultiplier: + m_OverrideState: 1 + m_Value: 1 + yMultiplier: + m_OverrideState: 1 + m_Value: 1 + center: + m_OverrideState: 1 + m_Value: {x: 0.5, y: 0.5} + scale: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &5225980394055025235 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c01700fd266d6914ababb731e09af2eb, type: 3} + m_Name: DepthOfField + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 0 + gaussianStart: + m_OverrideState: 1 + m_Value: 10 + gaussianEnd: + m_OverrideState: 1 + m_Value: 30 + gaussianMaxRadius: + m_OverrideState: 1 + m_Value: 1 + highQualitySampling: + m_OverrideState: 1 + m_Value: 0 + focusDistance: + m_OverrideState: 1 + m_Value: 10 + aperture: + m_OverrideState: 1 + m_Value: 5.6 + focalLength: + m_OverrideState: 1 + m_Value: 50 + bladeCount: + m_OverrideState: 1 + m_Value: 5 + bladeCurvature: + m_OverrideState: 1 + m_Value: 1 + bladeRotation: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &6755560124153291243 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 558a8e2b6826cf840aae193990ba9f2e, type: 3} + m_Name: ShadowsMidtonesHighlights + m_EditorClassIdentifier: + active: 1 + shadows: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + midtones: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + highlights: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + shadowsStart: + m_OverrideState: 1 + m_Value: 0 + shadowsEnd: + m_OverrideState: 1 + m_Value: 0.3 + highlightsStart: + m_OverrideState: 1 + m_Value: 0.55 + highlightsEnd: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &7771133030641843505 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 06437c1ff663d574d9447842ba0a72e4, type: 3} + m_Name: ScreenSpaceLensFlare + m_EditorClassIdentifier: + active: 1 + intensity: + m_OverrideState: 1 + m_Value: 0 + tintColor: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomMip: + m_OverrideState: 1 + m_Value: 1 + firstFlareIntensity: + m_OverrideState: 1 + m_Value: 1 + secondaryFlareIntensity: + m_OverrideState: 1 + m_Value: 1 + warpedFlareIntensity: + m_OverrideState: 1 + m_Value: 1 + warpedFlareScale: + m_OverrideState: 1 + m_Value: {x: 1, y: 1} + samples: + m_OverrideState: 1 + m_Value: 1 + sampleDimmer: + m_OverrideState: 1 + m_Value: 0.5 + vignetteEffect: + m_OverrideState: 1 + m_Value: 1 + startingPosition: + m_OverrideState: 1 + m_Value: 1.25 + scale: + m_OverrideState: 1 + m_Value: 1.5 + streaksIntensity: + m_OverrideState: 1 + m_Value: 0 + streaksLength: + m_OverrideState: 1 + m_Value: 0.5 + streaksOrientation: + m_OverrideState: 1 + m_Value: 0 + streaksThreshold: + m_OverrideState: 1 + m_Value: 0.25 + resolution: + m_OverrideState: 1 + m_Value: 4 + chromaticAbberationIntensity: + m_OverrideState: 1 + m_Value: 0.5 +--- !u!114 &8252998849913213991 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 70afe9e12c7a7ed47911bb608a23a8ff, type: 3} + m_Name: SplitToning + m_EditorClassIdentifier: + active: 1 + shadows: + m_OverrideState: 1 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + highlights: + m_OverrideState: 1 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + balance: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &8271864942732200948 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3} + m_Name: Tonemapping + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 0 + neutralHDRRangeReductionMode: + m_OverrideState: 1 + m_Value: 2 + acesPreset: + m_OverrideState: 1 + m_Value: 3 + hueShiftAmount: + m_OverrideState: 1 + m_Value: 0 + detectPaperWhite: + m_OverrideState: 1 + m_Value: 0 + paperWhite: + m_OverrideState: 1 + m_Value: 300 + detectBrightnessLimits: + m_OverrideState: 1 + m_Value: 1 + minNits: + m_OverrideState: 1 + m_Value: 0.005 + maxNits: + m_OverrideState: 1 + m_Value: 1000 +--- !u!114 &8316415860330165568 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6bd486065ce11414fa40e631affc4900, type: 3} + m_Name: ProbeVolumesOptions + m_EditorClassIdentifier: + active: 1 + normalBias: + m_OverrideState: 1 + m_Value: 0.33 + viewBias: + m_OverrideState: 1 + m_Value: 0 + scaleBiasWithMinProbeDistance: + m_OverrideState: 1 + m_Value: 0 + samplingNoise: + m_OverrideState: 1 + m_Value: 0.1 + animateSamplingNoise: + m_OverrideState: 1 + m_Value: 1 + leakReductionMode: + m_OverrideState: 1 + m_Value: 2 + minValidDotProductValue: + m_OverrideState: 1 + m_Value: 0.1 + occlusionOnlyReflectionNormalization: + m_OverrideState: 1 + m_Value: 1 + intensityMultiplier: + m_OverrideState: 1 + m_Value: 1 + skyOcclusionIntensityMultiplier: + m_OverrideState: 1 + m_Value: 1 diff --git a/Assets/DefaultVolumeProfile.asset.meta b/Assets/DefaultVolumeProfile.asset.meta new file mode 100644 index 0000000..e5f1152 --- /dev/null +++ b/Assets/DefaultVolumeProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 72cab1c384582284da8c8e10338d0a20 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FirTree.asset b/Assets/FirTree.asset new file mode 100644 index 0000000..9fc72da --- /dev/null +++ b/Assets/FirTree.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 452359ef443bb3a4687ce59aa85a85a7, type: 3} + m_Name: FirTree + m_EditorClassIdentifier: + objectName: FirTree + minAmount: 3 + maxAmount: 6 + harvestLevel: 0 + harvestXP: 1 + defaultHealth: 100 + harvestType: 0 diff --git a/Assets/FirTree.asset.meta b/Assets/FirTree.asset.meta new file mode 100644 index 0000000..de085e1 --- /dev/null +++ b/Assets/FirTree.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 11ac672fa871a08458ec1cef88fbba92 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/FishNet.meta b/Assets/FishNet.meta similarity index 100% rename from Assets/Packages/FishNet.meta rename to Assets/FishNet.meta diff --git a/Assets/Packages/FishNet/CodeGenerating.meta b/Assets/FishNet/CodeGenerating.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating.meta rename to Assets/FishNet/CodeGenerating.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension.meta b/Assets/FishNet/CodeGenerating/Extension.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Extension.meta rename to Assets/FishNet/CodeGenerating/Extension.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension/FieldDefinitionExtensions.cs b/Assets/FishNet/CodeGenerating/Extension/FieldDefinitionExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Extension/FieldDefinitionExtensions.cs rename to Assets/FishNet/CodeGenerating/Extension/FieldDefinitionExtensions.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension/FieldDefinitionExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Extension/FieldDefinitionExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Extension/FieldDefinitionExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Extension/FieldDefinitionExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension/FieldReferenceExtensions.cs b/Assets/FishNet/CodeGenerating/Extension/FieldReferenceExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Extension/FieldReferenceExtensions.cs rename to Assets/FishNet/CodeGenerating/Extension/FieldReferenceExtensions.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension/FieldReferenceExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Extension/FieldReferenceExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Extension/FieldReferenceExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Extension/FieldReferenceExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension/ILProcessorExtensions.cs b/Assets/FishNet/CodeGenerating/Extension/ILProcessorExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Extension/ILProcessorExtensions.cs rename to Assets/FishNet/CodeGenerating/Extension/ILProcessorExtensions.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension/ILProcessorExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Extension/ILProcessorExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Extension/ILProcessorExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Extension/ILProcessorExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension/MethodDefinitionExtensions.cs b/Assets/FishNet/CodeGenerating/Extension/MethodDefinitionExtensions.cs similarity index 93% rename from Assets/Packages/FishNet/CodeGenerating/Extension/MethodDefinitionExtensions.cs rename to Assets/FishNet/CodeGenerating/Extension/MethodDefinitionExtensions.cs index 7e2da91..6ec84e9 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Extension/MethodDefinitionExtensions.cs +++ b/Assets/FishNet/CodeGenerating/Extension/MethodDefinitionExtensions.cs @@ -191,6 +191,23 @@ public static MethodReference GetMethodReference(this MethodDefinition md, Codeg return methodRef.GetMethodReference(session, typeReference); } + /// + /// Removes ret if it exist at the end of the method. Returns if ret was removed. + /// + internal static bool RemoveEndRet(this MethodDefinition md, CodegenSession session) + { + int count = md.Body.Instructions.Count; + if (count > 0 && md.Body.Instructions[count - 1].OpCode == OpCodes.Ret) + { + md.Body.Instructions.RemoveAt(count - 1); + return true; + } + else + { + return false; + } + } + /// /// Returns a method reference for a generic method. diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension/MethodDefinitionExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Extension/MethodDefinitionExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Extension/MethodDefinitionExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Extension/MethodDefinitionExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension/TypeDefinitionExtensions.cs b/Assets/FishNet/CodeGenerating/Extension/TypeDefinitionExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Extension/TypeDefinitionExtensions.cs rename to Assets/FishNet/CodeGenerating/Extension/TypeDefinitionExtensions.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension/TypeDefinitionExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Extension/TypeDefinitionExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Extension/TypeDefinitionExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Extension/TypeDefinitionExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension/TypeReferenceExtensions.cs b/Assets/FishNet/CodeGenerating/Extension/TypeReferenceExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Extension/TypeReferenceExtensions.cs rename to Assets/FishNet/CodeGenerating/Extension/TypeReferenceExtensions.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Extension/TypeReferenceExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Extension/TypeReferenceExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Extension/TypeReferenceExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Extension/TypeReferenceExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/FN_README.txt b/Assets/FishNet/CodeGenerating/FN_README.txt similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/FN_README.txt rename to Assets/FishNet/CodeGenerating/FN_README.txt diff --git a/Assets/Packages/FishNet/CodeGenerating/FN_README.txt.meta b/Assets/FishNet/CodeGenerating/FN_README.txt.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/FN_README.txt.meta rename to Assets/FishNet/CodeGenerating/FN_README.txt.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers.meta b/Assets/FishNet/CodeGenerating/Helpers.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers.meta rename to Assets/FishNet/CodeGenerating/Helpers.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/AttributeHelper.cs b/Assets/FishNet/CodeGenerating/Helpers/AttributeHelper.cs similarity index 99% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/AttributeHelper.cs rename to Assets/FishNet/CodeGenerating/Helpers/AttributeHelper.cs index 94f3bcc..5a7c233 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Helpers/AttributeHelper.cs +++ b/Assets/FishNet/CodeGenerating/Helpers/AttributeHelper.cs @@ -27,7 +27,7 @@ public override bool ImportReferences() ServerRpcAttribute_FullName = typeof(ServerRpcAttribute).FullName; ObserversRpcAttribute_FullName = typeof(ObserversRpcAttribute).FullName; TargetRpcAttribute_FullName = typeof(TargetRpcAttribute).FullName; -#if !PREDICTION_V2 +#if PREDICTION_1 ReplicateAttribute_FullName = typeof(ReplicateAttribute).FullName; ReconcileAttribute_FullName = typeof(ReconcileAttribute).FullName; #else diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/AttributeHelper.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/AttributeHelper.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/AttributeHelper.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/AttributeHelper.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/CodegenSession.cs b/Assets/FishNet/CodeGenerating/Helpers/CodegenSession.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/CodegenSession.cs rename to Assets/FishNet/CodeGenerating/Helpers/CodegenSession.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/CodegenSession.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/CodegenSession.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/CodegenSession.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/CodegenSession.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/CreatedSyncVarGenerator.cs b/Assets/FishNet/CodeGenerating/Helpers/CreatedSyncVarGenerator.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/CreatedSyncVarGenerator.cs rename to Assets/FishNet/CodeGenerating/Helpers/CreatedSyncVarGenerator.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/CreatedSyncVarGenerator.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/CreatedSyncVarGenerator.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/CreatedSyncVarGenerator.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/CreatedSyncVarGenerator.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension.meta b/Assets/FishNet/CodeGenerating/Helpers/Extension.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension.meta rename to Assets/FishNet/CodeGenerating/Helpers/Extension.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/CustomAttributeExtensions.cs b/Assets/FishNet/CodeGenerating/Helpers/Extension/CustomAttributeExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/CustomAttributeExtensions.cs rename to Assets/FishNet/CodeGenerating/Helpers/Extension/CustomAttributeExtensions.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/CustomAttributeExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Extension/CustomAttributeExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/CustomAttributeExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Extension/CustomAttributeExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/Diagnostics.cs b/Assets/FishNet/CodeGenerating/Helpers/Extension/Diagnostics.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/Diagnostics.cs rename to Assets/FishNet/CodeGenerating/Helpers/Extension/Diagnostics.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/Diagnostics.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Extension/Diagnostics.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/Diagnostics.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Extension/Diagnostics.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/GetConstructor.cs b/Assets/FishNet/CodeGenerating/Helpers/Extension/GetConstructor.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/GetConstructor.cs rename to Assets/FishNet/CodeGenerating/Helpers/Extension/GetConstructor.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/GetConstructor.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Extension/GetConstructor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/GetConstructor.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Extension/GetConstructor.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/ILProcessorExtensions.cs b/Assets/FishNet/CodeGenerating/Helpers/Extension/ILProcessorExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/ILProcessorExtensions.cs rename to Assets/FishNet/CodeGenerating/Helpers/Extension/ILProcessorExtensions.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/ILProcessorExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Extension/ILProcessorExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/ILProcessorExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Extension/ILProcessorExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/InstructionExtensions.cs b/Assets/FishNet/CodeGenerating/Helpers/Extension/InstructionExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/InstructionExtensions.cs rename to Assets/FishNet/CodeGenerating/Helpers/Extension/InstructionExtensions.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/InstructionExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Extension/InstructionExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/InstructionExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Extension/InstructionExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/MethodReferenceExtensions.cs b/Assets/FishNet/CodeGenerating/Helpers/Extension/MethodReferenceExtensions.cs similarity index 94% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/MethodReferenceExtensions.cs rename to Assets/FishNet/CodeGenerating/Helpers/Extension/MethodReferenceExtensions.cs index b71c940..d30decc 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/MethodReferenceExtensions.cs +++ b/Assets/FishNet/CodeGenerating/Helpers/Extension/MethodReferenceExtensions.cs @@ -87,6 +87,14 @@ internal static MethodDefinition CachedResolve(this MethodReference methodRef, C return session.GetClass().GetMethodReferenceResolve(methodRef); } + /// + /// Removes ret if it exist at the end of the method. Returns if ret was removed. + /// + internal static bool RemoveEndRet(this MethodReference mr, CodegenSession session) + { + MethodDefinition md = mr.CachedResolve(session); + return MethodDefinitionExtensions.RemoveEndRet(md, session); + } /// /// Given a method of a generic class such as ArraySegment`T.get_Count, /// and a generic instance such as ArraySegment`int diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/MethodReferenceExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Extension/MethodReferenceExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/MethodReferenceExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Extension/MethodReferenceExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/ModuleDefinitionExtensions.cs b/Assets/FishNet/CodeGenerating/Helpers/Extension/ModuleDefinitionExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/ModuleDefinitionExtensions.cs rename to Assets/FishNet/CodeGenerating/Helpers/Extension/ModuleDefinitionExtensions.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/ModuleDefinitionExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Extension/ModuleDefinitionExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/ModuleDefinitionExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Extension/ModuleDefinitionExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/ParameterDefinitionExtensions.cs b/Assets/FishNet/CodeGenerating/Helpers/Extension/ParameterDefinitionExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/ParameterDefinitionExtensions.cs rename to Assets/FishNet/CodeGenerating/Helpers/Extension/ParameterDefinitionExtensions.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/ParameterDefinitionExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Extension/ParameterDefinitionExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/ParameterDefinitionExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Extension/ParameterDefinitionExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/TypeDefinitionExtensions.cs b/Assets/FishNet/CodeGenerating/Helpers/Extension/TypeDefinitionExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/TypeDefinitionExtensions.cs rename to Assets/FishNet/CodeGenerating/Helpers/Extension/TypeDefinitionExtensions.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/TypeDefinitionExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Extension/TypeDefinitionExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/TypeDefinitionExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Extension/TypeDefinitionExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/TypeReferenceExtensions.cs b/Assets/FishNet/CodeGenerating/Helpers/Extension/TypeReferenceExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/TypeReferenceExtensions.cs rename to Assets/FishNet/CodeGenerating/Helpers/Extension/TypeReferenceExtensions.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/TypeReferenceExtensions.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Extension/TypeReferenceExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Extension/TypeReferenceExtensions.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Extension/TypeReferenceExtensions.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/GeneralHelper.cs b/Assets/FishNet/CodeGenerating/Helpers/GeneralHelper.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/GeneralHelper.cs rename to Assets/FishNet/CodeGenerating/Helpers/GeneralHelper.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/GeneralHelper.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/GeneralHelper.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/GeneralHelper.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/GeneralHelper.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/NetworkBehaviourHelper.cs b/Assets/FishNet/CodeGenerating/Helpers/NetworkBehaviourHelper.cs similarity index 95% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/NetworkBehaviourHelper.cs rename to Assets/FishNet/CodeGenerating/Helpers/NetworkBehaviourHelper.cs index 10f9811..7d44c7c 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Helpers/NetworkBehaviourHelper.cs +++ b/Assets/FishNet/CodeGenerating/Helpers/NetworkBehaviourHelper.cs @@ -23,7 +23,7 @@ internal class NetworkBehaviourHelper : CodegenBase internal string FullName; //Prediction. -#if !PREDICTION_V2 +#if PREDICTION_1 public string ClearReplicateCache_MethodName = nameof(NetworkBehaviour.ClearReplicateCache_Virtual); #else public string Reconcile_Client_Start_MethodName = nameof(NetworkBehaviour.Reconcile_Client_Start); @@ -31,17 +31,17 @@ internal class NetworkBehaviourHelper : CodegenBase public MethodReference Replicate_NonAuthoritative_MethodRef; public MethodReference Replicate_Authortative_MethodRef; #endif -#if !PREDICTION_V2 +#if PREDICTION_1 public MethodReference Replicate_Owner_MethodRef; public MethodReference Replicate_NonOwner_MethodRef; #endif public MethodReference Replicate_Reader_MethodRef; -#if !PREDICTION_V2 +#if PREDICTION_1 public MethodReference Replicate_ExitEarly_A_MethodRef; public MethodReference Reconcile_ExitEarly_A_MethodRef; #endif public MethodReference Reconcile_Server_MethodRef; - public FieldReference UsesPrediction_FieldRef; + //public FieldReference UsesPrediction_FieldRef; public MethodReference Replicate_Replay_Start_MethodRef; public MethodReference Reconcile_Client_MethodRef; public MethodReference Replicate_Replay_MethodRef; @@ -128,7 +128,7 @@ public override bool ImportReferences() Reconcile_Server_MethodRef = base.ImportReference(mi); else if (mi.Name == nameof(NetworkBehaviour.Reconcile_Client)) Reconcile_Client_MethodRef = base.ImportReference(mi); - //#if PREDICTION_V2 + //#if !PREDICTION_1 // else if (mi.Name == nameof(NetworkBehaviour.Replicate_Server_SendToSpectators_Internal)) // Replicate_Server_SendToSpectators_MethodRef = base.ImportReference(mi); //#endif @@ -140,7 +140,7 @@ public override bool ImportReferences() else if (mi.Name == nameof(NetworkBehaviour.NetworkInitializeIfDisabled)) NetworkInitializeIfDisabled_MethodRef = base.ImportReference(mi); //Prediction -#if !PREDICTION_V2 +#if PREDICTION_1 else if (mi.Name == nameof(NetworkBehaviour.Replicate_ExitEarly_A)) Replicate_ExitEarly_A_MethodRef = base.ImportReference(mi); else if (mi.Name == nameof(NetworkBehaviour.Reconcile_ExitEarly_A)) @@ -184,16 +184,16 @@ public override bool ImportReferences() TimeManager_MethodRef = base.ImportReference(pi.GetMethod); } -#if PREDICTION_V2 - foreach (FieldInfo fi in networkBehaviourType.GetFields((BindingFlags.Static | BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic))) - { - if (fi.Name == nameof(NetworkBehaviour.UsesPrediction)) - { - UsesPrediction_FieldRef = base.ImportReference(fi); - break; - } - } -#endif +//#if !PREDICTION_1 +// foreach (FieldInfo fi in networkBehaviourType.GetFields((BindingFlags.Static | BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic))) +// { +// if (fi.Name == nameof(NetworkBehaviour.UsesPrediction)) +// { +// UsesPrediction_FieldRef = base.ImportReference(fi); +// break; +// } +// } +//#endif return true; } @@ -247,21 +247,7 @@ internal void CreateReplicateDelegate(MethodDefinition originalMethodDef, Method /// internal void CreateRpcDelegate(bool runLocally, TypeDefinition typeDef, MethodDefinition readerMethodDef, RpcType rpcType, uint methodHash, CustomAttribute rpcAttribute) { - //PROSTART - if (CodeStripping.StripBuild) - { - /* Clients do not need to register serverRpcs since they won't - * get them, just as server doesn't need to register client rpcs. */ - bool isServerRpc = (rpcType == RpcType.Server); - if ( - (isServerRpc && CodeStripping.ReleasingForClient) || - (!isServerRpc && CodeStripping.ReleasingForServer) - ) - { - return; - } - } - //PROEND + MethodDefinition methodDef = typeDef.GetMethod(NetworkBehaviourProcessor.NETWORKINITIALIZE_EARLY_INTERNAL_NAME); ILProcessor processor = methodDef.Body.GetILProcessor(); diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/NetworkBehaviourHelper.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/NetworkBehaviourHelper.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/NetworkBehaviourHelper.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/NetworkBehaviourHelper.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/NetworkConnectionImports.cs b/Assets/FishNet/CodeGenerating/Helpers/NetworkConnectionImports.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/NetworkConnectionImports.cs rename to Assets/FishNet/CodeGenerating/Helpers/NetworkConnectionImports.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/NetworkConnectionImports.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/NetworkConnectionImports.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/NetworkConnectionImports.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/NetworkConnectionImports.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/ObjectHelper.cs b/Assets/FishNet/CodeGenerating/Helpers/ObjectHelper.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/ObjectHelper.cs rename to Assets/FishNet/CodeGenerating/Helpers/ObjectHelper.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/ObjectHelper.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/ObjectHelper.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/ObjectHelper.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/ObjectHelper.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/PhysicsHelper.cs b/Assets/FishNet/CodeGenerating/Helpers/PhysicsHelper.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/PhysicsHelper.cs rename to Assets/FishNet/CodeGenerating/Helpers/PhysicsHelper.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/PhysicsHelper.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/PhysicsHelper.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/PhysicsHelper.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/PhysicsHelper.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/PredictedObjectHelper.cs b/Assets/FishNet/CodeGenerating/Helpers/PredictedObjectHelper.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/PredictedObjectHelper.cs rename to Assets/FishNet/CodeGenerating/Helpers/PredictedObjectHelper.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/PredictedObjectHelper.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/PredictedObjectHelper.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/PredictedObjectHelper.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/PredictedObjectHelper.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/ReaderImports.cs b/Assets/FishNet/CodeGenerating/Helpers/ReaderImports.cs similarity index 74% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/ReaderImports.cs rename to Assets/FishNet/CodeGenerating/Helpers/ReaderImports.cs index 771de7a..1fda87c 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Helpers/ReaderImports.cs +++ b/Assets/FishNet/CodeGenerating/Helpers/ReaderImports.cs @@ -1,4 +1,6 @@ -using FishNet.Connection; +using FishNet.CodeGenerating.Extension; +using FishNet.CodeGenerating.Helping.Extension; +using FishNet.Connection; using FishNet.Serializing; using MonoFN.Cecil; using System; @@ -17,10 +19,10 @@ internal class ReaderImports : CodegenBase public MethodReference Reader_ReadDictionary_MethodRef; public MethodReference Reader_ReadList_MethodRef; public MethodReference Reader_ReadArray_MethodRef; - public TypeReference GenericReaderTypeRef; - public TypeReference ReaderTypeRef; - public MethodReference ReadSetMethodRef; - public MethodReference ReadAutoPackSetMethodRef; + public TypeReference GenericReader_TypeRef; + + public MethodReference GenericReader_ReadUnpacked_MethodRef; + public MethodReference GenericReader_ReadAutoPacked_MethodRef; #endregion /// @@ -35,15 +37,11 @@ public override bool ImportReferences() PooledReader_TypeRef = base.ImportReference(typeof(PooledReader)); Reader_TypeRef = base.ImportReference(typeof(Reader)); NetworkConnection_TypeRef = base.ImportReference(typeof(NetworkConnection)); + GenericReader_TypeRef = base.ImportReference(typeof(GenericReader<>)); - GenericReaderTypeRef = base.ImportReference(typeof(GenericReader<>)); - ReaderTypeRef = base.ImportReference(typeof(Reader)); - - System.Reflection.PropertyInfo readPropertyInfo; - readPropertyInfo = typeof(GenericReader<>).GetProperty(nameof(GenericReader.Read)); - ReadSetMethodRef = base.ImportReference(readPropertyInfo.GetSetMethod()); - readPropertyInfo = typeof(GenericReader<>).GetProperty(nameof(GenericReader.ReadAutoPack)); - ReadAutoPackSetMethodRef = base.ImportReference(readPropertyInfo.GetSetMethod()); + TypeDefinition genericWriterTd = GenericReader_TypeRef.CachedResolve(base.Session); + GenericReader_ReadUnpacked_MethodRef = base.ImportReference(genericWriterTd.GetMethod(nameof(GenericReader.SetReadUnpacked))); + GenericReader_ReadAutoPacked_MethodRef = base.ImportReference(genericWriterTd.GetMethod(nameof(GenericReader.SetReadAutoPacked))); Type pooledReaderType = typeof(PooledReader); diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/ReaderImports.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/ReaderImports.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/ReaderImports.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/ReaderImports.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/TimeManagerHelper.cs b/Assets/FishNet/CodeGenerating/Helpers/TimeManagerHelper.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/TimeManagerHelper.cs rename to Assets/FishNet/CodeGenerating/Helpers/TimeManagerHelper.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/TimeManagerHelper.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/TimeManagerHelper.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/TimeManagerHelper.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/TimeManagerHelper.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/TransportHelper.cs b/Assets/FishNet/CodeGenerating/Helpers/TransportHelper.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/TransportHelper.cs rename to Assets/FishNet/CodeGenerating/Helpers/TransportHelper.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/TransportHelper.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/TransportHelper.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/TransportHelper.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/TransportHelper.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed.meta b/Assets/FishNet/CodeGenerating/Helpers/Typed.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed.meta rename to Assets/FishNet/CodeGenerating/Helpers/Typed.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/Comparers.cs b/Assets/FishNet/CodeGenerating/Helpers/Typed/Comparers.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/Comparers.cs rename to Assets/FishNet/CodeGenerating/Helpers/Typed/Comparers.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/Comparers.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Typed/Comparers.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/Comparers.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Typed/Comparers.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/GeneratorHelper.cs b/Assets/FishNet/CodeGenerating/Helpers/Typed/GeneratorHelper.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/GeneratorHelper.cs rename to Assets/FishNet/CodeGenerating/Helpers/Typed/GeneratorHelper.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/GeneratorHelper.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Typed/GeneratorHelper.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/GeneratorHelper.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Typed/GeneratorHelper.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/QOLAttributeType.cs b/Assets/FishNet/CodeGenerating/Helpers/Typed/QOLAttributeType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/QOLAttributeType.cs rename to Assets/FishNet/CodeGenerating/Helpers/Typed/QOLAttributeType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/QOLAttributeType.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Typed/QOLAttributeType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/QOLAttributeType.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Typed/QOLAttributeType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/SerializatierType.cs b/Assets/FishNet/CodeGenerating/Helpers/Typed/SerializatierType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/SerializatierType.cs rename to Assets/FishNet/CodeGenerating/Helpers/Typed/SerializatierType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/SerializatierType.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Typed/SerializatierType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/SerializatierType.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Typed/SerializatierType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/SyncIndexData.cs b/Assets/FishNet/CodeGenerating/Helpers/Typed/SyncIndexData.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/SyncIndexData.cs rename to Assets/FishNet/CodeGenerating/Helpers/Typed/SyncIndexData.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/SyncIndexData.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Typed/SyncIndexData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/SyncIndexData.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Typed/SyncIndexData.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/SyncType.cs b/Assets/FishNet/CodeGenerating/Helpers/Typed/SyncType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/SyncType.cs rename to Assets/FishNet/CodeGenerating/Helpers/Typed/SyncType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/SyncType.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/Typed/SyncType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/Typed/SyncType.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/Typed/SyncType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/WriterImports.cs b/Assets/FishNet/CodeGenerating/Helpers/WriterImports.cs similarity index 78% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/WriterImports.cs rename to Assets/FishNet/CodeGenerating/Helpers/WriterImports.cs index 4706696..bcc5c03 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Helpers/WriterImports.cs +++ b/Assets/FishNet/CodeGenerating/Helpers/WriterImports.cs @@ -1,4 +1,6 @@ -using FishNet.Object; +using FishNet.CodeGenerating.Extension; +using FishNet.CodeGenerating.Helping.Extension; +using FishNet.Object; using FishNet.Serializing; using MonoFN.Cecil; using System; @@ -21,10 +23,10 @@ internal class WriterImports : CodegenBase public MethodReference Writer_WriteArray_MethodRef; public TypeReference AutoPackTypeRef; - public TypeReference GenericWriterTypeRef; - public TypeReference WriterTypeRef; - public MethodReference WriteGetSetMethodRef; - public MethodReference WriteAutoPackGetSetMethodRef; + public TypeReference GenericWriter_TypeRef; + public MethodReference GenericWriter_WriteUnpacked_MethodRef; + public MethodReference GenericWriter_WriteAutoPacked_MethodRef; + public MethodReference Writer_WriteUnpacked_MethodRef; #endregion /// @@ -37,15 +39,13 @@ public override bool ImportReferences() PooledWriter_TypeRef = base.ImportReference(typeof(PooledWriter)); Writer_TypeRef = base.ImportReference(typeof(Writer)); AutoPackTypeRef = base.ImportReference(typeof(AutoPackType)); + GenericWriter_TypeRef = base.ImportReference(typeof(GenericWriter<>)); + Writer_WriteUnpacked_MethodRef = Writer_TypeRef.CachedResolve(base.Session).GetMethodReference(base.Session, nameof(Writer.WriteUnpacked)); - GenericWriterTypeRef = base.ImportReference(typeof(GenericWriter<>)); - WriterTypeRef = base.ImportReference(typeof(Writer)); - PropertyInfo writePropertyInfo; - writePropertyInfo = typeof(GenericWriter<>).GetProperty(nameof(GenericWriter.Write)); - WriteGetSetMethodRef = base.ImportReference(writePropertyInfo.GetSetMethod()); - writePropertyInfo = typeof(GenericWriter<>).GetProperty(nameof(GenericWriter.WriteAutoPack)); - WriteAutoPackGetSetMethodRef = base.ImportReference(writePropertyInfo.GetSetMethod()); + TypeDefinition genericWriterTd = GenericWriter_TypeRef.CachedResolve(base.Session); + GenericWriter_WriteUnpacked_MethodRef = base.ImportReference(genericWriterTd.GetMethod(nameof(GenericWriter.SetWriteUnpacked))); + GenericWriter_WriteAutoPacked_MethodRef = base.ImportReference(genericWriterTd.GetMethod(nameof(GenericWriter.SetWriteAutoPacked))); //WriterPool.GetWriter Type writerPoolType = typeof(WriterPool); diff --git a/Assets/Packages/FishNet/CodeGenerating/Helpers/WriterImports.cs.meta b/Assets/FishNet/CodeGenerating/Helpers/WriterImports.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Helpers/WriterImports.cs.meta rename to Assets/FishNet/CodeGenerating/Helpers/WriterImports.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/ILCore.meta b/Assets/FishNet/CodeGenerating/ILCore.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/ILCore.meta rename to Assets/FishNet/CodeGenerating/ILCore.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/ILCore/FishNetILPP.cs b/Assets/FishNet/CodeGenerating/ILCore/FishNetILPP.cs similarity index 92% rename from Assets/Packages/FishNet/CodeGenerating/ILCore/FishNetILPP.cs rename to Assets/FishNet/CodeGenerating/ILCore/FishNetILPP.cs index 3d01aee..7fcbe3b 100644 --- a/Assets/Packages/FishNet/CodeGenerating/ILCore/FishNetILPP.cs +++ b/Assets/FishNet/CodeGenerating/ILCore/FishNetILPP.cs @@ -83,7 +83,7 @@ public override ILPostProcessResult Process(ICompiledAssembly compiledAssembly) modified |= CreateQOLAttributes(session); #endif modified |= CreateNetworkBehaviours(session); - modified |= CreateGenericReadWriteDelegates(session); + modified |= CreateSerializerInitializeDelegates(session); if (fnAssembly) { @@ -183,14 +183,13 @@ internal bool CreateDeclaredSerializerDelegates(CodegenSession session) { bool modified = false; - TypeAttributes readWriteExtensionTypeAttr = (TypeAttributes.Public | TypeAttributes.Sealed | TypeAttributes.Abstract); List allTypeDefs = session.Module.Types.ToList(); foreach (TypeDefinition td in allTypeDefs) { if (session.GetClass().HasExcludeSerializationAttribute(td)) continue; - if (td.Attributes.HasFlag(readWriteExtensionTypeAttr)) + if (td.Attributes.HasFlag(WriterProcessor.CUSTOM_SERIALIZER_TYPEDEF_ATTRIBUTES)) modified |= session.GetClass().CreateSerializerDelegates(td, true); } @@ -204,14 +203,13 @@ private bool CreateDeclaredSerializers(CodegenSession session) { bool modified = false; - TypeAttributes readWriteExtensionTypeAttr = (TypeAttributes.Public | TypeAttributes.Sealed | TypeAttributes.Abstract); List allTypeDefs = session.Module.Types.ToList(); foreach (TypeDefinition td in allTypeDefs) { if (session.GetClass().HasExcludeSerializationAttribute(td)) continue; - if (td.Attributes.HasFlag(readWriteExtensionTypeAttr)) + if (td.Attributes.HasFlag(WriterProcessor.CUSTOM_SERIALIZER_TYPEDEF_ATTRIBUTES)) modified |= session.GetClass().CreateSerializers(td); } @@ -301,9 +299,7 @@ private bool CreateQOLAttributes(CodegenSession session) bool modified = false; bool codeStripping = false; - //PROSTART - codeStripping = CodeStripping.StripBuild; - //PROEND + List allTypeDefs = session.Module.Types.ToList(); /* First pass, potentially only pass. @@ -317,19 +313,7 @@ private bool CreateQOLAttributes(CodegenSession session) modified |= session.GetClass().Process(td, codeStripping); } - //PROSTART - /* If stripping then remove the remainder content */ - if (codeStripping) - { - foreach (TypeDefinition td in allTypeDefs) - { - if (session.GetClass().HasExcludeSerializationAttribute(td)) - continue; - - modified |= session.GetClass().Process(td, false); - } - } - //PROEND + return modified; } @@ -401,10 +385,10 @@ void RemoveInheritedTypeDefinitions(List tds) /// /// /// - private bool CreateGenericReadWriteDelegates(CodegenSession session) + private bool CreateSerializerInitializeDelegates(CodegenSession session) { - session.GetClass().CreateStaticMethodDelegates(); - session.GetClass().CreateStaticMethodDelegates(); + session.GetClass().CreateInitializeDelegates(); + session.GetClass().CreateInitializeDelegates(); return true; } diff --git a/Assets/Packages/FishNet/CodeGenerating/ILCore/FishNetILPP.cs.meta b/Assets/FishNet/CodeGenerating/ILCore/FishNetILPP.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/ILCore/FishNetILPP.cs.meta rename to Assets/FishNet/CodeGenerating/ILCore/FishNetILPP.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/ILCore/ILCoreHelper.cs b/Assets/FishNet/CodeGenerating/ILCore/ILCoreHelper.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/ILCore/ILCoreHelper.cs rename to Assets/FishNet/CodeGenerating/ILCore/ILCoreHelper.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/ILCore/ILCoreHelper.cs.meta b/Assets/FishNet/CodeGenerating/ILCore/ILCoreHelper.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/ILCore/ILCoreHelper.cs.meta rename to Assets/FishNet/CodeGenerating/ILCore/ILCoreHelper.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/ILCore/PostProcessorAssemblyResolver.cs b/Assets/FishNet/CodeGenerating/ILCore/PostProcessorAssemblyResolver.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/ILCore/PostProcessorAssemblyResolver.cs rename to Assets/FishNet/CodeGenerating/ILCore/PostProcessorAssemblyResolver.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/ILCore/PostProcessorAssemblyResolver.cs.meta b/Assets/FishNet/CodeGenerating/ILCore/PostProcessorAssemblyResolver.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/ILCore/PostProcessorAssemblyResolver.cs.meta rename to Assets/FishNet/CodeGenerating/ILCore/PostProcessorAssemblyResolver.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporter.cs b/Assets/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporter.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporter.cs rename to Assets/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporter.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporter.cs.meta b/Assets/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporter.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporter.cs.meta rename to Assets/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporter.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporterProvider.cs b/Assets/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporterProvider.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporterProvider.cs rename to Assets/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporterProvider.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporterProvider.cs.meta b/Assets/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporterProvider.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporterProvider.cs.meta rename to Assets/FishNet/CodeGenerating/ILCore/PostProcessorReflectionImporterProvider.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing.meta b/Assets/FishNet/CodeGenerating/Processing.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing.meta rename to Assets/FishNet/CodeGenerating/Processing.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/CodegenBase.cs b/Assets/FishNet/CodeGenerating/Processing/CodegenBase.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/CodegenBase.cs rename to Assets/FishNet/CodeGenerating/Processing/CodegenBase.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/CodegenBase.cs.meta b/Assets/FishNet/CodeGenerating/Processing/CodegenBase.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/CodegenBase.cs.meta rename to Assets/FishNet/CodeGenerating/Processing/CodegenBase.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/CustomSerializerProcessor.cs b/Assets/FishNet/CodeGenerating/Processing/CustomSerializerProcessor.cs similarity index 95% rename from Assets/Packages/FishNet/CodeGenerating/Processing/CustomSerializerProcessor.cs rename to Assets/FishNet/CodeGenerating/Processing/CustomSerializerProcessor.cs index 55fd6fb..117ba0f 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Processing/CustomSerializerProcessor.cs +++ b/Assets/FishNet/CodeGenerating/Processing/CustomSerializerProcessor.cs @@ -225,6 +225,12 @@ private void CheckCallInstruction(ExtensionType extensionType, MethodDefinition /// private void CreateReaderOrWriter(ExtensionType extensionType, MethodDefinition methodDef, ref int instructionIndex, TypeReference parameterType) { + ReaderProcessor rp = base.GetClass(); + WriterProcessor wp = base.GetClass(); + ////If parameterType has user declared do nothing. + //if (wp.IsGlobalSerializer(parameterType)) + // return; + if (!parameterType.IsGenericParameter && parameterType.CanBeResolved(base.Session)) { TypeDefinition typeDefinition = parameterType.CachedResolve(base.Session); @@ -244,8 +250,8 @@ private void CreateReaderOrWriter(ExtensionType extensionType, MethodDefinition //Find already existing read or write method. MethodReference createdMethodRef = (extensionType == ExtensionType.Write) ? - base.GetClass().GetWriteMethodReference(parameterType) : - base.GetClass().GetReadMethodReference(parameterType); + wp.GetWriteMethodReference(parameterType) : + rp.GetReadMethodReference(parameterType); //If a created method already exist nothing further is required. if (createdMethodRef != null) @@ -253,14 +259,14 @@ private void CreateReaderOrWriter(ExtensionType extensionType, MethodDefinition TryInsertAutoPack(ref instructionIndex); //Replace call to generic with already made serializer. Instruction newInstruction = processor.Create(OpCodes.Call, createdMethodRef); - methodDef.Body.Instructions[instructionIndex] = newInstruction; + methodDef.Body.Instructions[instructionIndex] = newInstruction; return; } else { createdMethodRef = (extensionType == ExtensionType.Write) ? - base.GetClass().CreateWriter(parameterType) : - base.GetClass().CreateReader(parameterType); + wp.CreateWriter(parameterType) : + rp.CreateReader(parameterType); } //If method was created. @@ -327,7 +333,7 @@ private ExtensionType GetExtensionType(MethodDefinition methodDef) #endif - string prefix = (write) ? WriterProcessor.WRITE_PREFIX : ReaderProcessor.READ_PREFIX; + string prefix = (write) ? WriterProcessor.CUSTOM_WRITER_PREFIX : ReaderProcessor.CUSTOM_READER_PREFIX; //Does not contain prefix. if (methodDef.Name.Length < prefix.Length || methodDef.Name.Substring(0, prefix.Length) != prefix) diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/CustomSerializerProcessor.cs.meta b/Assets/FishNet/CodeGenerating/Processing/CustomSerializerProcessor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/CustomSerializerProcessor.cs.meta rename to Assets/FishNet/CodeGenerating/Processing/CustomSerializerProcessor.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs b/Assets/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs similarity index 88% rename from Assets/Packages/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs rename to Assets/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs index 701182b..a39c13e 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs +++ b/Assets/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs @@ -79,10 +79,7 @@ internal bool ProcessLocal(TypeDefinition typeDef) CreateNetworkInitializeMethods(td, out networkInitializeIfDisabledMd); CallNetworkInitializesFromNetworkInitializeIfDisabled(networkInitializeIfDisabledMd); - //PROSTART - /* Code stripping. */ - modified |= StripNetworkBehaviourCallbacks(td); - //PROEND + /* Prediction. */ /* Run prediction first since prediction will modify @@ -203,50 +200,7 @@ internal bool NonNetworkBehaviourHasInvalidAttributes(Collection return false; } - //PROSTART - /// - /// Removes NetworkBehaviour callbacks which don't need to be known to client or server. - /// - /// - /// - private bool StripNetworkBehaviourCallbacks(TypeDefinition typeDef) - { - bool removeClient = CodeStripping.RemoveClientLogic; - bool removeServer = CodeStripping.RemoveServerLogic; - - List methods = typeDef.Methods.ToList(); - int startCount = methods.Count; - foreach (MethodDefinition md in methods) - { - if (!md.IsVirtual) - continue; - - if (removeClient) - { - if ( - (md.Name == nameof(NetworkBehaviour.OnStartClient)) || - (md.Name == nameof(NetworkBehaviour.OnStopClient)) || - (md.Name == nameof(NetworkBehaviour.OnOwnershipClient)) - ) - typeDef.Methods.Remove(md); - } - else if (removeServer) - { - if ( - (md.Name == nameof(NetworkBehaviour.OnStartServer)) || - (md.Name == nameof(NetworkBehaviour.OnStopServer)) || - (md.Name == nameof(NetworkBehaviour.OnOwnershipServer)) || - (md.Name == nameof(NetworkBehaviour.OnSpawnServer)) || - (md.Name == nameof(NetworkBehaviour.OnDespawnServer)) - ) - typeDef.Methods.Remove(md); - } - - } - - return (typeDef.Methods.Count != startCount); - } - //PROEND + /// /// Calls the next awake method if the nested awake was created by codegen. @@ -390,26 +344,26 @@ private void CallBaseOnNetworkInitializeMethods(TypeDefinition typeDef) /// private void SetUsesPrediction(List typeDefs) { -#if PREDICTION_V2 - NetworkBehaviourHelper nbh = base.GetClass(); - - foreach (TypeDefinition td in typeDefs) - { - MethodDefinition md = td.GetMethod(NETWORKINITIALIZE_EARLY_INTERNAL_NAME); - ILProcessor processor = md.Body.GetILProcessor(); - - int lastInstructionIndex = (md.Body.Instructions.Count - 1); - //Remove opcode if present. It will be added back on after. - if (lastInstructionIndex >= 0 && md.Body.Instructions[lastInstructionIndex].OpCode == OpCodes.Ret) - md.Body.Instructions.RemoveAt(lastInstructionIndex); - - //Set field. - processor.Emit(OpCodes.Ldarg_0); //base. - processor.Emit(OpCodes.Ldc_I4_1); //true. - processor.Emit(OpCodes.Stfld, nbh.UsesPrediction_FieldRef); - processor.Emit(OpCodes.Ret); - } -#endif +//#if !PREDICTION_1 +// NetworkBehaviourHelper nbh = base.GetClass(); + +// foreach (TypeDefinition td in typeDefs) +// { +// MethodDefinition md = td.GetMethod(NETWORKINITIALIZE_EARLY_INTERNAL_NAME); +// ILProcessor processor = md.Body.GetILProcessor(); + +// int lastInstructionIndex = (md.Body.Instructions.Count - 1); +// //Remove opcode if present. It will be added back on after. +// if (lastInstructionIndex >= 0 && md.Body.Instructions[lastInstructionIndex].OpCode == OpCodes.Ret) +// md.Body.Instructions.RemoveAt(lastInstructionIndex); + +// //Set field. +// processor.Emit(OpCodes.Ldarg_0); //base. +// processor.Emit(OpCodes.Ldc_I4_1); //true. +// processor.Emit(OpCodes.Stfld, nbh.UsesPrediction_FieldRef); +// processor.Emit(OpCodes.Ret); +// } +//#endif } /// diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs.meta b/Assets/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs.meta rename to Assets/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/Prediction.meta b/Assets/FishNet/CodeGenerating/Processing/Prediction.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/Prediction.meta rename to Assets/FishNet/CodeGenerating/Processing/Prediction.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/Prediction/PredictionProcessor.cs b/Assets/FishNet/CodeGenerating/Processing/Prediction/PredictionProcessor.cs similarity index 93% rename from Assets/Packages/FishNet/CodeGenerating/Processing/Prediction/PredictionProcessor.cs rename to Assets/FishNet/CodeGenerating/Processing/Prediction/PredictionProcessor.cs index 38d2fed..8fa0e3a 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Processing/Prediction/PredictionProcessor.cs +++ b/Assets/FishNet/CodeGenerating/Processing/Prediction/PredictionProcessor.cs @@ -38,7 +38,7 @@ private enum InsertType Last, Current } -#if !PREDICTION_V2 +#if PREDICTION_1 private class CreatedPredictionFields { /// @@ -236,6 +236,7 @@ internal uint GetPredictionCountInParents(TypeDefinition typeDef) return count; } +#if !PREDICTION_1 /// /// Ensures only one prediction and reconile method exist per typeDef, and outputs finding. /// @@ -263,9 +264,15 @@ internal bool GetPredictionMethods(TypeDefinition typeDef, out MethodDefinition else if (customAttribute.Is(reconcileAttributeFullName)) { if (!MethodIsPrivate(methodDef) || AlreadyFound(reconcileMd)) + { error = true; + } else + { reconcileMd = methodDef; + if (!CheckCreateReconcile(reconcileMd)) + error = true; + } } if (error) break; @@ -274,6 +281,39 @@ internal bool GetPredictionMethods(TypeDefinition typeDef, out MethodDefinition break; } + //Checks to make sure the CreateReconcile method exist and calls reconcile. + bool CheckCreateReconcile(MethodDefinition reconcileMd) + { + string crName = nameof(NetworkBehaviour.CreateReconcile); + MethodDefinition createReconcileMd = reconcileMd.DeclaringType.GetMethod(crName); + //Does not exist. + if (createReconcileMd == null) + { + base.LogError($"{reconcileMd.DeclaringType.Name} does not implement method {crName}. Override method {crName} and use it to create your reconcile data, and call your reconcile method {reconcileMd.Name}. Call "); + return false; + } + //Exists, check for call. + else + { + //Check for call instructions. + foreach (Instruction inst in createReconcileMd.Body.Instructions) + { + if (inst.OpCode == OpCodes.Call || inst.OpCode == OpCodes.Callvirt) + { + if (inst.Operand is MethodReference mr) + { + if (mr.Name == reconcileMd.Name) + return true; + } + } + } + + base.LogError($"{reconcileMd.DeclaringType.Name} implements {crName} but does not call reconcile method {reconcileMd.Name}."); + //Fallthrough. + return false; + } + } + bool MethodIsPrivate(MethodDefinition md) { bool isPrivate = md.Attributes.HasFlag(MethodAttributes.Private); @@ -302,7 +342,74 @@ bool AlreadyFound(MethodDefinition md) else return true; } - #endregion +#else + + /// + /// Ensures only one prediction and reconile method exist per typeDef, and outputs finding. + /// + /// True if there is only one set of prediction methods. False if none, or more than one set. + internal bool GetPredictionMethods(TypeDefinition typeDef, out MethodDefinition replicateMd, out MethodDefinition reconcileMd) + { + replicateMd = null; + reconcileMd = null; + + string replicateAttributeFullName = base.GetClass().ReplicateAttribute_FullName; + string reconcileAttributeFullName = base.GetClass().ReconcileAttribute_FullName; + + bool error = false; + foreach (MethodDefinition methodDef in typeDef.Methods) + { + foreach (CustomAttribute customAttribute in methodDef.CustomAttributes) + { + if (customAttribute.Is(replicateAttributeFullName)) + { + if (!MethodIsPrivate(methodDef) || AlreadyFound(replicateMd)) + error = true; + else + replicateMd = methodDef; + } + else if (customAttribute.Is(reconcileAttributeFullName)) + { + if (!MethodIsPrivate(methodDef) || AlreadyFound(reconcileMd)) + error = true; + } + if (error) + break; + } + if (error) + break; + } + + bool MethodIsPrivate(MethodDefinition md) + { + bool isPrivate = md.Attributes.HasFlag(MethodAttributes.Private); + if (!isPrivate) + base.LogError($"Method {md.Name} within {typeDef.Name} is a prediction method and must be private."); + return isPrivate; + } + + bool AlreadyFound(MethodDefinition md) + { + bool alreadyFound = (md != null); + if (alreadyFound) + base.LogError($"{typeDef.Name} contains multiple prediction sets; currently only one set is allowed."); + + return alreadyFound; + } + + if (!error && ((replicateMd == null) != (reconcileMd == null))) + { + base.LogError($"{typeDef.Name} must contain both a [Replicate] and [Reconcile] method when using prediction."); + error = true; + } + + if (error || (replicateMd == null) || (reconcileMd == null)) + return false; + else + return true; + } +#endif +#endregion internal bool Process(TypeDefinition typeDef) { @@ -473,7 +580,7 @@ void Register(MethodDefinition readerMd, bool replicate) processor.InsertLast(insts); } -#if !PREDICTION_V2 +#if PREDICTION_1 /// /// Initializes collection fields made during this process. /// @@ -576,7 +683,7 @@ void Generate(MethodDefinition ulMd, TypeReference dataTr, FieldReference fr, Sy } -#if !PREDICTION_V2 +#if PREDICTION_1 /// /// Creates field buffers for replicate datas. /// @@ -663,7 +770,7 @@ private void CreateFields(TypeDefinition typeDef, MethodDefinition replicateMd, } #endif -#if !PREDICTION_V2 +#if PREDICTION_1 /// /// Returns if there are any errors with the prediction methods parameters and will print if so. /// @@ -776,7 +883,7 @@ void PrintParameterExpectations() } #endif -#if !PREDICTION_V2 +#if PREDICTION_1 /// /// Creates all methods needed for a RPC. /// @@ -1036,8 +1143,8 @@ bool CreateReplicateReplayStart() } #endif - #region Universal prediction. -#if !PREDICTION_V2 +#region Universal prediction. +#if PREDICTION_1 /// /// Creates an override for the method responsible for resetting replicates. /// @@ -1196,10 +1303,10 @@ private List SubtractOneVariableFromAnother(MethodDefinition method return insts; } - #endregion +#endregion - #region Server side. -#if !PREDICTION_V2 +#region Server side. +#if PREDICTION_1 /// /// Creates replicate code for client. /// @@ -1252,7 +1359,7 @@ private void CallNonAuthoritativeReplicate(MethodDefinition replicateMd, Created } #endif -#if !PREDICTION_V2 +#if PREDICTION_1 /// /// Creates a reader for replicate data received from clients. /// @@ -1347,7 +1454,7 @@ private bool CreateReplicateReader(TypeDefinition typeDef, uint hash, MethodDefi } #endif -#if !PREDICTION_V2 +#if PREDICTION_1 /// /// Creates server side code for reconcileMd. /// @@ -1390,10 +1497,10 @@ private void ServerCreateReconcile(MethodDefinition reconcileMd, CreatedPredicti rpcCount++; } #endif - #endregion +#endregion - #region Client side. -#if !PREDICTION_V2 +#region Client side. +#if PREDICTION_1 /// /// Creates replicate code for client. /// @@ -1485,6 +1592,6 @@ private bool CreateReconcileReader(TypeDefinition typeDef, MethodDefinition reco result = createdMd; return true; } - #endregion +#endregion } } \ No newline at end of file diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/Prediction/PredictionProcessor.cs.meta b/Assets/FishNet/CodeGenerating/Processing/Prediction/PredictionProcessor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/Prediction/PredictionProcessor.cs.meta rename to Assets/FishNet/CodeGenerating/Processing/Prediction/PredictionProcessor.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/QOLAttributeProcessor.cs b/Assets/FishNet/CodeGenerating/Processing/QOLAttributeProcessor.cs similarity index 51% rename from Assets/Packages/FishNet/CodeGenerating/Processing/QOLAttributeProcessor.cs rename to Assets/FishNet/CodeGenerating/Processing/QOLAttributeProcessor.cs index 2111b1e..d27d3ba 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Processing/QOLAttributeProcessor.cs +++ b/Assets/FishNet/CodeGenerating/Processing/QOLAttributeProcessor.cs @@ -19,13 +19,7 @@ internal bool Process(TypeDefinition typeDef, bool moveStrippedCalls) bool modified = false; List methods = typeDef.Methods.ToList(); - //PROSTART - if (moveStrippedCalls) - { - MoveStrippedCalls(methods); - return true; - } - //PROEND + foreach (MethodDefinition md in methods) { @@ -158,145 +152,14 @@ private void CreateAttributeMethod(MethodDefinition methodDef, CustomAttribute q bool StripMethod(MethodDefinition md) { - //PROSTART - bool removeLogic = (qolType == QolAttributeType.Server) - ? (CodeStripping.StripBuild && CodeStripping.ReleasingForClient) - : (CodeStripping.StripBuild && CodeStripping.ReleasingForServer); - - if (removeLogic) - { - if (CodeStripping.StrippingType == StrippingTypes.Redirect) - md.DeclaringType.Methods.Remove(md); - else if (CodeStripping.StrippingType == StrippingTypes.Empty_Experimental) - md.ClearMethodWithRet(base.Session,md.Module); - - return true; - } - //PROEND + //Fall through. return false; } } - //PROSTART - /// - /// Moves instructions when are calling a stripped method to a dummy method. - /// - /// - private void MoveStrippedCalls(List methods) - { - if (!CodeStripping.StripBuild) - return; - //Methods were emptied rather than moved. - if (CodeStripping.StrippingType == StrippingTypes.Empty_Experimental) - return; - - foreach (MethodDefinition md in methods) - { - //Went null at some point. It was likely stripped. - if (md == null || md.Body == null || md.Body.Instructions == null) - continue; - - foreach (Instruction inst in md.Body.Instructions) - { - //Calls a method. - if (inst.OpCode == OpCodes.Call || inst.OpCode == OpCodes.Callvirt || inst.Operand == null) - { - //This shouldn't be possible but okay. - if (inst.Operand == null) - continue; - - MethodDefinition targetMethod; - System.Type operandType = inst.Operand.GetType(); - if (operandType == typeof(MethodDefinition)) - { - targetMethod = (MethodDefinition)inst.Operand; - } - else if (operandType == typeof(MethodReference)) - { - MethodReference mr = (MethodReference)inst.Operand; - targetMethod = mr.Resolve(); - } - //Type isn't found, unable to remove call. - else - { - continue; - } - //Target method couldn't be looked up. - if (targetMethod == null) - continue; - GetQOLAttribute(targetMethod, out QolAttributeType qt); - - bool redirectCall; - if (qt == QolAttributeType.Client) - redirectCall = (CodeStripping.StripBuild && CodeStripping.ReleasingForServer); - else if (qt == QolAttributeType.Server) - redirectCall = (CodeStripping.StripBuild && CodeStripping.ReleasingForClient); - else - redirectCall = false; - - if (redirectCall) - { - if (md.Module != targetMethod.Module) - { - base.LogError($"{md.Name} in {md.DeclaringType.Name}/{md.Module.Name} calls method {targetMethod.Name} in {targetMethod.DeclaringType.Name}/{targetMethod.Module.Name}. Code stripping cannot work on client and server attributed methods when they are being called across assemblies. Use an accessor method within {targetMethod.DeclaringType.Name}/{targetMethod.Module.Name} to resolve this."); - } - else - { - MethodDefinition dummyMd = GetOrMakeDummyMethod(md, targetMethod); - targetMethod.Module.ImportReference(dummyMd); - md.Module.ImportReference(dummyMd); - inst.Operand = dummyMd; - } - } - } - - } - - } - - //Gets a dummy method in targetMd, or creates it should it not exist. - MethodDefinition GetOrMakeDummyMethod(MethodDefinition callerMd, MethodDefinition targetMd) - { - string mdName = $"CallDummyMethod___{RpcProcessor.GetMethodNameAsParameters(targetMd)}"; - MethodDefinition result = targetMd.DeclaringType.GetMethod(mdName); - if (result == null) - { - TypeReference returnType; - //Is generic. - if (targetMd.ReturnType.IsGenericInstance) - { - TypeReference tr = targetMd.ReturnType; - GenericInstanceType git = (GenericInstanceType)tr; - returnType = base.ImportReference(git); - } - else - { - returnType = base.ImportReference(targetMd.ReturnType); - } - - result = new MethodDefinition(mdName, targetMd.Attributes, returnType); - foreach (ParameterDefinition item in targetMd.Parameters) - { - base.ImportReference(item.ParameterType); - result.Parameters.Add(item); - } - - targetMd.DeclaringType.Methods.Add(result); - result.ClearMethodWithRet(base.Session,callerMd.Module); - result.Body.InitLocals = true; - } - - callerMd.Module.ImportReference(result); - targetMd.Module.ImportReference(result); - - return result; - } - - - } - //PROEND + } } diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/QOLAttributeProcessor.cs.meta b/Assets/FishNet/CodeGenerating/Processing/QOLAttributeProcessor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/QOLAttributeProcessor.cs.meta rename to Assets/FishNet/CodeGenerating/Processing/QOLAttributeProcessor.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/ReaderProcessor.cs b/Assets/FishNet/CodeGenerating/Processing/ReaderProcessor.cs similarity index 90% rename from Assets/Packages/FishNet/CodeGenerating/Processing/ReaderProcessor.cs rename to Assets/FishNet/CodeGenerating/Processing/ReaderProcessor.cs index 986392e..f00a35b 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Processing/ReaderProcessor.cs +++ b/Assets/FishNet/CodeGenerating/Processing/ReaderProcessor.cs @@ -10,6 +10,7 @@ using FishNet.CodeGenerating.Extension; using FishNet.Utility.Performance; using FishNet.Object; +using FishNet.Utility; namespace FishNet.CodeGenerating.Helping { @@ -18,8 +19,8 @@ internal class ReaderProcessor : CodegenBase { #region Reflection references. - public TypeDefinition GeneratedReaderClassTypeDef; - public MethodDefinition GeneratedReaderOnLoadMethodDef; + public TypeDefinition GeneratedReader_TypeDef; + public MethodDefinition GeneratedReader_OnLoad_MethodDef; public readonly Dictionary InstancedReaderMethods = new Dictionary(); public readonly Dictionary StaticReaderMethods = new Dictionary(); public HashSet AutoPackedMethods = new HashSet(new TypeReferenceComparer()); @@ -61,16 +62,12 @@ internal class ReaderProcessor : CodegenBase /// /// Prefix used which all instanced and user created serializers should start with. /// - internal const string READ_PREFIX = "Read"; + internal const string CUSTOM_READER_PREFIX = "Read"; /// /// Class name to use for generated readers. /// internal const string GENERATED_READERS_CLASS_NAME = "GeneratedReaders___Internal"; /// - /// Prefix to use for generated readers. - /// - private const string GENERATED_READ_PREFIX = "Read___"; - /// /// Types to exclude from being scanned for auto serialization. /// public static System.Type[] EXCLUDED_AUTO_SERIALIZER_TYPES => WriterProcessor.EXCLUDED_AUTO_SERIALIZER_TYPES; @@ -78,27 +75,37 @@ internal class ReaderProcessor : CodegenBase /// Types to exclude from being scanned for auto serialization. /// public static string[] EXCLUDED_ASSEMBLY_PREFIXES => WriterProcessor.EXCLUDED_ASSEMBLY_PREFIXES; + /// + /// MethodReference for Write. + /// + private MethodReference _readUnpackedMethodRef; #endregion - public override bool ImportReferences() => true; + public override bool ImportReferences() + { + TypeReference readerTr = base.ImportReference(typeof(Reader)); + _readUnpackedMethodRef = readerTr.CachedResolve(base.Session).GetMethodReference(base.Session, nameof(Reader.ReadUnpacked)); + + return true; + } public bool Process() { GeneralHelper gh = base.GetClass(); - CreateGeneratedClassData(); + CreateGeneratedReadersClass(); FindInstancedReaders(); CreateInstancedReaderExtensions(); - void CreateGeneratedClassData() + void CreateGeneratedReadersClass() { - GeneratedReaderClassTypeDef = gh.GetOrCreateClass(out _, ReaderProcessor.GENERATED_TYPE_ATTRIBUTES, ReaderProcessor.GENERATED_READERS_CLASS_NAME, null, WriterProcessor.GENERATED_WRITER_NAMESPACE); + GeneratedReader_TypeDef = gh.GetOrCreateClass(out _, ReaderProcessor.GENERATED_TYPE_ATTRIBUTES, ReaderProcessor.GENERATED_READERS_CLASS_NAME, null, WriterProcessor.GENERATED_WRITER_NAMESPACE); /* If constructor isn't set then try to get or create it * and also add it to methods if were created. */ - GeneratedReaderOnLoadMethodDef = gh.GetOrCreateMethod(GeneratedReaderClassTypeDef, out _, INITIALIZEONCE_METHOD_ATTRIBUTES, INITIALIZEONCE_METHOD_NAME, base.Module.TypeSystem.Void); - gh.CreateRuntimeInitializeOnLoadMethodAttribute(GeneratedReaderOnLoadMethodDef); + GeneratedReader_OnLoad_MethodDef = gh.GetOrCreateMethod(GeneratedReader_TypeDef, out _, INITIALIZEONCE_METHOD_ATTRIBUTES, INITIALIZEONCE_METHOD_NAME, base.Module.TypeSystem.Void); + gh.CreateRuntimeInitializeOnLoadMethodAttribute(GeneratedReader_OnLoad_MethodDef); - ILProcessor ppp = GeneratedReaderOnLoadMethodDef.Body.GetILProcessor(); + ILProcessor ppp = GeneratedReader_OnLoad_MethodDef.Body.GetILProcessor(); ppp.Emit(OpCodes.Ret); //GeneratedReaderOnLoadMethodDef.DeclaringType.Methods.Remove(GeneratedReaderOnLoadMethodDef); } @@ -156,11 +163,8 @@ public bool IsIgnoredReadMethod(SR.MethodInfo methodInfo, out bool autoPackMetho if (base.GetClass().HasNotSerializableAttribute(methodInfo)) return true; - //Not long enough to be a write method. - else if (methodInfo.Name.Length < READ_PREFIX.Length) - return true; - //Method name doesn't start with writePrefix. - else if (methodInfo.Name.Substring(0, READ_PREFIX.Length) != READ_PREFIX) + //Method name doesn't start with prefix. + else if (!methodInfo.Name.StartsWith(CUSTOM_READER_PREFIX)) return true; SR.ParameterInfo[] parameterInfos = methodInfo.GetParameters(); //Can have at most one parameter for packing. @@ -203,27 +207,22 @@ internal void AddReaderMethod(TypeReference typeRef, MethodReference methodRef, /// /// /// - internal void CreateReadDelegate(MethodReference readMr, bool isStatic) + internal void CreateInitializeDelegate(MethodReference readMr) { GeneralHelper gh = base.GetClass(); ReaderImports ri = base.GetClass(); + WriterProcessor wp = base.GetClass(); - if (!isStatic) - { - //Supporting Write with types containing generics is more trouble than it's worth. - if (readMr.IsGenericInstance || readMr.HasGenericParameters) - return; - } + /* If a global serializer is declared for the type + * and the method is not the declared serializer then + * exit early. */ + if (wp.IsGlobalSerializer(readMr.ReturnType) && readMr.Name.StartsWith(UtilityConstants.GENERATED_READER_PREFIX)) + return; - //Check if ret already exist, if so remove it; ret will be added on again in this method. - if (GeneratedReaderOnLoadMethodDef.Body.Instructions.Count != 0) - { - int lastIndex = (GeneratedReaderOnLoadMethodDef.Body.Instructions.Count - 1); - if (GeneratedReaderOnLoadMethodDef.Body.Instructions[lastIndex].OpCode == OpCodes.Ret) - GeneratedReaderOnLoadMethodDef.Body.Instructions.RemoveAt(lastIndex); - } + GeneratedReader_OnLoad_MethodDef.RemoveEndRet(base.Session); + //Check if already exist. - ILProcessor processor = GeneratedReaderOnLoadMethodDef.Body.GetILProcessor(); + ILProcessor processor = GeneratedReader_OnLoad_MethodDef.Body.GetILProcessor(); TypeReference dataTypeRef = readMr.ReturnType; if (_delegatedTypes.Contains(dataTypeRef)) { @@ -246,22 +245,22 @@ internal void CreateReadDelegate(MethodReference readMr, bool isStatic) //Generate for autopacktype. if (isAutoPacked) { - functionGenericInstance = gh.FunctionT3TypeRef.MakeGenericInstanceType(ri.ReaderTypeRef, base.GetClass().AutoPackTypeRef, dataTypeRef); + functionGenericInstance = gh.FunctionT3TypeRef.MakeGenericInstanceType(ri.Reader_TypeRef, base.GetClass().AutoPackTypeRef, dataTypeRef); functionConstructorInstanceMethodRef = gh.FunctionT3ConstructorMethodRef.MakeHostInstanceGeneric(base.Session, functionGenericInstance); } //Not autopacked. else { - functionGenericInstance = gh.FunctionT2TypeRef.MakeGenericInstanceType(ri.ReaderTypeRef, dataTypeRef); + functionGenericInstance = gh.FunctionT2TypeRef.MakeGenericInstanceType(ri.Reader_TypeRef, dataTypeRef); functionConstructorInstanceMethodRef = gh.FunctionT2ConstructorMethodRef.MakeHostInstanceGeneric(base.Session, functionGenericInstance); } processor.Emit(OpCodes.Newobj, functionConstructorInstanceMethodRef); //Call delegate to GeneratedReader.Read - GenericInstanceType genericInstance = ri.GenericReaderTypeRef.MakeGenericInstanceType(dataTypeRef); + GenericInstanceType genericInstance = ri.GenericReader_TypeRef.MakeGenericInstanceType(dataTypeRef); MethodReference genericReadMethodRef = (isAutoPacked) ? - ri.ReadAutoPackSetMethodRef.MakeHostInstanceGeneric(base.Session, genericInstance) : - ri.ReadSetMethodRef.MakeHostInstanceGeneric(base.Session, genericInstance); + ri.GenericReader_ReadAutoPacked_MethodRef.MakeHostInstanceGeneric(base.Session, genericInstance) : + ri.GenericReader_ReadUnpacked_MethodRef.MakeHostInstanceGeneric(base.Session, genericInstance); processor.Emit(OpCodes.Call, genericReadMethodRef); processor.Emit(OpCodes.Ret); @@ -284,7 +283,7 @@ private void CreateInstancedReaderExtensions() MethodReference instancedReadMr = item.Value; if (instancedReadMr.ContainsGenericParameter) continue; - + TypeReference returnTr = base.ImportReference(instancedReadMr.ReturnType); MethodDefinition md = new MethodDefinition($"InstancedExtension___{instancedReadMr.Name}", @@ -296,7 +295,7 @@ private void CreateInstancedReaderExtensions() List otherPds = md.CreateParameters(base.Session, instancedReadMr); gh.MakeExtensionMethod(md); // - gwh.GeneratedReaderClassTypeDef.Methods.Add(md); + gwh.GeneratedReader_TypeDef.Methods.Add(md); ILProcessor processor = md.Body.GetILProcessor(); //Load writer. @@ -332,20 +331,23 @@ internal List CreateRead(MethodDefinition methodDef, ParameterDefin ILProcessor processor = methodDef.Body.GetILProcessor(); List insts = new List(); MethodReference readMr = GetOrCreateReadMethodReference(readTypeRef); + if (readMr != null) { + TypeReference dataTr = readMr.ReturnType; + bool isGlobalSerializer = base.GetClass().IsGlobalSerializer(dataTr); + //Make a local variable. createdVariableDef = base.GetClass().CreateVariable(methodDef, readTypeRef); //pooledReader.ReadBool(); insts.Add(processor.Create(OpCodes.Ldarg, readerParameterDef)); //If an auto pack method then insert default value. - if (AutoPackedMethods.Contains(readTypeRef)) + if (!isGlobalSerializer && AutoPackedMethods.Contains(readTypeRef)) { AutoPackType packType = base.GetClass().GetDefaultAutoPackType(readTypeRef); insts.Add(processor.Create(OpCodes.Ldc_I4, (int)packType)); } - TypeReference valueTr = readTypeRef; /* If generic then find write class for * data type. Currently we only support one generic @@ -357,6 +359,13 @@ internal List CreateRead(MethodDefinition methodDef, ParameterDefin readMr = readMr.GetMethodReference(base.Session, genericTr); } + if (isGlobalSerializer) + { + //Switch out to use Read instead. + TypeReference genericTr = base.ImportReference(readTypeRef); + readMr = _readUnpackedMethodRef.GetMethodReference(base.Session, genericTr); + } + insts.Add(processor.Create(OpCodes.Call, readMr)); //Store into local variable. insts.Add(processor.Create(OpCodes.Stloc, createdVariableDef)); @@ -370,50 +379,58 @@ internal List CreateRead(MethodDefinition methodDef, ParameterDefin } } - - /// /// Creates a read for fieldRef and populates it into a created variable of class or struct type. /// - internal bool CreateReadIntoClassOrStruct(MethodDefinition readerMd, ParameterDefinition readerPd, MethodReference readMr, VariableDefinition objectVd, FieldReference valueFr) + internal bool CreateReadIntoClassOrStruct(MethodDefinition readerMd, ParameterDefinition readerPd, MethodReference readMr, VariableDefinition encasingValueVd, FieldReference memberValueFr) { if (readMr != null) { + WriterProcessor wp = base.GetClass(); + bool isGlobalSerializer = (wp.IsGlobalSerializer(encasingValueVd.VariableType) || wp.IsGlobalSerializer(memberValueFr.FieldType)); + ILProcessor processor = readerMd.Body.GetILProcessor(); /* How to load object instance. If it's a structure * then it must be loaded by address. Otherwise if * class Ldloc can be used. */ - OpCode loadOpCode = (objectVd.VariableType.IsValueType) ? + OpCode loadOpCode = (encasingValueVd.VariableType.IsValueType) ? OpCodes.Ldloca : OpCodes.Ldloc; /* If generic then find write class for * data type. Currently we only support one generic * for this. */ - if (valueFr.FieldType.IsGenericInstance) + if (memberValueFr.FieldType.IsGenericInstance) { - GenericInstanceType git = (GenericInstanceType)valueFr.FieldType; + GenericInstanceType git = (GenericInstanceType)memberValueFr.FieldType; TypeReference genericTr = git.GenericArguments[0]; readMr = readMr.GetMethodReference(base.Session, genericTr); } - processor.Emit(loadOpCode, objectVd); + processor.Emit(loadOpCode, encasingValueVd); //reader. processor.Emit(OpCodes.Ldarg, readerPd); - if (IsAutoPackedType(valueFr.FieldType)) + if (!isGlobalSerializer && IsAutoPackedType(memberValueFr.FieldType)) { - AutoPackType packType = base.GetClass().GetDefaultAutoPackType(valueFr.FieldType); + AutoPackType packType = base.GetClass().GetDefaultAutoPackType(memberValueFr.FieldType); processor.Emit(OpCodes.Ldc_I4, (int)packType); } + + if (isGlobalSerializer) + { + //Switch out to use Read instead. + TypeReference genericTr = base.ImportReference(memberValueFr.FieldType); + readMr = _readUnpackedMethodRef.GetMethodReference(base.Session, genericTr); + } //reader.ReadXXXX(). processor.Emit(OpCodes.Call, readMr); //obj.Field = result / reader.ReadXXXX(). - processor.Emit(OpCodes.Stfld, valueFr); + processor.Emit(OpCodes.Stfld, memberValueFr); return true; } else { - base.LogError($"Reader not found for {valueFr.FullName}."); + base.LogError($"Reader not found for {memberValueFr.FullName}."); return false; } } @@ -472,10 +489,10 @@ internal bool CreateReadIntoClassOrStruct(MethodDefinition methodDef, ParameterD /// /// Creates generic write delegates for all currently known write types. /// - internal void CreateStaticMethodDelegates() + internal void CreateInitializeDelegates() { foreach (KeyValuePair item in StaticReaderMethods) - base.GetClass().CreateReadDelegate(item.Value, true); + base.GetClass().CreateInitializeDelegate(item.Value); } @@ -679,7 +696,7 @@ internal MethodReference CreateReader(TypeReference objectTr) { //Array. if (serializerType == SerializerType.Array) - resultMr = CreateArrayReaderMethodReference(objectTr); + resultMr = CreateArrayReaderMethodReference(objectTr); //Enum. else if (serializerType == SerializerType.Enum) resultMr = CreateEnumReaderMethodDefinition(objectTr); @@ -846,7 +863,7 @@ private MethodReference CreateGenericCollectionReaderMethodReference(TypeReferen { base.LogError($"Reader could not be found or created for type {gaTr.FullName}."); return null; - } + } genericArguments.Add(gaTr); } MethodReference valueWriteMr = GetOrCreateReadMethodReference(valueTr); @@ -1046,7 +1063,7 @@ private MethodReference CreateClassOrStructReaderMethodReference(TypeReference o /// /// Reads all fields of objectTypeRef. /// - private bool ReadFieldsAndProperties(MethodDefinition readerMd, ParameterDefinition readerPd, VariableDefinition objectVd, TypeReference objectTr) + private bool ReadFieldsAndProperties(MethodDefinition readerMd, ParameterDefinition readerPd, VariableDefinition encasingValueVd, TypeReference objectTr) { ReaderProcessor rp = base.GetClass(); @@ -1060,7 +1077,7 @@ private bool ReadFieldsAndProperties(MethodDefinition readerMd, ParameterDefinit { FieldReference importedFr = base.ImportReference(fieldDef); if (GetReadMethod(fieldDef.FieldType, out MethodReference readMr)) - rp.CreateReadIntoClassOrStruct(readerMd, readerPd, readMr, objectVd, importedFr); + rp.CreateReadIntoClassOrStruct(readerMd, readerPd, readMr, encasingValueVd, importedFr); } //Properties. @@ -1070,7 +1087,7 @@ private bool ReadFieldsAndProperties(MethodDefinition readerMd, ParameterDefinit if (GetReadMethod(propertyDef.PropertyType, out MethodReference readMr)) { MethodReference setMr = base.Module.ImportReference(propertyDef.SetMethod); - rp.CreateReadIntoClassOrStruct(readerMd, readerPd, readMr, objectVd, setMr, propertyDef.PropertyType); + rp.CreateReadIntoClassOrStruct(readerMd, readerPd, readMr, encasingValueVd, setMr, propertyDef.PropertyType); } } @@ -1093,7 +1110,7 @@ bool GetReadMethod(TypeReference tr, out MethodReference readMr) /// public MethodDefinition CreateStaticReaderStubMethodDefinition(TypeReference objectTypeRef, string nameExtension = WriterProcessor.GENERATED_WRITER_NAMESPACE) { - string methodName = $"{GENERATED_READ_PREFIX}{objectTypeRef.FullName}{nameExtension}s"; + string methodName = $"{UtilityConstants.GENERATED_READER_PREFIX}{objectTypeRef.FullName}{nameExtension}s"; // create new reader for this type TypeDefinition readerTypeDef = base.GetClass().GetOrCreateClass(out _, GENERATED_TYPE_ATTRIBUTES, GENERATED_READERS_CLASS_NAME, null); MethodDefinition readerMethodDef = readerTypeDef.AddMethod(methodName, diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/ReaderProcessor.cs.meta b/Assets/FishNet/CodeGenerating/Processing/ReaderProcessor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/ReaderProcessor.cs.meta rename to Assets/FishNet/CodeGenerating/Processing/ReaderProcessor.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/Rpc.meta b/Assets/FishNet/CodeGenerating/Processing/Rpc.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/Rpc.meta rename to Assets/FishNet/CodeGenerating/Processing/Rpc.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/AttributeData.cs b/Assets/FishNet/CodeGenerating/Processing/Rpc/AttributeData.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/AttributeData.cs rename to Assets/FishNet/CodeGenerating/Processing/Rpc/AttributeData.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/AttributeData.cs.meta b/Assets/FishNet/CodeGenerating/Processing/Rpc/AttributeData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/AttributeData.cs.meta rename to Assets/FishNet/CodeGenerating/Processing/Rpc/AttributeData.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/Attributes.cs b/Assets/FishNet/CodeGenerating/Processing/Rpc/Attributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/Attributes.cs rename to Assets/FishNet/CodeGenerating/Processing/Rpc/Attributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/Attributes.cs.meta b/Assets/FishNet/CodeGenerating/Processing/Rpc/Attributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/Attributes.cs.meta rename to Assets/FishNet/CodeGenerating/Processing/Rpc/Attributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/CreatedRpc.cs b/Assets/FishNet/CodeGenerating/Processing/Rpc/CreatedRpc.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/CreatedRpc.cs rename to Assets/FishNet/CodeGenerating/Processing/Rpc/CreatedRpc.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/CreatedRpc.cs.meta b/Assets/FishNet/CodeGenerating/Processing/Rpc/CreatedRpc.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/CreatedRpc.cs.meta rename to Assets/FishNet/CodeGenerating/Processing/Rpc/CreatedRpc.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/RpcProcessor.cs b/Assets/FishNet/CodeGenerating/Processing/Rpc/RpcProcessor.cs similarity index 94% rename from Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/RpcProcessor.cs rename to Assets/FishNet/CodeGenerating/Processing/Rpc/RpcProcessor.cs index 3446d9b..179b804 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/RpcProcessor.cs +++ b/Assets/FishNet/CodeGenerating/Processing/Rpc/RpcProcessor.cs @@ -269,22 +269,7 @@ private MethodDefinition CreateRpcWriterMethod(List seriali { intentionallyNull = false; - //PROSTART - if (CodeStripping.StripBuild) - { - /* Clients don't need writers for client rpcs, - * just as server doesnt need writers for server rpcs. */ - bool isServerRpc = (cr.RpcType == RpcType.Server); - if ( - (isServerRpc && CodeStripping.ReleasingForServer) || - (!isServerRpc && CodeStripping.ReleasingForClient) - ) - { - intentionallyNull = true; - return null; - } - } - //PROEND + string methodName = $"{WRITER_PREFIX}{GetRpcMethodName(cr)}"; /* If method already exist then clear it. This @@ -394,9 +379,7 @@ private bool CreateClientRpcWriterMethod(List serializedPar /* Creates basic ServerRpc and ClientRpc * conditions such as if requireOwnership ect.. * or if (!base.isClient) */ - //PROSTART - if (!CodeStripping.StripBuild) - //PROEND + CreateClientRpcConditionsForServer(writerMd); VariableDefinition channelVariableDef = CreateAndPopulateChannelVariable(writerMd, channelParameterDef); @@ -454,9 +437,7 @@ private bool CreateServerRpcWriterMethod(List serializedPar /* Creates basic ServerRpc * conditions such as if requireOwnership ect.. * or if (!base.isClient) */ - //PROSTART - if (!CodeStripping.StripBuild) - //PROEND + CreateServerRpcConditionsForClient(writerMd, cr.Attribute); VariableDefinition channelVariableDef = CreateAndPopulateChannelVariable(writerMd, channelParameterDef); @@ -522,22 +503,7 @@ private MethodDefinition CreateRpcReaderMethod(List seriali MethodDefinition logicMd = cr.LogicMethodDef; CustomAttribute rpcAttribute = cr.Attribute; - //PROSTART - if (CodeStripping.StripBuild) - { - /* Server doesnt need readers for client rpcs, - * just as clients dont need reader for server rpcs. */ - bool isServerRpc = (cr.RpcType == RpcType.Server); - if ( - (isServerRpc && CodeStripping.ReleasingForClient) || - (!isServerRpc && CodeStripping.ReleasingForServer) - ) - { - intentionallyNull = true; - return null; - } - } - //PROEND + string methodName = $"{READER_PREFIX}{GetRpcMethodName(cr)}"; /* If method already exist then just return it. This @@ -910,25 +876,7 @@ private MethodDefinition CreateRpcLogicMethod(List datas, Created TypeDefinition typeDef = cr.TypeDef; MethodDefinition originalMd = cr.OriginalMethodDef; - //PROSTART - /* If running locally then logic must exist for both. - * Such the case, don't exclude logic. */ - if (CodeStripping.StripBuild && !cr.RunLocally) - { - /* Client doesn't need logic of a serverRpc - * and server doesn't need logic of client rpcs. */ - bool isServerRpc = (cr.RpcType == RpcType.Server); - if ( - (isServerRpc && CodeStripping.ReleasingForClient) || - (!isServerRpc && CodeStripping.ReleasingForServer) - ) - { - originalMd.ClearMethodWithRet(base.Session); - intentionallyNull = true; - return null; - } - } - //PROEND + //Methodname for logic methods do not use prefixes because there can be only one. string methodName = $"{LOGIC_PREFIX}{GetMethodNameAsParameters(originalMd)}"; @@ -985,19 +933,7 @@ private void RedirectOriginalToWriter(List createdRpcs) * entry. */ MethodDefinition originalMd = createdRpcs[0].OriginalMethodDef; - //PROSTART - if (CodeStripping.StripBuild) - { - /* If there is no writer method then nothing - * can be redirected. This could occur during code - * stripping. */ - if (createdRpcs[0].WriterMethodDef == null) - { - originalMd.ClearMethodWithRet(base.Session); - return; - } - } - //PROEND + ILProcessor processor = originalMd.Body.GetILProcessor(); originalMd.Body.Instructions.Clear(); diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/RpcProcessor.cs.meta b/Assets/FishNet/CodeGenerating/Processing/Rpc/RpcProcessor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/Rpc/RpcProcessor.cs.meta rename to Assets/FishNet/CodeGenerating/Processing/Rpc/RpcProcessor.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/SyncTypeProcessor.cs b/Assets/FishNet/CodeGenerating/Processing/SyncTypeProcessor.cs similarity index 99% rename from Assets/Packages/FishNet/CodeGenerating/Processing/SyncTypeProcessor.cs rename to Assets/FishNet/CodeGenerating/Processing/SyncTypeProcessor.cs index b72adef..d89d970 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Processing/SyncTypeProcessor.cs +++ b/Assets/FishNet/CodeGenerating/Processing/SyncTypeProcessor.cs @@ -413,7 +413,9 @@ private bool TryCreateGenericSyncType(uint hash, FieldDefinition originalFieldDe if (!CanSerialize(originalFieldDef, typeRefs)) return false; - InitializeSyncType(hash, originalFieldDef, typeRefs, isSyncObject); + if (!InitializeSyncType(hash, originalFieldDef, typeRefs, isSyncObject)) + return false; + return true; } diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/SyncTypeProcessor.cs.meta b/Assets/FishNet/CodeGenerating/Processing/SyncTypeProcessor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/SyncTypeProcessor.cs.meta rename to Assets/FishNet/CodeGenerating/Processing/SyncTypeProcessor.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/WriterProcessor.cs b/Assets/FishNet/CodeGenerating/Processing/WriterProcessor.cs similarity index 91% rename from Assets/Packages/FishNet/CodeGenerating/Processing/WriterProcessor.cs rename to Assets/FishNet/CodeGenerating/Processing/WriterProcessor.cs index cb72c71..8c11590 100644 --- a/Assets/Packages/FishNet/CodeGenerating/Processing/WriterProcessor.cs +++ b/Assets/FishNet/CodeGenerating/Processing/WriterProcessor.cs @@ -3,6 +3,7 @@ using FishNet.CodeGenerating.ILCore; using FishNet.Object; using FishNet.Serializing; +using FishNet.Utility; using FishNet.Utility.Performance; using MonoFN.Cecil; using MonoFN.Cecil.Cil; @@ -60,13 +61,13 @@ internal class WriterProcessor : CodegenBase /// public const MethodAttributes GENERATED_METHOD_ATTRIBUTES = (MethodAttributes.Static | MethodAttributes.Public | MethodAttributes.HideBySig); /// - /// Prefix all built-in and user created write methods should begin with. + /// Attributes required for custom serializer classes. /// - internal const string WRITE_PREFIX = "Write"; + public const TypeAttributes CUSTOM_SERIALIZER_TYPEDEF_ATTRIBUTES = (TypeAttributes.Sealed | TypeAttributes.Abstract); /// /// Prefix all built-in and user created write methods should begin with. /// - internal const string GENERATED_WRITE_PREFIX = "Write___"; + internal const string CUSTOM_WRITER_PREFIX = "Write"; /// /// Types to exclude from being scanned for auto serialization. /// @@ -93,12 +94,12 @@ public bool Process() { GeneralHelper gh = base.GetClass(); - CreateGeneratedClassData(); + CreateGeneratedWritersClass(); FindInstancedWriters(); CreateInstancedWriterExtensions(); //Creates class for generated writers, and init on load method. - void CreateGeneratedClassData() + void CreateGeneratedWritersClass() { GeneratedWriterClassTypeDef = gh.GetOrCreateClass(out _, GENERATED_TYPE_ATTRIBUTES, GENERATED_WRITERS_CLASS_NAME, null, WriterProcessor.GENERATED_WRITER_NAMESPACE); /* If constructor isn't set then try to get or create it @@ -163,11 +164,8 @@ public bool IsIgnoredWriteMethod(SR.MethodInfo methodInfo, out bool autoPackMeth if (base.GetClass().HasNotSerializableAttribute(methodInfo)) return true; - //Not long enough to be a write method. - else if (methodInfo.Name.Length < WRITE_PREFIX.Length) - return true; - //Method name doesn't start with writePrefix. - else if (methodInfo.Name.Substring(0, WRITE_PREFIX.Length) != WRITE_PREFIX) + //Method name doesn't start with prefix. + else if (!methodInfo.Name.StartsWith(CUSTOM_WRITER_PREFIX)) return true; SR.ParameterInfo[] parameterInfos = methodInfo.GetParameters(); @@ -194,7 +192,6 @@ public bool IsIgnoredWriteMethod(SR.MethodInfo methodInfo, out bool autoPackMeth /// private void CreateInstancedWriterExtensions() { - //return; if (!FishNetILPP.IsFishNetAssembly(base.Session)) return; @@ -273,21 +270,27 @@ public bool IsAutoPackedType(TypeReference typeRef) /// /// Creates Write delegates for known static methods. /// - public void CreateStaticMethodDelegates() + public void CreateInitializeDelegates() { foreach (KeyValuePair item in StaticWriterMethods) - base.GetClass().CreateStaticMethodWriteDelegate(item.Value); + base.GetClass().CreateInitializeDelegate(item.Value); } /// /// Creates a Write delegate for writeMethodRef and places it within the generated reader/writer constructor. /// /// - private void CreateStaticMethodWriteDelegate(MethodReference writeMr) + private void CreateInitializeDelegate(MethodReference writeMr) { GeneralHelper gh = base.GetClass(); WriterImports wi = base.GetClass(); + /* If a global serializer is declared for the type + * and the method is not the declared serializer then + * exit early. */ + if (IsGlobalSerializer(writeMr.Parameters[1].ParameterType) && writeMr.Name.StartsWith(UtilityConstants.GENERATED_WRITER_PREFIX)) + return; + //Check if ret already exist, if so remove it; ret will be added on again in this method. if (GeneratedWriterOnLoadMethodDef.Body.Instructions.Count != 0) { @@ -324,23 +327,23 @@ private void CreateStaticMethodWriteDelegate(MethodReference writeMr) //Generate for auto pack type. if (isAutoPacked) { - actionGenericInstance = gh.ActionT3_TypeRef.MakeGenericInstanceType(wi.WriterTypeRef, dataTypeRef, base.GetClass().AutoPackTypeRef); + actionGenericInstance = gh.ActionT3_TypeRef.MakeGenericInstanceType(wi.Writer_TypeRef, dataTypeRef, base.GetClass().AutoPackTypeRef); actionConstructorInstanceMethodRef = gh.ActionT3Constructor_MethodRef.MakeHostInstanceGeneric(base.Session, actionGenericInstance); } //Generate for normal type. else { - actionGenericInstance = gh.ActionT2_TypeRef.MakeGenericInstanceType(wi.WriterTypeRef, dataTypeRef); + actionGenericInstance = gh.ActionT2_TypeRef.MakeGenericInstanceType(wi.Writer_TypeRef, dataTypeRef); actionConstructorInstanceMethodRef = gh.ActionT2Constructor_MethodRef.MakeHostInstanceGeneric(base.Session, actionGenericInstance); } processor.Emit(OpCodes.Newobj, actionConstructorInstanceMethodRef); //Call delegate to GenericWriter.Write - GenericInstanceType genericInstance = wi.GenericWriterTypeRef.MakeGenericInstanceType(dataTypeRef); - MethodReference genericrWriteMethodRef = (isAutoPacked) ? - wi.WriteAutoPackGetSetMethodRef.MakeHostInstanceGeneric(base.Session, genericInstance) : - wi.WriteGetSetMethodRef.MakeHostInstanceGeneric(base.Session, genericInstance); - processor.Emit(OpCodes.Call, genericrWriteMethodRef); + GenericInstanceType genericInstance = wi.GenericWriter_TypeRef.MakeGenericInstanceType(dataTypeRef); + MethodReference genericWriteMethodRef = (isAutoPacked) ? + wi.GenericWriter_WriteAutoPacked_MethodRef.MakeHostInstanceGeneric(base.Session, genericInstance) : + wi.GenericWriter_WriteUnpacked_MethodRef.MakeHostInstanceGeneric(base.Session, genericInstance); + processor.Emit(OpCodes.Call, genericWriteMethodRef); processor.Emit(OpCodes.Ret); } @@ -427,9 +430,6 @@ internal MethodReference GetWriteMethodReference(TypeReference typeRef) /// internal MethodReference GetOrCreateWriteMethodReference(TypeReference typeRef) { -#pragma warning disable CS0219 - bool favorInstanced = false; -#pragma warning restore CS0219 //Try to get existing writer, if not present make one. MethodReference writeMethodRef = GetWriteMethodReference(typeRef); if (writeMethodRef == null) @@ -598,6 +598,14 @@ internal void CreateWriteBool(ILProcessor processor, ParameterDefinition writerP processor.Emit(writeBoolMethodRef.GetCallOpCode(base.Session), writeBoolMethodRef); } + /// + /// Returns if a type should use a declared/custom serializer globally. + /// + public bool IsGlobalSerializer(TypeReference dataTypeRef) + { + return dataTypeRef.CachedResolve(base.Session).HasCustomAttribute(); + } + /// /// Creates a Write call on a PooledWriter variable for parameterDef. /// EG: writer.WriteBool(xxxxx); @@ -609,6 +617,8 @@ internal List CreateWriteInstructions(MethodDefinition methodDef, o if (writeMr != null) { + bool isGlobalSerializer = IsGlobalSerializer(valueParameterDef.ParameterType); + if (pooledWriterDef is VariableDefinition) { insts.Add(processor.Create(OpCodes.Ldloc, (VariableDefinition)pooledWriterDef)); @@ -624,7 +634,7 @@ internal List CreateWriteInstructions(MethodDefinition methodDef, o } insts.Add(processor.Create(OpCodes.Ldarg, valueParameterDef)); //If an auto pack method then insert default value. - if (AutoPackedMethods.Contains(valueParameterDef.ParameterType)) + if (!isGlobalSerializer && AutoPackedMethods.Contains(valueParameterDef.ParameterType)) { AutoPackType packType = base.GetClass().GetDefaultAutoPackType(valueParameterDef.ParameterType); insts.Add(processor.Create(OpCodes.Ldc_I4, (int)packType)); @@ -641,6 +651,12 @@ internal List CreateWriteInstructions(MethodDefinition methodDef, o writeMr = writeMr.GetMethodReference(base.Session, genericTr); } + if (isGlobalSerializer) + { + //Switch out to use WriteUnpacked instead. + writeMr = base.GetClass().Writer_WriteUnpacked_MethodRef.GetMethodReference(base.Session, valueTr); + } + insts.Add(processor.Create(OpCodes.Call, writeMr)); return insts; } @@ -665,39 +681,63 @@ internal void CreateWrite(MethodDefinition methodDef, object writerDef, Paramete /// EG: StaticClass.WriteBool(xxxxx); /// /// - /// - internal void CreateWrite(MethodDefinition writerMd, ParameterDefinition valuePd, FieldDefinition fieldDef, MethodReference writeMr) + /// + internal void CreateWrite(MethodDefinition writerMd, ParameterDefinition encasingValuePd, FieldDefinition memberValueFd, MethodReference writeMr) { if (writeMr != null) { + bool isGlobalSerializer = (IsGlobalSerializer(memberValueFd.FieldType) || IsGlobalSerializer(encasingValuePd.ParameterType)); + ILProcessor processor = writerMd.Body.GetILProcessor(); ParameterDefinition writerPd = writerMd.Parameters[0]; /* If generic then find write class for * data type. Currently we only support one generic * for this. */ - if (fieldDef.FieldType.IsGenericInstance) + if (memberValueFd.FieldType.IsGenericInstance) { - GenericInstanceType git = (GenericInstanceType)fieldDef.FieldType; + GenericInstanceType git = (GenericInstanceType)memberValueFd.FieldType; TypeReference genericTr = git.GenericArguments[0]; writeMr = writeMr.GetMethodReference(base.Session, genericTr); } - FieldReference fieldRef = base.GetClass().GetFieldReference(fieldDef); + FieldReference fieldRef = base.GetClass().GetFieldReference(memberValueFd); processor.Emit(OpCodes.Ldarg, writerPd); - processor.Emit(OpCodes.Ldarg, valuePd); + processor.Emit(OpCodes.Ldarg, encasingValuePd); processor.Emit(OpCodes.Ldfld, fieldRef); //If an auto pack method then insert default value. - if (AutoPackedMethods.Contains(fieldDef.FieldType)) + if (!isGlobalSerializer && AutoPackedMethods.Contains(memberValueFd.FieldType)) { - AutoPackType packType = base.GetClass().GetDefaultAutoPackType(fieldDef.FieldType); + AutoPackType packType = base.GetClass().GetDefaultAutoPackType(memberValueFd.FieldType); processor.Emit(OpCodes.Ldc_I4, (int)packType); } + + /* If a generated write then instead of calling the + * generated write directly call writer.Write of + * the type. + * + * This will reroute to the generic writer, which does add an + * extra step, but this also allows us to decide what writer + * to use. In GenericWriter we can check if a method being set + * as the writer is generated, and if so while another method + * had already been set then favor the other method. + * + * This will favor built-in and user created serializers. This has to be + * done because we cannot check if a user created serializer exist + * across assemblies, but at runtime we can make sure to favor the + * created one as described above. */ + //True if has Write prefix for generated writers. + if (isGlobalSerializer) + { + //Switch out to use WriteUnpacked instead. + TypeReference genericTr = base.ImportReference(memberValueFd.FieldType); + writeMr = base.GetClass().Writer_WriteUnpacked_MethodRef.GetMethodReference(base.Session, genericTr); + } processor.Emit(OpCodes.Call, writeMr); } else { - base.LogError($"Writer not found for {fieldDef.FieldType.FullName}."); + base.LogError($"Writer not found for {memberValueFd.FieldType.FullName}."); } } @@ -949,7 +989,7 @@ private MethodReference CreateClassOrStructWriterMethodDefinition(TypeReference /// /// /// false if fail - private bool WriteFieldsAndProperties(MethodDefinition generatedWriteMd, ParameterDefinition valuePd, TypeReference objectTr) + private bool WriteFieldsAndProperties(MethodDefinition generatedWriteMd, ParameterDefinition encasingValuePd, TypeReference objectTr) { WriterProcessor wh = base.GetClass(); @@ -971,7 +1011,7 @@ private bool WriteFieldsAndProperties(MethodDefinition generatedWriteMd, Paramet tr = fieldDef.FieldType; } if (GetWriteMethod(fieldDef.FieldType, out MethodReference writeMr)) - wh.CreateWrite(generatedWriteMd, valuePd, fieldDef, writeMr); + wh.CreateWrite(generatedWriteMd, encasingValuePd, fieldDef, writeMr); } //Properties. @@ -981,7 +1021,7 @@ private bool WriteFieldsAndProperties(MethodDefinition generatedWriteMd, Paramet if (GetWriteMethod(propertyDef.PropertyType, out MethodReference writerMr)) { MethodReference getMr = base.Module.ImportReference(propertyDef.GetMethod); - wh.CreateWrite(generatedWriteMd, valuePd, getMr, writerMr); + wh.CreateWrite(generatedWriteMd, encasingValuePd, getMr, writerMr); } } @@ -1133,7 +1173,7 @@ private MethodReference CreateGenericCollectionWriterMethodReference(TypeReferen /// public MethodDefinition CreateStaticWriterStubMethodDefinition(TypeReference objectTypeRef, string nameExtension = WriterProcessor.GENERATED_WRITER_NAMESPACE) { - string methodName = $"{GENERATED_WRITE_PREFIX}{objectTypeRef.FullName}{nameExtension}"; + string methodName = $"{UtilityConstants.GENERATED_WRITER_PREFIX}{objectTypeRef.FullName}{nameExtension}"; // create new writer for this type TypeDefinition writerTypeDef = base.GetClass().GetOrCreateClass(out _, GENERATED_TYPE_ATTRIBUTES, GENERATED_WRITERS_CLASS_NAME, null); diff --git a/Assets/Packages/FishNet/CodeGenerating/Processing/WriterProcessor.cs.meta b/Assets/FishNet/CodeGenerating/Processing/WriterProcessor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Processing/WriterProcessor.cs.meta rename to Assets/FishNet/CodeGenerating/Processing/WriterProcessor.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/Unity.FishNet.CodeGen.asmdef b/Assets/FishNet/CodeGenerating/Unity.FishNet.CodeGen.asmdef similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Unity.FishNet.CodeGen.asmdef rename to Assets/FishNet/CodeGenerating/Unity.FishNet.CodeGen.asmdef diff --git a/Assets/Packages/FishNet/CodeGenerating/Unity.FishNet.CodeGen.asmdef.meta b/Assets/FishNet/CodeGenerating/Unity.FishNet.CodeGen.asmdef.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/Unity.FishNet.CodeGen.asmdef.meta rename to Assets/FishNet/CodeGenerating/Unity.FishNet.CodeGen.asmdef.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Directory.Build.props b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Directory.Build.props similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Directory.Build.props rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Directory.Build.props diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Directory.Build.props.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Directory.Build.props.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Directory.Build.props.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Directory.Build.props.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/LICENSE.txt b/Assets/FishNet/CodeGenerating/cecil-0.11.4/LICENSE.txt similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/LICENSE.txt rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/LICENSE.txt diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/LICENSE.txt.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/LICENSE.txt.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/LICENSE.txt.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/LICENSE.txt.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Code.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Code.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Code.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Code.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Code.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Code.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Code.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Code.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeReader.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeReader.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeReader.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeReader.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeReader.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeReader.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeReader.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeReader.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeWriter.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeWriter.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeWriter.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeWriter.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeWriter.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeWriter.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeWriter.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/CodeWriter.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Document.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Document.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Document.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Document.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Document.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Document.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Document.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Document.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ExceptionHandler.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ExceptionHandler.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ExceptionHandler.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ExceptionHandler.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ExceptionHandler.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ExceptionHandler.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ExceptionHandler.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ExceptionHandler.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ILProcessor.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ILProcessor.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ILProcessor.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ILProcessor.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ILProcessor.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ILProcessor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ILProcessor.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/ILProcessor.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Instruction.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Instruction.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Instruction.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Instruction.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Instruction.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Instruction.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Instruction.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Instruction.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/MethodBody.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/MethodBody.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/MethodBody.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/MethodBody.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/MethodBody.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/MethodBody.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/MethodBody.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/MethodBody.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCode.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCode.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCode.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCode.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCode.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCode.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCode.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCode.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCodes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCodes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCodes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCodes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCodes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCodes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCodes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/OpCodes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/PortablePdb.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/PortablePdb.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/PortablePdb.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/PortablePdb.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/PortablePdb.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/PortablePdb.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/PortablePdb.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/PortablePdb.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/SequencePoint.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/SequencePoint.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/SequencePoint.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/SequencePoint.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/SequencePoint.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/SequencePoint.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/SequencePoint.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/SequencePoint.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Symbols.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Symbols.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Symbols.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Symbols.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Symbols.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Symbols.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Symbols.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/Symbols.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableDefinition.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableDefinition.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableDefinition.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableDefinition.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableDefinition.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableDefinition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableDefinition.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableDefinition.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableReference.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableReference.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableReference.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableReference.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableReference.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableReference.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableReference.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Cil/VariableReference.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/BlobHeap.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/BlobHeap.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/BlobHeap.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/BlobHeap.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/BlobHeap.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/BlobHeap.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/BlobHeap.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/BlobHeap.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Buffers.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Buffers.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Buffers.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Buffers.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Buffers.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Buffers.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Buffers.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Buffers.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/CodedIndex.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/CodedIndex.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/CodedIndex.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/CodedIndex.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/CodedIndex.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/CodedIndex.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/CodedIndex.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/CodedIndex.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/ElementType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/ElementType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/ElementType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/ElementType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/ElementType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/ElementType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/ElementType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/ElementType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/GuidHeap.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/GuidHeap.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/GuidHeap.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/GuidHeap.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/GuidHeap.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/GuidHeap.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/GuidHeap.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/GuidHeap.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Heap.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Heap.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Heap.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Heap.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Heap.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Heap.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Heap.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Heap.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/MetadataToken.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/MetadataToken.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/MetadataToken.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/MetadataToken.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/MetadataToken.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/MetadataToken.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/MetadataToken.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/MetadataToken.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/PdbHeap.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/PdbHeap.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/PdbHeap.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/PdbHeap.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/PdbHeap.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/PdbHeap.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/PdbHeap.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/PdbHeap.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Row.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Row.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Row.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Row.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Row.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Row.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Row.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Row.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/StringHeap.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/StringHeap.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/StringHeap.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/StringHeap.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/StringHeap.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/StringHeap.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/StringHeap.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/StringHeap.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TableHeap.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TableHeap.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TableHeap.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TableHeap.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TableHeap.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TableHeap.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TableHeap.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TableHeap.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TokenType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TokenType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TokenType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TokenType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TokenType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TokenType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TokenType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/TokenType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/UserStringHeap.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/UserStringHeap.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/UserStringHeap.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/UserStringHeap.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/UserStringHeap.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/UserStringHeap.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/UserStringHeap.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/UserStringHeap.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Utilities.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Utilities.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Utilities.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Utilities.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Utilities.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Utilities.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Utilities.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Metadata/Utilities.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamReader.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamReader.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamReader.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamReader.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamReader.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamReader.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamReader.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamReader.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamWriter.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamWriter.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamWriter.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamWriter.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamWriter.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamWriter.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamWriter.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/BinaryStreamWriter.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBuffer.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBuffer.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBuffer.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBuffer.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBuffer.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBuffer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBuffer.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBuffer.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBufferEqualityComparer.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBufferEqualityComparer.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBufferEqualityComparer.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBufferEqualityComparer.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBufferEqualityComparer.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBufferEqualityComparer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBufferEqualityComparer.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ByteBufferEqualityComparer.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/DataDirectory.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/DataDirectory.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/DataDirectory.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/DataDirectory.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/DataDirectory.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/DataDirectory.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/DataDirectory.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/DataDirectory.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Image.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Image.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Image.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Image.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Image.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Image.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Image.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Image.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageReader.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageReader.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageReader.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageReader.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageReader.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageReader.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageReader.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageReader.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageWriter.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageWriter.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageWriter.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageWriter.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageWriter.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageWriter.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageWriter.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/ImageWriter.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Section.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Section.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Section.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Section.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Section.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Section.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Section.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/Section.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/TextMap.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/TextMap.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/TextMap.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/TextMap.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/TextMap.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/TextMap.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/TextMap.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.PE/TextMap.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Tests.props b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Tests.props similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Tests.props rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Tests.props diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Tests.props.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Tests.props.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Tests.props.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.Tests.props.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nunit b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nunit similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nunit rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nunit diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nunit.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nunit.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nunit.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nunit.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nuspec b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nuspec similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nuspec rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nuspec diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nuspec.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nuspec.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nuspec.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.nuspec.meta diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scenes/CharacterControllerPrediction.unity.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.sln.meta similarity index 74% rename from Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scenes/CharacterControllerPrediction.unity.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.sln.meta index 0530583..aa8a077 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scenes/CharacterControllerPrediction.unity.meta +++ b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.sln.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ec1a6e85f57626a4cbacaf306766bdfd +guid: 246f31a0e00fea74a93125fec6d80da8 DefaultImporter: externalObjects: {} userData: diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ArrayType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ArrayType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ArrayType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ArrayType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ArrayType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ArrayType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ArrayType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ArrayType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyDefinition.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyDefinition.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyDefinition.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyDefinition.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyDefinition.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyDefinition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyDefinition.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyDefinition.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyFlags.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyFlags.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyFlags.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyFlags.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyFlags.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyFlags.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyFlags.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyFlags.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyHashAlgorithm.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyHashAlgorithm.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyHashAlgorithm.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyHashAlgorithm.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyHashAlgorithm.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyHashAlgorithm.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyHashAlgorithm.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyHashAlgorithm.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyInfo.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyInfo.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyInfo.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyInfo.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyInfo.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyInfo.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyInfo.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyInfo.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyLinkedResource.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyLinkedResource.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyLinkedResource.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyLinkedResource.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyLinkedResource.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyLinkedResource.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyLinkedResource.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyLinkedResource.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameDefinition.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameDefinition.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameDefinition.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameDefinition.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameDefinition.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameDefinition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameDefinition.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameDefinition.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameReference.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameReference.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameReference.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameReference.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameReference.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameReference.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameReference.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyNameReference.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyReader.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyReader.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyReader.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyReader.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyReader.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyReader.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyReader.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyReader.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyWriter.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyWriter.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyWriter.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyWriter.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyWriter.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyWriter.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyWriter.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/AssemblyWriter.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/BaseAssemblyResolver.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/BaseAssemblyResolver.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/BaseAssemblyResolver.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/BaseAssemblyResolver.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/BaseAssemblyResolver.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/BaseAssemblyResolver.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/BaseAssemblyResolver.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/BaseAssemblyResolver.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CallSite.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CallSite.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CallSite.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CallSite.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CallSite.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CallSite.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CallSite.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CallSite.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Consts.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Consts.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Consts.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Consts.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Consts.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Consts.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Consts.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Consts.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CustomAttribute.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CustomAttribute.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CustomAttribute.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CustomAttribute.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CustomAttribute.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CustomAttribute.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CustomAttribute.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/CustomAttribute.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/DefaultAssemblyResolver.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/DefaultAssemblyResolver.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/DefaultAssemblyResolver.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/DefaultAssemblyResolver.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/DefaultAssemblyResolver.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/DefaultAssemblyResolver.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/DefaultAssemblyResolver.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/DefaultAssemblyResolver.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EmbeddedResource.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EmbeddedResource.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EmbeddedResource.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EmbeddedResource.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EmbeddedResource.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EmbeddedResource.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EmbeddedResource.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EmbeddedResource.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventAttributes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventAttributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventAttributes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventAttributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventAttributes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventAttributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventAttributes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventAttributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventDefinition.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventDefinition.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventDefinition.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventDefinition.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventDefinition.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventDefinition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventDefinition.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventDefinition.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventReference.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventReference.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventReference.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventReference.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventReference.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventReference.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventReference.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/EventReference.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ExportedType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ExportedType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ExportedType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ExportedType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ExportedType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ExportedType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ExportedType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ExportedType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldAttributes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldAttributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldAttributes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldAttributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldAttributes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldAttributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldAttributes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldAttributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldDefinition.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldDefinition.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldDefinition.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldDefinition.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldDefinition.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldDefinition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldDefinition.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldDefinition.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldReference.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldReference.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldReference.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldReference.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldReference.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldReference.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldReference.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FieldReference.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FileAttributes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FileAttributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FileAttributes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FileAttributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FileAttributes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FileAttributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FileAttributes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FileAttributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FunctionPointerType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FunctionPointerType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FunctionPointerType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FunctionPointerType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FunctionPointerType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FunctionPointerType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FunctionPointerType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/FunctionPointerType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceMethod.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceMethod.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceMethod.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceMethod.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceMethod.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceMethod.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceMethod.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceMethod.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericInstanceType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameter.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameter.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameter.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameter.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameter.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameter.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameter.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameter.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterAttributes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterAttributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterAttributes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterAttributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterAttributes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterAttributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterAttributes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterAttributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterResolver.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterResolver.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterResolver.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterResolver.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterResolver.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterResolver.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterResolver.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/GenericParameterResolver.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IConstantProvider.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IConstantProvider.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IConstantProvider.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IConstantProvider.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IConstantProvider.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IConstantProvider.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IConstantProvider.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IConstantProvider.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ICustomAttributeProvider.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ICustomAttributeProvider.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ICustomAttributeProvider.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ICustomAttributeProvider.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ICustomAttributeProvider.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ICustomAttributeProvider.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ICustomAttributeProvider.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ICustomAttributeProvider.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericInstance.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericInstance.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericInstance.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericInstance.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericInstance.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericInstance.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericInstance.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericInstance.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericParameterProvider.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericParameterProvider.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericParameterProvider.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericParameterProvider.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericParameterProvider.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericParameterProvider.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericParameterProvider.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IGenericParameterProvider.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMarshalInfoProvider.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMarshalInfoProvider.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMarshalInfoProvider.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMarshalInfoProvider.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMarshalInfoProvider.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMarshalInfoProvider.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMarshalInfoProvider.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMarshalInfoProvider.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMemberDefinition.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMemberDefinition.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMemberDefinition.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMemberDefinition.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMemberDefinition.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMemberDefinition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMemberDefinition.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMemberDefinition.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataScope.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataScope.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataScope.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataScope.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataScope.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataScope.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataScope.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataScope.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataTokenProvider.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataTokenProvider.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataTokenProvider.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataTokenProvider.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataTokenProvider.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataTokenProvider.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataTokenProvider.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMetadataTokenProvider.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMethodSignature.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMethodSignature.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMethodSignature.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMethodSignature.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMethodSignature.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMethodSignature.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMethodSignature.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/IMethodSignature.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Import.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Import.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Import.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Import.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Import.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Import.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Import.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Import.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/LinkedResource.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/LinkedResource.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/LinkedResource.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/LinkedResource.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/LinkedResource.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/LinkedResource.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/LinkedResource.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/LinkedResource.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ManifestResourceAttributes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ManifestResourceAttributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ManifestResourceAttributes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ManifestResourceAttributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ManifestResourceAttributes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ManifestResourceAttributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ManifestResourceAttributes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ManifestResourceAttributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MarshalInfo.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MarshalInfo.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MarshalInfo.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MarshalInfo.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MarshalInfo.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MarshalInfo.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MarshalInfo.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MarshalInfo.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberDefinitionCollection.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberDefinitionCollection.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberDefinitionCollection.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberDefinitionCollection.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberDefinitionCollection.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberDefinitionCollection.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberDefinitionCollection.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberDefinitionCollection.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberReference.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberReference.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberReference.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberReference.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberReference.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberReference.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberReference.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MemberReference.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataResolver.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataResolver.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataResolver.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataResolver.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataResolver.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataResolver.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataResolver.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataResolver.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataSystem.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataSystem.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataSystem.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataSystem.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataSystem.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataSystem.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataSystem.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MetadataSystem.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodAttributes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodAttributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodAttributes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodAttributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodAttributes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodAttributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodAttributes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodAttributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodCallingConvention.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodCallingConvention.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodCallingConvention.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodCallingConvention.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodCallingConvention.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodCallingConvention.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodCallingConvention.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodCallingConvention.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodDefinition.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodDefinition.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodDefinition.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodDefinition.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodDefinition.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodDefinition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodDefinition.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodDefinition.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodImplAttributes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodImplAttributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodImplAttributes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodImplAttributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodImplAttributes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodImplAttributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodImplAttributes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodImplAttributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReference.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReference.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReference.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReference.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReference.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReference.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReference.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReference.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReferenceComparer.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReferenceComparer.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReferenceComparer.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReferenceComparer.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReferenceComparer.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReferenceComparer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReferenceComparer.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReferenceComparer.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReturnType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReturnType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReturnType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReturnType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReturnType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReturnType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReturnType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodReturnType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSemanticsAttributes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSemanticsAttributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSemanticsAttributes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSemanticsAttributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSemanticsAttributes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSemanticsAttributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSemanticsAttributes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSemanticsAttributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSpecification.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSpecification.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSpecification.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSpecification.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSpecification.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSpecification.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSpecification.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/MethodSpecification.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Modifiers.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Modifiers.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Modifiers.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Modifiers.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Modifiers.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Modifiers.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Modifiers.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Modifiers.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleDefinition.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleDefinition.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleDefinition.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleDefinition.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleDefinition.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleDefinition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleDefinition.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleDefinition.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleKind.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleKind.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleKind.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleKind.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleKind.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleKind.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleKind.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleKind.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleReference.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleReference.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleReference.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleReference.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleReference.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleReference.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleReference.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ModuleReference.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/NativeType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/NativeType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/NativeType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/NativeType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/NativeType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/NativeType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/NativeType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/NativeType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeAttributes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeAttributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeAttributes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeAttributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeAttributes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeAttributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeAttributes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeAttributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeInfo.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeInfo.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeInfo.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeInfo.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeInfo.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeInfo.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeInfo.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PInvokeInfo.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterAttributes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterAttributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterAttributes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterAttributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterAttributes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterAttributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterAttributes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterAttributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinition.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinition.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinition.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinition.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinition.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinition.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinition.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinitionCollection.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinitionCollection.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinitionCollection.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinitionCollection.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinitionCollection.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinitionCollection.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinitionCollection.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterDefinitionCollection.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterReference.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterReference.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterReference.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterReference.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterReference.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterReference.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterReference.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ParameterReference.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PinnedType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PinnedType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PinnedType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PinnedType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PinnedType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PinnedType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PinnedType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PinnedType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PointerType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PointerType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PointerType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PointerType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PointerType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PointerType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PointerType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PointerType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyAttributes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyAttributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyAttributes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyAttributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyAttributes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyAttributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyAttributes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyAttributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyDefinition.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyDefinition.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyDefinition.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyDefinition.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyDefinition.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyDefinition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyDefinition.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyDefinition.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyReference.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyReference.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyReference.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyReference.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyReference.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyReference.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyReference.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/PropertyReference.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ReferenceType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ReferenceType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ReferenceType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ReferenceType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ReferenceType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ReferenceType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ReferenceType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/ReferenceType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Resource.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Resource.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Resource.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Resource.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Resource.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Resource.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Resource.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Resource.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SecurityDeclaration.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SecurityDeclaration.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SecurityDeclaration.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SecurityDeclaration.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SecurityDeclaration.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SecurityDeclaration.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SecurityDeclaration.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SecurityDeclaration.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SentinelType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SentinelType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SentinelType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SentinelType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SentinelType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SentinelType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SentinelType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/SentinelType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TargetRuntime.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TargetRuntime.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TargetRuntime.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TargetRuntime.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TargetRuntime.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TargetRuntime.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TargetRuntime.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TargetRuntime.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Treatments.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Treatments.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Treatments.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Treatments.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Treatments.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Treatments.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Treatments.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/Treatments.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeAttributes.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeAttributes.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeAttributes.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeAttributes.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeAttributes.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeAttributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeAttributes.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeAttributes.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeComparisonMode.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeComparisonMode.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeComparisonMode.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeComparisonMode.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeComparisonMode.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeComparisonMode.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeComparisonMode.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeComparisonMode.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinition.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinition.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinition.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinition.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinition.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinition.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinition.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinitionCollection.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinitionCollection.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinitionCollection.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinitionCollection.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinitionCollection.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinitionCollection.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinitionCollection.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeDefinitionCollection.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeParser.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeParser.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeParser.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeParser.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeParser.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeParser.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeParser.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeParser.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReference.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReference.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReference.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReference.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReference.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReference.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReference.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReference.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReferenceEqualityComparer.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReferenceEqualityComparer.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReferenceEqualityComparer.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReferenceEqualityComparer.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReferenceEqualityComparer.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReferenceEqualityComparer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReferenceEqualityComparer.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeReferenceEqualityComparer.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeResolver.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeResolver.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeResolver.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeResolver.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeResolver.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeResolver.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeResolver.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeResolver.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSpecification.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSpecification.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSpecification.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSpecification.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSpecification.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSpecification.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSpecification.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSpecification.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSystem.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSystem.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSystem.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSystem.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSystem.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSystem.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSystem.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/TypeSystem.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/VariantType.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/VariantType.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/VariantType.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/VariantType.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/VariantType.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/VariantType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/VariantType.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/VariantType.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/WindowsRuntimeProjections.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/WindowsRuntimeProjections.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/WindowsRuntimeProjections.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/WindowsRuntimeProjections.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/WindowsRuntimeProjections.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/WindowsRuntimeProjections.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/WindowsRuntimeProjections.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil/WindowsRuntimeProjections.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/Collection.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/Collection.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/Collection.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/Collection.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/Collection.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/Collection.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/Collection.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/Collection.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/ReadOnlyCollection.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/ReadOnlyCollection.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/ReadOnlyCollection.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/ReadOnlyCollection.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/ReadOnlyCollection.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/ReadOnlyCollection.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/ReadOnlyCollection.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Collections.Generic/ReadOnlyCollection.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoConvert.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoConvert.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoConvert.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoConvert.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoConvert.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoConvert.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoConvert.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoConvert.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoService.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoService.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoService.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoService.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoService.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoService.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoService.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Security.Cryptography/CryptoService.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono/Disposable.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono/Disposable.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono/Disposable.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono/Disposable.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono/Disposable.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono/Disposable.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono/Disposable.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono/Disposable.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono/Empty.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono/Empty.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono/Empty.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono/Empty.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono/Empty.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono/Empty.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono/Empty.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono/Empty.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono/MergeSort.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono/MergeSort.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono/MergeSort.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono/MergeSort.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono/MergeSort.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono/MergeSort.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/Mono/MergeSort.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono/MergeSort.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/MonoFN.Cecil.asmdef b/Assets/FishNet/CodeGenerating/cecil-0.11.4/MonoFN.Cecil.asmdef similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/MonoFN.Cecil.asmdef rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/MonoFN.Cecil.asmdef diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/MonoFN.Cecil.asmdef.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/MonoFN.Cecil.asmdef.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/MonoFN.Cecil.asmdef.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/MonoFN.Cecil.asmdef.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/ProjectInfo.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/ProjectInfo.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/ProjectInfo.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/ProjectInfo.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/ProjectInfo.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/ProjectInfo.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/ProjectInfo.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/ProjectInfo.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/README.md b/Assets/FishNet/CodeGenerating/cecil-0.11.4/README.md similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/README.md rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/README.md diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/README.md.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/README.md.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/README.md.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/README.md.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/cecil.snk b/Assets/FishNet/CodeGenerating/cecil-0.11.4/cecil.snk similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/cecil.snk rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/cecil.snk diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/cecil.snk.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/cecil.snk.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/cecil.snk.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/cecil.snk.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/AssemblyInfo.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/AssemblyInfo.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/AssemblyInfo.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/AssemblyInfo.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/AssemblyInfo.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/AssemblyInfo.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/AssemblyInfo.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/AssemblyInfo.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/DocCommentId.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/DocCommentId.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/DocCommentId.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/DocCommentId.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/DocCommentId.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/DocCommentId.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/DocCommentId.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/DocCommentId.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/Functional.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/Functional.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/Functional.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/Functional.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/Functional.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/Functional.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/Functional.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/Functional.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ILParser.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ILParser.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ILParser.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ILParser.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ILParser.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ILParser.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ILParser.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ILParser.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodBodyRocks.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodBodyRocks.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodBodyRocks.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodBodyRocks.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodBodyRocks.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodBodyRocks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodBodyRocks.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodBodyRocks.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodDefinitionRocks.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodDefinitionRocks.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodDefinitionRocks.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodDefinitionRocks.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodDefinitionRocks.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodDefinitionRocks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodDefinitionRocks.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/MethodDefinitionRocks.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ModuleDefinitionRocks.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ModuleDefinitionRocks.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ModuleDefinitionRocks.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ModuleDefinitionRocks.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ModuleDefinitionRocks.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ModuleDefinitionRocks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ModuleDefinitionRocks.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ModuleDefinitionRocks.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ParameterReferenceRocks.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ParameterReferenceRocks.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ParameterReferenceRocks.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ParameterReferenceRocks.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ParameterReferenceRocks.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ParameterReferenceRocks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ParameterReferenceRocks.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/ParameterReferenceRocks.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/SecurityDeclarationRocks.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/SecurityDeclarationRocks.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/SecurityDeclarationRocks.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/SecurityDeclarationRocks.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/SecurityDeclarationRocks.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/SecurityDeclarationRocks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/SecurityDeclarationRocks.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/SecurityDeclarationRocks.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeDefinitionRocks.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeDefinitionRocks.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeDefinitionRocks.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeDefinitionRocks.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeDefinitionRocks.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeDefinitionRocks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeDefinitionRocks.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeDefinitionRocks.cs.meta diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs diff --git a/Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs.meta rename to Assets/FishNet/CodeGenerating/cecil-0.11.4/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs.meta diff --git a/Assets/Packages/FishNet/DOCUMENTATION.txt b/Assets/FishNet/DOCUMENTATION.txt similarity index 100% rename from Assets/Packages/FishNet/DOCUMENTATION.txt rename to Assets/FishNet/DOCUMENTATION.txt diff --git a/Assets/Packages/FishNet/DOCUMENTATION.txt.meta b/Assets/FishNet/DOCUMENTATION.txt.meta similarity index 100% rename from Assets/Packages/FishNet/DOCUMENTATION.txt.meta rename to Assets/FishNet/DOCUMENTATION.txt.meta diff --git a/Assets/Packages/FishNet/Demos.meta b/Assets/FishNet/Demos.meta similarity index 100% rename from Assets/Packages/FishNet/Demos.meta rename to Assets/FishNet/Demos.meta diff --git a/Assets/Packages/FishNet/Demos/Authenticator.meta b/Assets/FishNet/Demos/Authenticator.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator.meta rename to Assets/FishNet/Demos/Authenticator.meta diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Prefabs.meta b/Assets/FishNet/Demos/Authenticator/Prefabs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Prefabs.meta rename to Assets/FishNet/Demos/Authenticator/Prefabs.meta diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Prefabs/_Authenticator_Prefabs.asset b/Assets/FishNet/Demos/Authenticator/Prefabs/_Authenticator_Prefabs.asset similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Prefabs/_Authenticator_Prefabs.asset rename to Assets/FishNet/Demos/Authenticator/Prefabs/_Authenticator_Prefabs.asset diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Prefabs/_Authenticator_Prefabs.asset.meta b/Assets/FishNet/Demos/Authenticator/Prefabs/_Authenticator_Prefabs.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Prefabs/_Authenticator_Prefabs.asset.meta rename to Assets/FishNet/Demos/Authenticator/Prefabs/_Authenticator_Prefabs.asset.meta diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Scenes.meta b/Assets/FishNet/Demos/Authenticator/Scenes.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Scenes.meta rename to Assets/FishNet/Demos/Authenticator/Scenes.meta diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Scenes/Authenticator.unity b/Assets/FishNet/Demos/Authenticator/Scenes/Authenticator.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Scenes/Authenticator.unity rename to Assets/FishNet/Demos/Authenticator/Scenes/Authenticator.unity diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Scenes/Authenticator.unity.meta b/Assets/FishNet/Demos/Authenticator/Scenes/Authenticator.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Scenes/Authenticator.unity.meta rename to Assets/FishNet/Demos/Authenticator/Scenes/Authenticator.unity.meta diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Scripts.meta b/Assets/FishNet/Demos/Authenticator/Scripts.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Scripts.meta rename to Assets/FishNet/Demos/Authenticator/Scripts.meta diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Scripts/Broadcasts.cs b/Assets/FishNet/Demos/Authenticator/Scripts/Broadcasts.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Scripts/Broadcasts.cs rename to Assets/FishNet/Demos/Authenticator/Scripts/Broadcasts.cs diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Scripts/Broadcasts.cs.meta b/Assets/FishNet/Demos/Authenticator/Scripts/Broadcasts.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Scripts/Broadcasts.cs.meta rename to Assets/FishNet/Demos/Authenticator/Scripts/Broadcasts.cs.meta diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Scripts/HostAuthenticator.cs b/Assets/FishNet/Demos/Authenticator/Scripts/HostAuthenticator.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Scripts/HostAuthenticator.cs rename to Assets/FishNet/Demos/Authenticator/Scripts/HostAuthenticator.cs diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Scripts/HostAuthenticator.cs.meta b/Assets/FishNet/Demos/Authenticator/Scripts/HostAuthenticator.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Scripts/HostAuthenticator.cs.meta rename to Assets/FishNet/Demos/Authenticator/Scripts/HostAuthenticator.cs.meta diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Scripts/PasswordAuthenticator.cs b/Assets/FishNet/Demos/Authenticator/Scripts/PasswordAuthenticator.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Scripts/PasswordAuthenticator.cs rename to Assets/FishNet/Demos/Authenticator/Scripts/PasswordAuthenticator.cs diff --git a/Assets/Packages/FishNet/Demos/Authenticator/Scripts/PasswordAuthenticator.cs.meta b/Assets/FishNet/Demos/Authenticator/Scripts/PasswordAuthenticator.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Authenticator/Scripts/PasswordAuthenticator.cs.meta rename to Assets/FishNet/Demos/Authenticator/Scripts/PasswordAuthenticator.cs.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback.meta b/Assets/FishNet/Demos/ColliderRollback.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback.meta rename to Assets/FishNet/Demos/ColliderRollback.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Audio.meta b/Assets/FishNet/Demos/ColliderRollback/Audio.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Audio.meta rename to Assets/FishNet/Demos/ColliderRollback/Audio.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Audio/Glock.wav b/Assets/FishNet/Demos/ColliderRollback/Audio/Glock.wav similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Audio/Glock.wav rename to Assets/FishNet/Demos/ColliderRollback/Audio/Glock.wav diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Audio/Glock.wav.meta b/Assets/FishNet/Demos/ColliderRollback/Audio/Glock.wav.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Audio/Glock.wav.meta rename to Assets/FishNet/Demos/ColliderRollback/Audio/Glock.wav.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/ColliderRollback Demo README.txt b/Assets/FishNet/Demos/ColliderRollback/ColliderRollback Demo README.txt similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/ColliderRollback Demo README.txt rename to Assets/FishNet/Demos/ColliderRollback/ColliderRollback Demo README.txt diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/ColliderRollback Demo README.txt.meta b/Assets/FishNet/Demos/ColliderRollback/ColliderRollback Demo README.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/ColliderRollback Demo README.txt.meta rename to Assets/FishNet/Demos/ColliderRollback/ColliderRollback Demo README.txt.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials.meta b/Assets/FishNet/Demos/ColliderRollback/Materials.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials.meta rename to Assets/FishNet/Demos/ColliderRollback/Materials.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/Ground.mat b/Assets/FishNet/Demos/ColliderRollback/Materials/Ground.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/Ground.mat rename to Assets/FishNet/Demos/ColliderRollback/Materials/Ground.mat index 383a56d..4a86cd7 100644 --- a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/Ground.mat +++ b/Assets/FishNet/Demos/ColliderRollback/Materials/Ground.mat @@ -1,46 +1,24 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-5890979291171869973 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Ground - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque + stringTagMap: {} disabledShaderPasses: [] - m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -77,38 +55,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -116,20 +67,11 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 0.18867919, g: 0, b: 0.12506452, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.30265415, g: 0.31132078, b: 0.08664116, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Ground.mat.meta b/Assets/FishNet/Demos/ColliderRollback/Materials/Ground.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Ground.mat.meta rename to Assets/FishNet/Demos/ColliderRollback/Materials/Ground.mat.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Particles.meta b/Assets/FishNet/Demos/ColliderRollback/Materials/Particles.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Particles.meta rename to Assets/FishNet/Demos/ColliderRollback/Materials/Particles.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Particles/Circle Additive.mat b/Assets/FishNet/Demos/ColliderRollback/Materials/Particles/Circle Additive.mat similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Particles/Circle Additive.mat rename to Assets/FishNet/Demos/ColliderRollback/Materials/Particles/Circle Additive.mat diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Particles/Circle Additive.mat.meta b/Assets/FishNet/Demos/ColliderRollback/Materials/Particles/Circle Additive.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Particles/Circle Additive.mat.meta rename to Assets/FishNet/Demos/ColliderRollback/Materials/Particles/Circle Additive.mat.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization.meta b/Assets/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization.meta rename to Assets/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ClientPosition.mat b/Assets/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ClientPosition.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ClientPosition.mat rename to Assets/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ClientPosition.mat index 9f95a89..f357f74 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ClientPosition.mat +++ b/Assets/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ClientPosition.mat @@ -2,34 +2,24 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: ClientPosition - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SURFACE_TYPE_TRANSPARENT - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _ALPHAPREMULTIPLY_ON m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: 3000 stringTagMap: RenderType: Transparent - disabledShaderPasses: - - DepthOnly - m_LockedProperties: + disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -66,38 +56,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 1 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 10 - - _DstBlendAlpha: 10 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -105,33 +68,11 @@ Material: - _Mode: 3 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 1 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 0 m_Colors: - - _BaseColor: {r: 0, g: 1, b: 0.034508944, a: 0.49019608} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0, g: 1, b: 0.034508944, a: 0.49019608} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] ---- !u!114 &8392507279230350512 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ClientPosition.mat.meta b/Assets/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ClientPosition.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ClientPosition.mat.meta rename to Assets/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ClientPosition.mat.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ServerPosition.mat b/Assets/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ServerPosition.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ServerPosition.mat rename to Assets/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ServerPosition.mat index 1d017d0..e0e5fc3 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ServerPosition.mat +++ b/Assets/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ServerPosition.mat @@ -2,34 +2,24 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: ServerPosition - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SURFACE_TYPE_TRANSPARENT - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _ALPHAPREMULTIPLY_ON m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: 3000 stringTagMap: RenderType: Transparent - disabledShaderPasses: - - DepthOnly - m_LockedProperties: + disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -66,38 +56,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 1 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 10 - - _DstBlendAlpha: 10 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -105,33 +68,11 @@ Material: - _Mode: 3 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 1 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 0 m_Colors: - - _BaseColor: {r: 1, g: 0.058691263, b: 0, a: 0.49019608} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 0.05869128, b: 0, a: 0.49019608} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] ---- !u!114 &7502692328845936458 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ServerPosition.mat.meta b/Assets/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ServerPosition.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ServerPosition.mat.meta rename to Assets/FishNet/Demos/ColliderRollback/Materials/Rollback Visualization/ServerPosition.mat.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Target.mat b/Assets/FishNet/Demos/ColliderRollback/Materials/Target.mat similarity index 51% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Target.mat rename to Assets/FishNet/Demos/ColliderRollback/Materials/Target.mat index 8735e4d..a70f6f8 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Target.mat +++ b/Assets/FishNet/Demos/ColliderRollback/Materials/Target.mat @@ -2,32 +2,23 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Target - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque + stringTagMap: {} disabledShaderPasses: [] - m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -64,38 +55,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -103,33 +67,11 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] ---- !u!114 &7513624275565203154 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Target.mat.meta b/Assets/FishNet/Demos/ColliderRollback/Materials/Target.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Target.mat.meta rename to Assets/FishNet/Demos/ColliderRollback/Materials/Target.mat.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Wall.mat b/Assets/FishNet/Demos/ColliderRollback/Materials/Wall.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Wall.mat rename to Assets/FishNet/Demos/ColliderRollback/Materials/Wall.mat index 7e21408..4f0049f 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Wall.mat +++ b/Assets/FishNet/Demos/ColliderRollback/Materials/Wall.mat @@ -2,32 +2,23 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Wall - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque + stringTagMap: {} disabledShaderPasses: [] - m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -64,38 +55,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -103,33 +67,11 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 0.43396226, g: 0.43396226, b: 0.43396226, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.4339623, g: 0.4339623, b: 0.4339623, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] ---- !u!114 &1524482724596759643 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Wall.mat.meta b/Assets/FishNet/Demos/ColliderRollback/Materials/Wall.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Wall.mat.meta rename to Assets/FishNet/Demos/ColliderRollback/Materials/Wall.mat.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models.meta b/Assets/FishNet/Demos/ColliderRollback/Models.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models.meta rename to Assets/FishNet/Demos/ColliderRollback/Models.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons.meta b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons.meta rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Glock.obj b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Glock.obj similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Glock.obj rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Glock.obj diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Glock.obj.meta b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Glock.obj.meta similarity index 99% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Glock.obj.meta rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Glock.obj.meta index d72c278..3fe4015 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Glock.obj.meta +++ b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Glock.obj.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: c1232b0a1b78ddf44bd877453fb7a84c timeCreated: 1449962051 -licenseType: Free +licenseType: Store ModelImporter: serializedVersion: 18 fileIDToRecycleName: diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials.meta b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials.meta rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials.meta diff --git a/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray4.mat b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray4.mat new file mode 100644 index 0000000..3a7dfc2 --- /dev/null +++ b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray4.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Gray4 + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION + m_LightmapFlags: 1 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.666667, g: 0.666667, b: 0.666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray4.mat.meta b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray4.mat.meta similarity index 89% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray4.mat.meta rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray4.mat.meta index 25b5e54..67157db 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray4.mat.meta +++ b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray4.mat.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 36f616b823d57714b97b12b9319c9db9 timeCreated: 1449962048 -licenseType: Free +licenseType: Store NativeFormatImporter: userData: assetBundleName: diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray6.mat b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray6.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray6.mat rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray6.mat index a9d85d7..f665910 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray6.mat +++ b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray6.mat @@ -1,47 +1,24 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-1370977583290252920 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Gray6 - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _EMISSION - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION m_LightmapFlags: 1 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque + stringTagMap: {} disabledShaderPasses: [] - m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -78,38 +55,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -117,20 +67,11 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 0.37647098, g: 0.37647098, b: 0.37647098, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.376471, g: 0.376471, b: 0.376471, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray6.mat.meta b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray6.mat.meta similarity index 89% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray6.mat.meta rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray6.mat.meta index 348a8cb..cef991e 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray6.mat.meta +++ b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray6.mat.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 1aa329960fc39aa4490b3a9e7e965fa8 timeCreated: 1449962047 -licenseType: Free +licenseType: Store NativeFormatImporter: userData: assetBundleName: diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray8.mat b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray8.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray8.mat rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray8.mat index 3dc61ff..17d9da4 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray8.mat +++ b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray8.mat @@ -1,47 +1,24 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-4863041004189263032 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Gray8 - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _EMISSION - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION m_LightmapFlags: 1 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque + stringTagMap: {} disabledShaderPasses: [] - m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -78,38 +55,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -117,20 +67,11 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 0.26666698, g: 0.26666698, b: 0.26666698, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.266667, g: 0.266667, b: 0.266667, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray8.mat.meta b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray8.mat.meta similarity index 89% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray8.mat.meta rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray8.mat.meta index 8836f8f..316134d 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray8.mat.meta +++ b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Gray8.mat.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: e86c377702aa20748ac223d70f899dc1 timeCreated: 1449962047 -licenseType: Free +licenseType: Store NativeFormatImporter: userData: assetBundleName: diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh1_Group2_Group1_ModelMat.mat b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh1_Group2_Group1_ModelMat.mat similarity index 51% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh1_Group2_Group1_ModelMat.mat rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh1_Group2_Group1_ModelMat.mat index e20b1cc..4513902 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh1_Group2_Group1_ModelMat.mat +++ b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh1_Group2_Group1_ModelMat.mat @@ -1,46 +1,24 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-1936254406615200139 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Mesh1_Group2_Group1_ModelMat - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque + stringTagMap: {} disabledShaderPasses: [] - m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -77,38 +55,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0 - _GlossyReflections: 1 @@ -116,20 +67,11 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 0.8, g: 0.8, b: 0.8, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh1_Group2_Group1_ModelMat.mat.meta b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh1_Group2_Group1_ModelMat.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh1_Group2_Group1_ModelMat.mat.meta rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh1_Group2_Group1_ModelMat.mat.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh2_Group3_Group1_ModelMat.mat b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh2_Group3_Group1_ModelMat.mat similarity index 51% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh2_Group3_Group1_ModelMat.mat rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh2_Group3_Group1_ModelMat.mat index cf46642..de3ae88 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh2_Group3_Group1_ModelMat.mat +++ b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh2_Group3_Group1_ModelMat.mat @@ -1,46 +1,24 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-6584576307544467863 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Mesh2_Group3_Group1_ModelMat - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque + stringTagMap: {} disabledShaderPasses: [] - m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -77,38 +55,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0 - _GlossyReflections: 1 @@ -116,20 +67,11 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 0.8, g: 0.8, b: 0.8, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh2_Group3_Group1_ModelMat.mat.meta b/Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh2_Group3_Group1_ModelMat.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh2_Group3_Group1_ModelMat.mat.meta rename to Assets/FishNet/Demos/ColliderRollback/Models/Weapons/Materials/Mesh2_Group3_Group1_ModelMat.mat.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs.meta b/Assets/FishNet/Demos/ColliderRollback/Prefabs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs.meta rename to Assets/FishNet/Demos/ColliderRollback/Prefabs.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Particles.meta b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Particles.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Particles.meta rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/Particles.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Particles/Pistol Muzzle Flash.prefab b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Particles/Pistol Muzzle Flash.prefab similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Particles/Pistol Muzzle Flash.prefab rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/Particles/Pistol Muzzle Flash.prefab diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Particles/Pistol Muzzle Flash.prefab.meta b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Particles/Pistol Muzzle Flash.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Particles/Pistol Muzzle Flash.prefab.meta rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/Particles/Pistol Muzzle Flash.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Player.prefab b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Player.prefab similarity index 82% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Player.prefab rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/Player.prefab index cc9eacd..3c59936 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Player.prefab +++ b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Player.prefab @@ -28,13 +28,12 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4117607941181585914} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 2, z: -2} m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &8475222101369129519 MonoBehaviour: @@ -48,30 +47,50 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} m_Name: m_EditorClassIdentifier: + NetworkObserver: {fileID: 0} + k__BackingField: 27 + k__BackingField: 0 + _scenePathHash: 0 + k__BackingField: 0 + k__BackingField: 7473726319608011331 + AdaptiveInterpolationValue: 4 k__BackingField: 0 + _enablePrediction: 0 + _predictionType: 0 + _graphicalObject: {fileID: 0} + _enableStateForwarding: 1 + _ownerInterpolation: 1 + _enableTeleport: 0 + _ownerTeleportThreshold: 1 + _spectatorAdaptiveInterpolation: 1 + _spectatorInterpolation: 1 + _adaptiveSmoothingType: 0 + _customSmoothingData: + InterpolationPercent: 1 + CollisionInterpolationPercent: 0.1 + InterpolationDecreaseStep: 1 + InterpolationIncreaseStep: 3 + _preconfiguredSmoothingDataPreview: + InterpolationPercent: 0.5 + CollisionInterpolationPercent: 0.05 + InterpolationDecreaseStep: 1 + InterpolationIncreaseStep: 2 k__BackingField: 0 k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 2759061792589502182} - {fileID: 1348621277} - {fileID: 1348621278} - k__BackingField: {fileID: 0} - k__BackingField: [] + k__BackingField: {fileID: 0} + k__BackingField: [] SerializedTransformProperties: Position: {x: 0, y: 0, z: 0} Rotation: {x: 0, y: 0, z: 0, w: 0} LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 - _isSpawnable: 1 _isGlobal: 0 _initializeOrder: 0 _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - k__BackingField: 6 - k__BackingField: 0 - _scenePathHash: 0 - k__BackingField: 0 - k__BackingField: 256465721208885579 --- !u!114 &2759061792589502182 MonoBehaviour: m_ObjectHideFlags: 0 @@ -91,7 +110,8 @@ MonoBehaviour: serializedVersion: 2 m_Bits: 32 _audio: {fileID: 8300000, guid: 0330762d2b3c8d641bfe11ad89b7e196, type: 3} - _muzzleFlashPrefab: {fileID: 39148481766341303, guid: 4385a793e032d634bb912f84a23d6db1, type: 3} + _muzzleFlashPrefab: {fileID: 39148481766341303, guid: 4385a793e032d634bb912f84a23d6db1, + type: 3} --- !u!114 &1348621277 MonoBehaviour: m_ObjectHideFlags: 0 @@ -131,17 +151,9 @@ CharacterController: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4117607941181585914} m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 m_IsTrigger: 0 - m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 2 m_Height: 1.85 m_Radius: 0.5 m_SlopeLimit: 45 diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Player.prefab.meta b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Player.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Player.prefab.meta rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/Player.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization.meta b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization.meta rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ClientPosition.prefab b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ClientPosition.prefab similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ClientPosition.prefab rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ClientPosition.prefab diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ClientPosition.prefab.meta b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ClientPosition.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ClientPosition.prefab.meta rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ClientPosition.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ServerPosition.prefab b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ServerPosition.prefab similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ServerPosition.prefab rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ServerPosition.prefab diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ServerPosition.prefab.meta b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ServerPosition.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ServerPosition.prefab.meta rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/ServerPosition.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/TextCanvas.prefab b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/TextCanvas.prefab similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/TextCanvas.prefab rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/TextCanvas.prefab diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/TextCanvas.prefab.meta b/Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/TextCanvas.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/TextCanvas.prefab.meta rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/Rollback Visualization/TextCanvas.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/_ColliderRollback_Prefabs.asset b/Assets/FishNet/Demos/ColliderRollback/Prefabs/_ColliderRollback_Prefabs.asset similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/_ColliderRollback_Prefabs.asset rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/_ColliderRollback_Prefabs.asset diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/_ColliderRollback_Prefabs.asset.meta b/Assets/FishNet/Demos/ColliderRollback/Prefabs/_ColliderRollback_Prefabs.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Prefabs/_ColliderRollback_Prefabs.asset.meta rename to Assets/FishNet/Demos/ColliderRollback/Prefabs/_ColliderRollback_Prefabs.asset.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scenes.meta b/Assets/FishNet/Demos/ColliderRollback/Scenes.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scenes.meta rename to Assets/FishNet/Demos/ColliderRollback/Scenes.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scenes/ColliderRollbackDemo.unity b/Assets/FishNet/Demos/ColliderRollback/Scenes/ColliderRollbackDemo.unity similarity index 99% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scenes/ColliderRollbackDemo.unity rename to Assets/FishNet/Demos/ColliderRollback/Scenes/ColliderRollbackDemo.unity index 5db26c4..4ef26be 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Scenes/ColliderRollbackDemo.unity +++ b/Assets/FishNet/Demos/ColliderRollback/Scenes/ColliderRollbackDemo.unity @@ -309,6 +309,7 @@ MonoBehaviour: _predictionType: 0 _graphicalObject: {fileID: 0} _enableStateForwarding: 1 + _networkTransform: {fileID: 0} _ownerInterpolation: 1 _enableTeleport: 0 _teleportThreshold: 1 @@ -833,6 +834,7 @@ MonoBehaviour: _predictionType: 0 _graphicalObject: {fileID: 0} _enableStateForwarding: 1 + _networkTransform: {fileID: 0} _ownerInterpolation: 1 _enableTeleport: 0 _teleportThreshold: 1 @@ -1817,6 +1819,7 @@ Canvas: m_OverrideSorting: 0 m_OverridePixelPerfect: 0 m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 m_AdditionalShaderChannelsFlag: 0 m_SortingLayerID: 0 m_SortingOrder: 0 @@ -2099,13 +2102,14 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 6f48f002b825cbd45a19bd96d90f9edb, type: 3} m_Name: m_EditorClassIdentifier: - _unreliableMTU: 1023 + _dontRoute: 0 + _unreliableMtu: 1023 _ipv4BindAddress: + _enableIpv6: 1 _ipv6BindAddress: _port: 7770 _maximumClients: 4095 _clientAddress: localhost - _timeout: 15 --- !u!114 &1016939666208092867 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2699,6 +2703,7 @@ Canvas: m_OverrideSorting: 0 m_OverridePixelPerfect: 0 m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 m_AdditionalShaderChannelsFlag: 0 m_SortingLayerID: 0 m_SortingOrder: 0 @@ -2797,7 +2802,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 6d3606bfdac5a4743890fc1a5ecd8f24, type: 3} m_Name: m_EditorClassIdentifier: - _autoStartType: 0 + _autoStartType: 2 _stoppedColor: {r: 0.25490198, g: 0.25490198, b: 0.25490198, a: 1} _changingColor: {r: 0.78431374, g: 0.6862745, b: 0, a: 1} _startedColor: {r: 0, g: 0.5882353, b: 0.64705884, a: 1} diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scenes/ColliderRollbackDemo.unity.meta b/Assets/FishNet/Demos/ColliderRollback/Scenes/ColliderRollbackDemo.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scenes/ColliderRollbackDemo.unity.meta rename to Assets/FishNet/Demos/ColliderRollback/Scenes/ColliderRollbackDemo.unity.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts.meta b/Assets/FishNet/Demos/ColliderRollback/Scripts.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts.meta rename to Assets/FishNet/Demos/ColliderRollback/Scripts.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/DestroyAfterDelay.cs b/Assets/FishNet/Demos/ColliderRollback/Scripts/DestroyAfterDelay.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/DestroyAfterDelay.cs rename to Assets/FishNet/Demos/ColliderRollback/Scripts/DestroyAfterDelay.cs diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/DestroyAfterDelay.cs.meta b/Assets/FishNet/Demos/ColliderRollback/Scripts/DestroyAfterDelay.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/DestroyAfterDelay.cs.meta rename to Assets/FishNet/Demos/ColliderRollback/Scripts/DestroyAfterDelay.cs.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player.meta b/Assets/FishNet/Demos/ColliderRollback/Scripts/Player.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player.meta rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Player.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/Aim.cs b/Assets/FishNet/Demos/ColliderRollback/Scripts/Player/Aim.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/Aim.cs rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Player/Aim.cs diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/Aim.cs.meta b/Assets/FishNet/Demos/ColliderRollback/Scripts/Player/Aim.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/Aim.cs.meta rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Player/Aim.cs.meta diff --git a/Assets/FishNet/Demos/ColliderRollback/Scripts/Player/Fire.cs b/Assets/FishNet/Demos/ColliderRollback/Scripts/Player/Fire.cs new file mode 100644 index 0000000..6fcb21e --- /dev/null +++ b/Assets/FishNet/Demos/ColliderRollback/Scripts/Player/Fire.cs @@ -0,0 +1,22 @@ +using FishNet.Component.ColliderRollback; +using FishNet.Managing.Timing; +using FishNet.Object; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + + +namespace FishNet.Example.ColliderRollbacks +{ + + /// + /// DEMO. CODE IS NOT OPTIMIZED. + /// Fires at objects. + /// + public class Fire : NetworkBehaviour + { + + + } +} + diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/Fire.cs.meta b/Assets/FishNet/Demos/ColliderRollback/Scripts/Player/Fire.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/Fire.cs.meta rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Player/Fire.cs.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerCamera.cs b/Assets/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerCamera.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerCamera.cs rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerCamera.cs diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerCamera.cs.meta b/Assets/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerCamera.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerCamera.cs.meta rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerCamera.cs.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerMotor.cs b/Assets/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerMotor.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerMotor.cs rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerMotor.cs diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerMotor.cs.meta b/Assets/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerMotor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerMotor.cs.meta rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Player/PlayerMotor.cs.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization.meta b/Assets/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization.meta rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/RollbackVisualizer.cs b/Assets/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/RollbackVisualizer.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/RollbackVisualizer.cs rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/RollbackVisualizer.cs diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/RollbackVisualizer.cs.meta b/Assets/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/RollbackVisualizer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/RollbackVisualizer.cs.meta rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/RollbackVisualizer.cs.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/TextCanvas.cs b/Assets/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/TextCanvas.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/TextCanvas.cs rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/TextCanvas.cs diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/TextCanvas.cs.meta b/Assets/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/TextCanvas.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/TextCanvas.cs.meta rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Rollback Visualization/TextCanvas.cs.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Strafe.cs b/Assets/FishNet/Demos/ColliderRollback/Scripts/Strafe.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Strafe.cs rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Strafe.cs diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Strafe.cs.meta b/Assets/FishNet/Demos/ColliderRollback/Scripts/Strafe.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Strafe.cs.meta rename to Assets/FishNet/Demos/ColliderRollback/Scripts/Strafe.cs.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Textures.meta b/Assets/FishNet/Demos/ColliderRollback/Textures.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Textures.meta rename to Assets/FishNet/Demos/ColliderRollback/Textures.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Textures/Crosshair.png b/Assets/FishNet/Demos/ColliderRollback/Textures/Crosshair.png similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Textures/Crosshair.png rename to Assets/FishNet/Demos/ColliderRollback/Textures/Crosshair.png diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Textures/Crosshair.png.meta b/Assets/FishNet/Demos/ColliderRollback/Textures/Crosshair.png.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Textures/Crosshair.png.meta rename to Assets/FishNet/Demos/ColliderRollback/Textures/Crosshair.png.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Textures/Particles.meta b/Assets/FishNet/Demos/ColliderRollback/Textures/Particles.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Textures/Particles.meta rename to Assets/FishNet/Demos/ColliderRollback/Textures/Particles.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Textures/Particles/circle.png b/Assets/FishNet/Demos/ColliderRollback/Textures/Particles/circle.png similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Textures/Particles/circle.png rename to Assets/FishNet/Demos/ColliderRollback/Textures/Particles/circle.png diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Textures/Particles/circle.png.meta b/Assets/FishNet/Demos/ColliderRollback/Textures/Particles/circle.png.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Textures/Particles/circle.png.meta rename to Assets/FishNet/Demos/ColliderRollback/Textures/Particles/circle.png.meta diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType.meta b/Assets/FishNet/Demos/CustomSyncType.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/CustomSyncType.meta rename to Assets/FishNet/Demos/CustomSyncType.meta diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync.meta b/Assets/FishNet/Demos/CustomSyncType/Component State Sync.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync.meta rename to Assets/FishNet/Demos/CustomSyncType/Component State Sync.meta diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync/AMonoScript.cs b/Assets/FishNet/Demos/CustomSyncType/Component State Sync/AMonoScript.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync/AMonoScript.cs rename to Assets/FishNet/Demos/CustomSyncType/Component State Sync/AMonoScript.cs diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync/AMonoScript.cs.meta b/Assets/FishNet/Demos/CustomSyncType/Component State Sync/AMonoScript.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync/AMonoScript.cs.meta rename to Assets/FishNet/Demos/CustomSyncType/Component State Sync/AMonoScript.cs.meta diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync/ComponentStateSync.cs b/Assets/FishNet/Demos/CustomSyncType/Component State Sync/ComponentStateSync.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync/ComponentStateSync.cs rename to Assets/FishNet/Demos/CustomSyncType/Component State Sync/ComponentStateSync.cs diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync/ComponentStateSync.cs.meta b/Assets/FishNet/Demos/CustomSyncType/Component State Sync/ComponentStateSync.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync/ComponentStateSync.cs.meta rename to Assets/FishNet/Demos/CustomSyncType/Component State Sync/ComponentStateSync.cs.meta diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync/ComponentSyncStateBehaviour.cs b/Assets/FishNet/Demos/CustomSyncType/Component State Sync/ComponentSyncStateBehaviour.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync/ComponentSyncStateBehaviour.cs rename to Assets/FishNet/Demos/CustomSyncType/Component State Sync/ComponentSyncStateBehaviour.cs diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync/ComponentSyncStateBehaviour.cs.meta b/Assets/FishNet/Demos/CustomSyncType/Component State Sync/ComponentSyncStateBehaviour.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/CustomSyncType/Component State Sync/ComponentSyncStateBehaviour.cs.meta rename to Assets/FishNet/Demos/CustomSyncType/Component State Sync/ComponentSyncStateBehaviour.cs.meta diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType/Custom Struct Sync.meta b/Assets/FishNet/Demos/CustomSyncType/Custom Struct Sync.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/CustomSyncType/Custom Struct Sync.meta rename to Assets/FishNet/Demos/CustomSyncType/Custom Struct Sync.meta diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructSyncBehaviour.cs b/Assets/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructSyncBehaviour.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructSyncBehaviour.cs rename to Assets/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructSyncBehaviour.cs diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructSyncBehaviour.cs.meta b/Assets/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructSyncBehaviour.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructSyncBehaviour.cs.meta rename to Assets/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructSyncBehaviour.cs.meta diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructySync.cs b/Assets/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructySync.cs similarity index 98% rename from Assets/Packages/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructySync.cs rename to Assets/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructySync.cs index f22571f..0701021 100644 --- a/Assets/Packages/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructySync.cs +++ b/Assets/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructySync.cs @@ -240,9 +240,9 @@ public void ValuesChanged() /// /// Resets to initialized values. /// - internal protected override void ResetState() + internal protected override void ResetState(bool asServer) { - base.ResetState(); + base.ResetState(asServer); _changed.Clear(); Value = _initialValue; _valuesChanged = false; diff --git a/Assets/Packages/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructySync.cs.meta b/Assets/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructySync.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructySync.cs.meta rename to Assets/FishNet/Demos/CustomSyncType/Custom Struct Sync/StructySync.cs.meta diff --git a/Assets/Packages/FishNet/Demos/FishNet.Demos.asmdef b/Assets/FishNet/Demos/FishNet.Demos.asmdef similarity index 100% rename from Assets/Packages/FishNet/Demos/FishNet.Demos.asmdef rename to Assets/FishNet/Demos/FishNet.Demos.asmdef diff --git a/Assets/Packages/FishNet/Demos/FishNet.Demos.asmdef.meta b/Assets/FishNet/Demos/FishNet.Demos.asmdef.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/FishNet.Demos.asmdef.meta rename to Assets/FishNet/Demos/FishNet.Demos.asmdef.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid.meta b/Assets/FishNet/Demos/HashGrid.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid.meta rename to Assets/FishNet/Demos/HashGrid.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid/HashGrid Demo README.txt b/Assets/FishNet/Demos/HashGrid/HashGrid Demo README.txt similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/HashGrid Demo README.txt rename to Assets/FishNet/Demos/HashGrid/HashGrid Demo README.txt diff --git a/Assets/Packages/FishNet/Demos/HashGrid/HashGrid Demo README.txt.meta b/Assets/FishNet/Demos/HashGrid/HashGrid Demo README.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/HashGrid Demo README.txt.meta rename to Assets/FishNet/Demos/HashGrid/HashGrid Demo README.txt.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Prefabs.meta b/Assets/FishNet/Demos/HashGrid/Prefabs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Prefabs.meta rename to Assets/FishNet/Demos/HashGrid/Prefabs.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Prefabs/HashGrid_Moving.prefab b/Assets/FishNet/Demos/HashGrid/Prefabs/HashGrid_Moving.prefab similarity index 97% rename from Assets/Packages/FishNet/Demos/HashGrid/Prefabs/HashGrid_Moving.prefab rename to Assets/FishNet/Demos/HashGrid/Prefabs/HashGrid_Moving.prefab index a4cd0c2..78b57b7 100644 --- a/Assets/Packages/FishNet/Demos/HashGrid/Prefabs/HashGrid_Moving.prefab +++ b/Assets/FishNet/Demos/HashGrid/Prefabs/HashGrid_Moving.prefab @@ -24,13 +24,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2758258074630985} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 4512293259955182957} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!212 &2529588038898116402 SpriteRenderer: @@ -110,7 +110,6 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4512293259955182959} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 3, y: 3, z: 3} @@ -118,6 +117,7 @@ Transform: m_Children: - {fileID: 2058948186138587895} m_Father: {fileID: 0} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &4512293259955182956 MonoBehaviour: @@ -149,11 +149,11 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 8 + k__BackingField: 0 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 - k__BackingField: 17049880792904200461 + k__BackingField: 11406911356865610645 --- !u!114 &4670340455971777434 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Prefabs/HashGrid_Moving.prefab.meta b/Assets/FishNet/Demos/HashGrid/Prefabs/HashGrid_Moving.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Prefabs/HashGrid_Moving.prefab.meta rename to Assets/FishNet/Demos/HashGrid/Prefabs/HashGrid_Moving.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Prefabs/HashGrid_Static.prefab b/Assets/FishNet/Demos/HashGrid/Prefabs/HashGrid_Static.prefab similarity index 83% rename from Assets/Packages/FishNet/Demos/HashGrid/Prefabs/HashGrid_Static.prefab rename to Assets/FishNet/Demos/HashGrid/Prefabs/HashGrid_Static.prefab index d002284..1d0ae5d 100644 --- a/Assets/Packages/FishNet/Demos/HashGrid/Prefabs/HashGrid_Static.prefab +++ b/Assets/FishNet/Demos/HashGrid/Prefabs/HashGrid_Static.prefab @@ -24,13 +24,12 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2758258074630985} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 4512293259955182957} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!212 &2529588038898116402 SpriteRenderer: @@ -43,12 +42,10 @@ SpriteRenderer: m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 0 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -108,14 +105,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4512293259955182959} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2058948186138587895} m_Father: {fileID: 0} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &4512293259955182956 MonoBehaviour: @@ -129,24 +125,43 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} m_Name: m_EditorClassIdentifier: + NetworkObserver: {fileID: 0} + k__BackingField: 0 + k__BackingField: 0 + _scenePathHash: 0 + k__BackingField: 0 + k__BackingField: 17472515426990886281 + _sceneNetworkObjects: [] k__BackingField: 0 + _enablePrediction: 0 + _graphicalObject: {fileID: 0} + _enableStateForwarding: 1 + _ownerInterpolation: 1 + _enableTeleport: 0 + _ownerTeleportThreshold: 1 + _spectatorAdaptiveInterpolation: 0 + _spectatorInterpolation: 1 + _adaptiveSmoothingType: 0 + _customSmoothingData: + InterpolationPercent: 1 + CollisionInterpolationPercent: 0.1 + InterpolationDecreaseStep: 1 + InterpolationIncreaseStep: 3 + _preconfiguredSmoothingDataPreview: + InterpolationPercent: 0.5 + CollisionInterpolationPercent: 0.05 + InterpolationDecreaseStep: 1 + InterpolationIncreaseStep: 2 k__BackingField: 0 k__BackingField: {fileID: 0} _networkBehaviours: [] - k__BackingField: {fileID: 0} - k__BackingField: [] + k__BackingField: {fileID: 0} + k__BackingField: [] SerializedTransformProperties: Position: {x: 0, y: 0, z: 0} Rotation: {x: 0, y: 0, z: 0, w: 0} LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 - _isSpawnable: 1 _isGlobal: 0 _initializeOrder: 0 _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - k__BackingField: 16 - k__BackingField: 0 - _scenePathHash: 0 - k__BackingField: 0 - k__BackingField: 14946057457913350049 diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Prefabs/HashGrid_Static.prefab.meta b/Assets/FishNet/Demos/HashGrid/Prefabs/HashGrid_Static.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Prefabs/HashGrid_Static.prefab.meta rename to Assets/FishNet/Demos/HashGrid/Prefabs/HashGrid_Static.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Prefabs/_HashGrid_Prefabs.asset b/Assets/FishNet/Demos/HashGrid/Prefabs/_HashGrid_Prefabs.asset similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Prefabs/_HashGrid_Prefabs.asset rename to Assets/FishNet/Demos/HashGrid/Prefabs/_HashGrid_Prefabs.asset diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Prefabs/_HashGrid_Prefabs.asset.meta b/Assets/FishNet/Demos/HashGrid/Prefabs/_HashGrid_Prefabs.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Prefabs/_HashGrid_Prefabs.asset.meta rename to Assets/FishNet/Demos/HashGrid/Prefabs/_HashGrid_Prefabs.asset.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Scenes.meta b/Assets/FishNet/Demos/HashGrid/Scenes.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Scenes.meta rename to Assets/FishNet/Demos/HashGrid/Scenes.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Scenes/HashGrid_Demo.unity b/Assets/FishNet/Demos/HashGrid/Scenes/HashGrid_Demo.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Scenes/HashGrid_Demo.unity rename to Assets/FishNet/Demos/HashGrid/Scenes/HashGrid_Demo.unity diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Scenes/HashGrid_Demo.unity.meta b/Assets/FishNet/Demos/HashGrid/Scenes/HashGrid_Demo.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Scenes/HashGrid_Demo.unity.meta rename to Assets/FishNet/Demos/HashGrid/Scenes/HashGrid_Demo.unity.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Scripts.meta b/Assets/FishNet/Demos/HashGrid/Scripts.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Scripts.meta rename to Assets/FishNet/Demos/HashGrid/Scripts.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Scripts/GridSpawner.cs b/Assets/FishNet/Demos/HashGrid/Scripts/GridSpawner.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Scripts/GridSpawner.cs rename to Assets/FishNet/Demos/HashGrid/Scripts/GridSpawner.cs diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Scripts/GridSpawner.cs.meta b/Assets/FishNet/Demos/HashGrid/Scripts/GridSpawner.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Scripts/GridSpawner.cs.meta rename to Assets/FishNet/Demos/HashGrid/Scripts/GridSpawner.cs.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Scripts/MoveRandomly.cs b/Assets/FishNet/Demos/HashGrid/Scripts/MoveRandomly.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Scripts/MoveRandomly.cs rename to Assets/FishNet/Demos/HashGrid/Scripts/MoveRandomly.cs diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Scripts/MoveRandomly.cs.meta b/Assets/FishNet/Demos/HashGrid/Scripts/MoveRandomly.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Scripts/MoveRandomly.cs.meta rename to Assets/FishNet/Demos/HashGrid/Scripts/MoveRandomly.cs.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Textures.meta b/Assets/FishNet/Demos/HashGrid/Textures.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Textures.meta rename to Assets/FishNet/Demos/HashGrid/Textures.meta diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Textures/1x1 Pixel.png b/Assets/FishNet/Demos/HashGrid/Textures/1x1 Pixel.png similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Textures/1x1 Pixel.png rename to Assets/FishNet/Demos/HashGrid/Textures/1x1 Pixel.png diff --git a/Assets/Packages/FishNet/Demos/HashGrid/Textures/1x1 Pixel.png.meta b/Assets/FishNet/Demos/HashGrid/Textures/1x1 Pixel.png.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/HashGrid/Textures/1x1 Pixel.png.meta rename to Assets/FishNet/Demos/HashGrid/Textures/1x1 Pixel.png.meta diff --git a/Assets/Packages/FishNet/Demos/IntermediateLayer.meta b/Assets/FishNet/Demos/IntermediateLayer.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/IntermediateLayer.meta rename to Assets/FishNet/Demos/IntermediateLayer.meta diff --git a/Assets/Packages/FishNet/Demos/IntermediateLayer/Prefabs.meta b/Assets/FishNet/Demos/IntermediateLayer/Prefabs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/IntermediateLayer/Prefabs.meta rename to Assets/FishNet/Demos/IntermediateLayer/Prefabs.meta diff --git a/Assets/Packages/FishNet/Demos/IntermediateLayer/Prefabs/_IntermediateLayer_Prefabs.asset b/Assets/FishNet/Demos/IntermediateLayer/Prefabs/_IntermediateLayer_Prefabs.asset similarity index 100% rename from Assets/Packages/FishNet/Demos/IntermediateLayer/Prefabs/_IntermediateLayer_Prefabs.asset rename to Assets/FishNet/Demos/IntermediateLayer/Prefabs/_IntermediateLayer_Prefabs.asset diff --git a/Assets/Packages/FishNet/Demos/IntermediateLayer/Prefabs/_IntermediateLayer_Prefabs.asset.meta b/Assets/FishNet/Demos/IntermediateLayer/Prefabs/_IntermediateLayer_Prefabs.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/IntermediateLayer/Prefabs/_IntermediateLayer_Prefabs.asset.meta rename to Assets/FishNet/Demos/IntermediateLayer/Prefabs/_IntermediateLayer_Prefabs.asset.meta diff --git a/Assets/Packages/FishNet/Demos/IntermediateLayer/Scenes.meta b/Assets/FishNet/Demos/IntermediateLayer/Scenes.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/IntermediateLayer/Scenes.meta rename to Assets/FishNet/Demos/IntermediateLayer/Scenes.meta diff --git a/Assets/Packages/FishNet/Demos/IntermediateLayer/Scenes/IntermediateLayer.unity b/Assets/FishNet/Demos/IntermediateLayer/Scenes/IntermediateLayer.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/IntermediateLayer/Scenes/IntermediateLayer.unity rename to Assets/FishNet/Demos/IntermediateLayer/Scenes/IntermediateLayer.unity diff --git a/Assets/Packages/FishNet/Demos/IntermediateLayer/Scenes/IntermediateLayer.unity.meta b/Assets/FishNet/Demos/IntermediateLayer/Scenes/IntermediateLayer.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/IntermediateLayer/Scenes/IntermediateLayer.unity.meta rename to Assets/FishNet/Demos/IntermediateLayer/Scenes/IntermediateLayer.unity.meta diff --git a/Assets/Packages/FishNet/Demos/IntermediateLayer/Scripts.meta b/Assets/FishNet/Demos/IntermediateLayer/Scripts.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/IntermediateLayer/Scripts.meta rename to Assets/FishNet/Demos/IntermediateLayer/Scripts.meta diff --git a/Assets/Packages/FishNet/Demos/IntermediateLayer/Scripts/IntermediateLayerCipher.cs b/Assets/FishNet/Demos/IntermediateLayer/Scripts/IntermediateLayerCipher.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/IntermediateLayer/Scripts/IntermediateLayerCipher.cs rename to Assets/FishNet/Demos/IntermediateLayer/Scripts/IntermediateLayerCipher.cs diff --git a/Assets/Packages/FishNet/Demos/IntermediateLayer/Scripts/IntermediateLayerCipher.cs.meta b/Assets/FishNet/Demos/IntermediateLayer/Scripts/IntermediateLayerCipher.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/IntermediateLayer/Scripts/IntermediateLayerCipher.cs.meta rename to Assets/FishNet/Demos/IntermediateLayer/Scripts/IntermediateLayerCipher.cs.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD.meta b/Assets/FishNet/Demos/Network LOD.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD.meta rename to Assets/FishNet/Demos/Network LOD.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Materials.meta b/Assets/FishNet/Demos/Network LOD/Materials.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Materials.meta rename to Assets/FishNet/Demos/Network LOD/Materials.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/Player.mat b/Assets/FishNet/Demos/Network LOD/Materials/Player.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/Player.mat rename to Assets/FishNet/Demos/Network LOD/Materials/Player.mat index 9bceaf2..3f4e43e 100644 --- a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/Player.mat +++ b/Assets/FishNet/Demos/Network LOD/Materials/Player.mat @@ -1,46 +1,24 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-7500693597858902664 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Player - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque + stringTagMap: {} disabledShaderPasses: [] - m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -77,38 +55,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -116,20 +67,11 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 0.6132076, g: 0.5462585, b: 0.3210662, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.44982982, g: 0.8207547, b: 0.2748754, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Materials/Player.mat.meta b/Assets/FishNet/Demos/Network LOD/Materials/Player.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Materials/Player.mat.meta rename to Assets/FishNet/Demos/Network LOD/Materials/Player.mat.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Network LOD Demo README.txt b/Assets/FishNet/Demos/Network LOD/Network LOD Demo README.txt similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Network LOD Demo README.txt rename to Assets/FishNet/Demos/Network LOD/Network LOD Demo README.txt diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Network LOD Demo README.txt.meta b/Assets/FishNet/Demos/Network LOD/Network LOD Demo README.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Network LOD Demo README.txt.meta rename to Assets/FishNet/Demos/Network LOD/Network LOD Demo README.txt.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Prefabs.meta b/Assets/FishNet/Demos/Network LOD/Prefabs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Prefabs.meta rename to Assets/FishNet/Demos/Network LOD/Prefabs.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Prefabs/LODObjectPrefab.prefab b/Assets/FishNet/Demos/Network LOD/Prefabs/LODObjectPrefab.prefab similarity index 93% rename from Assets/Packages/FishNet/Demos/Network LOD/Prefabs/LODObjectPrefab.prefab rename to Assets/FishNet/Demos/Network LOD/Prefabs/LODObjectPrefab.prefab index b2216a7..ee7ec2f 100644 --- a/Assets/Packages/FishNet/Demos/Network LOD/Prefabs/LODObjectPrefab.prefab +++ b/Assets/FishNet/Demos/Network LOD/Prefabs/LODObjectPrefab.prefab @@ -26,14 +26,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4512293259955182959} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2745247498903379289} m_Father: {fileID: 0} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &4512293259955182956 MonoBehaviour: @@ -47,29 +46,28 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} m_Name: m_EditorClassIdentifier: + NetworkObserver: {fileID: 0} + k__BackingField: 26 + k__BackingField: 0 + _scenePathHash: 0 + k__BackingField: 0 + k__BackingField: 1985539020153172578 k__BackingField: 0 k__BackingField: 0 k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 6667641716399555817} - {fileID: -5271135124957689192} - k__BackingField: {fileID: 0} - k__BackingField: [] + k__BackingField: {fileID: 0} + k__BackingField: [] SerializedTransformProperties: Position: {x: 0, y: 0, z: 0} Rotation: {x: 0, y: 0, z: 0, w: 1} LocalScale: {x: 1, y: 1, z: 1} _isNetworked: 1 - _isSpawnable: 1 _isGlobal: 0 _initializeOrder: 0 _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - k__BackingField: 2 - k__BackingField: 0 - _scenePathHash: 0 - k__BackingField: 0 - k__BackingField: 7266257397584068202 --- !u!114 &6667641716399555817 MonoBehaviour: m_ObjectHideFlags: 0 @@ -157,13 +155,12 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5839577311109879042} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 4512293259955182957} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!33 &3127415364279584095 MeshFilter: @@ -184,12 +181,10 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -214,4 +209,3 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Prefabs/LODObjectPrefab.prefab.meta b/Assets/FishNet/Demos/Network LOD/Prefabs/LODObjectPrefab.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Prefabs/LODObjectPrefab.prefab.meta rename to Assets/FishNet/Demos/Network LOD/Prefabs/LODObjectPrefab.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Prefabs/PlayerPrefab.prefab b/Assets/FishNet/Demos/Network LOD/Prefabs/PlayerPrefab.prefab similarity index 93% rename from Assets/Packages/FishNet/Demos/Network LOD/Prefabs/PlayerPrefab.prefab rename to Assets/FishNet/Demos/Network LOD/Prefabs/PlayerPrefab.prefab index 04595eb..cfb950b 100644 --- a/Assets/Packages/FishNet/Demos/Network LOD/Prefabs/PlayerPrefab.prefab +++ b/Assets/FishNet/Demos/Network LOD/Prefabs/PlayerPrefab.prefab @@ -26,14 +26,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4512293259955182959} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2745247498903379289} m_Father: {fileID: 0} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &4512293259955182956 MonoBehaviour: @@ -47,29 +46,28 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} m_Name: m_EditorClassIdentifier: + NetworkObserver: {fileID: 0} + k__BackingField: 6 + k__BackingField: 0 + _scenePathHash: 2359702710 + k__BackingField: 0 + k__BackingField: 7585316040777855176 k__BackingField: 0 k__BackingField: 0 k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 6667641716399555817} - {fileID: -5271135124957689192} - k__BackingField: {fileID: 0} - k__BackingField: [] + k__BackingField: {fileID: 0} + k__BackingField: [] SerializedTransformProperties: Position: {x: 0, y: 0, z: 0} Rotation: {x: 0, y: 0, z: 0, w: 1} LocalScale: {x: 1, y: 1, z: 1} _isNetworked: 1 - _isSpawnable: 1 _isGlobal: 0 _initializeOrder: 0 _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - k__BackingField: 7 - k__BackingField: 0 - _scenePathHash: 2359702710 - k__BackingField: 0 - k__BackingField: 5497589904781374352 --- !u!114 &6667641716399555817 MonoBehaviour: m_ObjectHideFlags: 0 @@ -157,13 +155,12 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5839577311109879042} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 4512293259955182957} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!33 &3127415364279584095 MeshFilter: @@ -184,12 +181,10 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 - m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -214,4 +209,3 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Prefabs/PlayerPrefab.prefab.meta b/Assets/FishNet/Demos/Network LOD/Prefabs/PlayerPrefab.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Prefabs/PlayerPrefab.prefab.meta rename to Assets/FishNet/Demos/Network LOD/Prefabs/PlayerPrefab.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Prefabs/_Network LOD_Prefabs.asset b/Assets/FishNet/Demos/Network LOD/Prefabs/_Network LOD_Prefabs.asset similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Prefabs/_Network LOD_Prefabs.asset rename to Assets/FishNet/Demos/Network LOD/Prefabs/_Network LOD_Prefabs.asset diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Prefabs/_Network LOD_Prefabs.asset.meta b/Assets/FishNet/Demos/Network LOD/Prefabs/_Network LOD_Prefabs.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Prefabs/_Network LOD_Prefabs.asset.meta rename to Assets/FishNet/Demos/Network LOD/Prefabs/_Network LOD_Prefabs.asset.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Scenes.meta b/Assets/FishNet/Demos/Network LOD/Scenes.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Scenes.meta rename to Assets/FishNet/Demos/Network LOD/Scenes.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Scenes/NetworkLOD_Demo.unity b/Assets/FishNet/Demos/Network LOD/Scenes/NetworkLOD_Demo.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Scenes/NetworkLOD_Demo.unity rename to Assets/FishNet/Demos/Network LOD/Scenes/NetworkLOD_Demo.unity diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Scenes/NetworkLOD_Demo.unity.meta b/Assets/FishNet/Demos/Network LOD/Scenes/NetworkLOD_Demo.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Scenes/NetworkLOD_Demo.unity.meta rename to Assets/FishNet/Demos/Network LOD/Scenes/NetworkLOD_Demo.unity.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Scripts.meta b/Assets/FishNet/Demos/Network LOD/Scripts.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Scripts.meta rename to Assets/FishNet/Demos/Network LOD/Scripts.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Scripts/MoveRandomly.cs b/Assets/FishNet/Demos/Network LOD/Scripts/MoveRandomly.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Scripts/MoveRandomly.cs rename to Assets/FishNet/Demos/Network LOD/Scripts/MoveRandomly.cs diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Scripts/MoveRandomly.cs.meta b/Assets/FishNet/Demos/Network LOD/Scripts/MoveRandomly.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Scripts/MoveRandomly.cs.meta rename to Assets/FishNet/Demos/Network LOD/Scripts/MoveRandomly.cs.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Scripts/NetworkLodTester.cs b/Assets/FishNet/Demos/Network LOD/Scripts/NetworkLodTester.cs similarity index 96% rename from Assets/Packages/FishNet/Demos/Network LOD/Scripts/NetworkLodTester.cs rename to Assets/FishNet/Demos/Network LOD/Scripts/NetworkLodTester.cs index 4910644..86812d6 100644 --- a/Assets/Packages/FishNet/Demos/Network LOD/Scripts/NetworkLodTester.cs +++ b/Assets/FishNet/Demos/Network LOD/Scripts/NetworkLodTester.cs @@ -30,9 +30,7 @@ private void Awake() { //Check for pro...this will stay false if not on a pro package. bool isPro = false; - //PROSTART - isPro = true; - //PROEND + if (!isPro) { Debug.LogError($"Network Level of Detail demo requires Fish-Networking Pro to work."); diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Scripts/NetworkLodTester.cs.meta b/Assets/FishNet/Demos/Network LOD/Scripts/NetworkLodTester.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Network LOD/Scripts/NetworkLodTester.cs.meta rename to Assets/FishNet/Demos/Network LOD/Scripts/NetworkLodTester.cs.meta diff --git a/Assets/Packages/FishNet/Demos/Prefabs.meta b/Assets/FishNet/Demos/Prefabs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Prefabs.meta rename to Assets/FishNet/Demos/Prefabs.meta diff --git a/Assets/Packages/FishNet/Demos/Prefabs/NetworkHudCanvas.prefab b/Assets/FishNet/Demos/Prefabs/NetworkHudCanvas.prefab similarity index 100% rename from Assets/Packages/FishNet/Demos/Prefabs/NetworkHudCanvas.prefab rename to Assets/FishNet/Demos/Prefabs/NetworkHudCanvas.prefab diff --git a/Assets/Packages/FishNet/Demos/Prefabs/NetworkHudCanvas.prefab.meta b/Assets/FishNet/Demos/Prefabs/NetworkHudCanvas.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Prefabs/NetworkHudCanvas.prefab.meta rename to Assets/FishNet/Demos/Prefabs/NetworkHudCanvas.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/Prefabs/NetworkManager.prefab b/Assets/FishNet/Demos/Prefabs/NetworkManager.prefab similarity index 100% rename from Assets/Packages/FishNet/Demos/Prefabs/NetworkManager.prefab rename to Assets/FishNet/Demos/Prefabs/NetworkManager.prefab diff --git a/Assets/Packages/FishNet/Demos/Prefabs/NetworkManager.prefab.meta b/Assets/FishNet/Demos/Prefabs/NetworkManager.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Prefabs/NetworkManager.prefab.meta rename to Assets/FishNet/Demos/Prefabs/NetworkManager.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples).meta b/Assets/FishNet/Demos/SceneManager (Old Examples).meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples).meta rename to Assets/FishNet/Demos/SceneManager (Old Examples).meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Materials.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Black.mat b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Black.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Black.mat rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Black.mat index 06848f7..99f4278 100644 --- a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Black.mat +++ b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Black.mat @@ -1,48 +1,25 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-2862955494216049179 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Black - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SURFACE_TYPE_TRANSPARENT - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _ALPHAPREMULTIPLY_ON m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: 3000 stringTagMap: RenderType: Transparent - disabledShaderPasses: - - DepthOnly - m_LockedProperties: + disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -79,38 +56,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 1 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 10 - - _DstBlendAlpha: 10 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0 - _GlossyReflections: 1 @@ -118,20 +68,11 @@ Material: - _Mode: 3 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 1 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 0 m_Colors: - - _BaseColor: {r: 0, g: 0, b: 0, a: 0.39215687} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0, g: 0, b: 0, a: 0.39215687} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Black.mat.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Black.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Black.mat.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Black.mat.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Blue.mat b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Blue.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Blue.mat rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Blue.mat index 1027cd4..cd9821d 100644 --- a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Blue.mat +++ b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Blue.mat @@ -2,34 +2,24 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Blue - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SURFACE_TYPE_TRANSPARENT - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _ALPHAPREMULTIPLY_ON m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: 3000 stringTagMap: RenderType: Transparent - disabledShaderPasses: - - DepthOnly - m_LockedProperties: + disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -66,38 +56,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 1 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 10 - - _DstBlendAlpha: 10 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0 - _GlossyReflections: 1 @@ -105,33 +68,11 @@ Material: - _Mode: 3 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 1 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 0 m_Colors: - - _BaseColor: {r: 0, g: 0.6867471, b: 1, a: 0.39215687} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0, g: 0.6867471, b: 1, a: 0.39215687} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] ---- !u!114 &7240526356275248071 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Blue.mat.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Blue.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Blue.mat.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Blue.mat.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Green.mat b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Green.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Green.mat rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Green.mat index d575bb4..04c1cf8 100644 --- a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Green.mat +++ b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Green.mat @@ -2,34 +2,24 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Green - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SURFACE_TYPE_TRANSPARENT - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _ALPHAPREMULTIPLY_ON m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: 3000 stringTagMap: RenderType: Transparent - disabledShaderPasses: - - DepthOnly - m_LockedProperties: + disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -66,38 +56,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 1 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 10 - - _DstBlendAlpha: 10 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0 - _GlossyReflections: 1 @@ -105,33 +68,11 @@ Material: - _Mode: 3 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 1 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 0 m_Colors: - - _BaseColor: {r: 0, g: 1, b: 0.030314447, a: 0.39215687} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0, g: 1, b: 0.030314445, a: 0.39215687} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] ---- !u!114 &4926383372090164209 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Green.mat.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Green.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Green.mat.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Green.mat.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Red.mat b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Red.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Red.mat rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Red.mat index 7227549..19a839c 100644 --- a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Red.mat +++ b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Red.mat @@ -1,48 +1,25 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-3383907334077971466 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Red - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SURFACE_TYPE_TRANSPARENT - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _ALPHAPREMULTIPLY_ON m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: 3000 stringTagMap: RenderType: Transparent - disabledShaderPasses: - - DepthOnly - m_LockedProperties: + disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -79,38 +56,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 1 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 10 - - _DstBlendAlpha: 10 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0 - _GlossyReflections: 1 @@ -118,20 +68,11 @@ Material: - _Mode: 3 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 1 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 0 m_Colors: - - _BaseColor: {r: 1, g: 0.018451946, b: 0, a: 0.39215687} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 0.018451946, b: 0, a: 0.39215687} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Red.mat.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Red.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Materials/Red.mat.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Materials/Red.mat.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Prefabs.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Prefabs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Prefabs.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Prefabs.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Prefabs/Player.prefab b/Assets/FishNet/Demos/SceneManager (Old Examples)/Prefabs/Player.prefab similarity index 92% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Prefabs/Player.prefab rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Prefabs/Player.prefab index 878678e..10dda46 100644 --- a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Prefabs/Player.prefab +++ b/Assets/FishNet/Demos/SceneManager (Old Examples)/Prefabs/Player.prefab @@ -25,13 +25,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1659630665519808908} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0.893, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 5090726670223187106} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!33 &2155251397865338026 MeshFilter: @@ -108,13 +108,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5090726669533971462} - serializedVersion: 2 m_LocalRotation: {x: 0.04100376, y: 0, z: 0, w: 0.99915904} m_LocalPosition: {x: 0, y: 1.56, z: -4.5} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 5090726670223187106} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 4.7, y: 0, z: 0} --- !u!20 &5090726669533971480 Camera: @@ -130,17 +130,9 @@ Camera: m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 @@ -204,7 +196,6 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5090726670223187118} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 6, y: -2, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} @@ -213,6 +204,7 @@ Transform: - {fileID: 5090726669533971481} - {fileID: 2767813079423793104} m_Father: {fileID: 0} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &5090726670223187108 MonoBehaviour: @@ -239,21 +231,10 @@ Rigidbody: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5090726670223187118} - serializedVersion: 4 + serializedVersion: 2 m_Mass: 1 m_Drag: 0 m_AngularDrag: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 m_UseGravity: 0 m_IsKinematic: 1 m_Interpolate: 0 @@ -267,17 +248,8 @@ CapsuleCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5090726670223187118} m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 m_IsTrigger: 0 - m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 m_Radius: 0.5 m_Height: 1 m_Direction: 1 @@ -312,11 +284,18 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 9 + _enablePrediction: 0 + _predictionType: 0 + _graphicalObject: {fileID: 0} + _enableStateForwarding: 1 + _ownerInterpolation: 1 + _enableTeleport: 0 + _teleportThreshold: 1 + k__BackingField: 12 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 - k__BackingField: 11933315282528103985 + k__BackingField: 12334122808499987737 --- !u!114 &6420552185407096997 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Prefabs/Player.prefab.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Prefabs/Player.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Prefabs/Player.prefab.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Prefabs/Player.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Prefabs/_SceneManager_Old_Prefabs.asset b/Assets/FishNet/Demos/SceneManager (Old Examples)/Prefabs/_SceneManager_Old_Prefabs.asset similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Prefabs/_SceneManager_Old_Prefabs.asset rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Prefabs/_SceneManager_Old_Prefabs.asset diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Prefabs/_SceneManager_Old_Prefabs.asset.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Prefabs/_SceneManager_Old_Prefabs.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Prefabs/_SceneManager_Old_Prefabs.asset.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Prefabs/_SceneManager_Old_Prefabs.asset.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveConnection.unity b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveConnection.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveConnection.unity rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveConnection.unity diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveConnection.unity.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveConnection.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveConnection.unity.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveConnection.unity.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveGlobal.unity b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveGlobal.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveGlobal.unity rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveGlobal.unity diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveGlobal.unity.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveGlobal.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveGlobal.unity.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveGlobal.unity.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveMain.unity b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveMain.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveMain.unity rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveMain.unity diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveMain.unity.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveMain.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveMain.unity.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Additive/AdditiveMain.unity.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceConnection.unity b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceConnection.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceConnection.unity rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceConnection.unity diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceConnection.unity.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceConnection.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceConnection.unity.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceConnection.unity.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceGlobal.unity b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceGlobal.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceGlobal.unity rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceGlobal.unity diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceGlobal.unity.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceGlobal.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceGlobal.unity.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceGlobal.unity.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMain.unity b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMain.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMain.unity rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMain.unity diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMain.unity.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMain.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMain.unity.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMain.unity.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMainSettings.lighting b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMainSettings.lighting similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMainSettings.lighting rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMainSettings.lighting diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMainSettings.lighting.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMainSettings.lighting.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMainSettings.lighting.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scenes/Replace/ReplaceMainSettings.lighting.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts/PlayerController.cs b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts/PlayerController.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts/PlayerController.cs rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts/PlayerController.cs diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts/PlayerController.cs.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts/PlayerController.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts/PlayerController.cs.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts/PlayerController.cs.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneLoaderExample.cs b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneLoaderExample.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneLoaderExample.cs rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneLoaderExample.cs diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneLoaderExample.cs.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneLoaderExample.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneLoaderExample.cs.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneLoaderExample.cs.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneUnloaderExample.cs b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneUnloaderExample.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneUnloaderExample.cs rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneUnloaderExample.cs diff --git a/Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneUnloaderExample.cs.meta b/Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneUnloaderExample.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneUnloaderExample.cs.meta rename to Assets/FishNet/Demos/SceneManager (Old Examples)/Scripts/SceneUnloaderExample.cs.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager.meta b/Assets/FishNet/Demos/SceneManager.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager.meta rename to Assets/FishNet/Demos/SceneManager.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Additive Scenes READ ME.txt b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Additive Scenes READ ME.txt similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Additive Scenes READ ME.txt rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Additive Scenes READ ME.txt diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Additive Scenes READ ME.txt.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Additive Scenes READ ME.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Additive Scenes READ ME.txt.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Additive Scenes READ ME.txt.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials.meta diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Ground.mat b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/Ground.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Ground.mat rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/Ground.mat index 4eb8c07..8e4181e 100644 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Materials/Ground.mat +++ b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/Ground.mat @@ -2,32 +2,23 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Ground - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque + stringTagMap: {} disabledShaderPasses: [] - m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -64,38 +55,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -103,33 +67,11 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 0.30265412, g: 0.31132075, b: 0.086641155, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.18867922, g: 0, b: 0.12506457, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] ---- !u!114 &3611765148527336447 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/Ground.mat.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/Ground.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/Ground.mat.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/Ground.mat.meta diff --git a/Assets/Packages/FishNet/Demos/Network LOD/Materials/Player.mat b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/Player.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/Network LOD/Materials/Player.mat rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/Player.mat index 18aecd4..4d121aa 100644 --- a/Assets/Packages/FishNet/Demos/Network LOD/Materials/Player.mat +++ b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/Player.mat @@ -1,46 +1,24 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-7884959282783333471 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Player - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque + stringTagMap: {} disabledShaderPasses: [] - m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -77,38 +55,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -116,20 +67,11 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 0.44982976, g: 0.8207547, b: 0.27487537, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.6132076, g: 0.5462585, b: 0.32106623, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/Player.mat.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/Player.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/Player.mat.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/Player.mat.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeGrowth.mat b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeGrowth.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeGrowth.mat rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeGrowth.mat index 145b305..56825c2 100644 --- a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeGrowth.mat +++ b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeGrowth.mat @@ -2,32 +2,23 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: TreeGrowth - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque + stringTagMap: {} disabledShaderPasses: [] - m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -64,38 +55,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -103,33 +67,11 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 0.20627496, g: 0.7075471, b: 0.09011211, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.206275, g: 0.7075472, b: 0.09011214, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] ---- !u!114 &4675961826285083695 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeGrowth.mat.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeGrowth.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeGrowth.mat.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeGrowth.mat.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeStump.mat b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeStump.mat similarity index 50% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeStump.mat rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeStump.mat index 6a2b5be..847a813 100644 --- a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeStump.mat +++ b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeStump.mat @@ -2,32 +2,23 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: - serializedVersion: 8 + serializedVersion: 6 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: TreeStump - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque + stringTagMap: {} disabledShaderPasses: [] - m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -64,38 +55,11 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -103,33 +67,11 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 0.45283014, g: 0.13425767, b: 0, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.4528302, g: 0.13425772, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] ---- !u!114 &8059278248783000362 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeStump.mat.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeStump.mat.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeStump.mat.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Materials/TreeStump.mat.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Models.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Models.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Models.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Models.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Models/Tree.fbx b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Models/Tree.fbx similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Models/Tree.fbx rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Models/Tree.fbx diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Models/Tree.fbx.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Models/Tree.fbx.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Models/Tree.fbx.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Models/Tree.fbx.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions/DistanceCondition.asset b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions/DistanceCondition.asset similarity index 95% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions/DistanceCondition.asset rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions/DistanceCondition.asset index b84bce7..1fcc5ea 100644 --- a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions/DistanceCondition.asset +++ b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions/DistanceCondition.asset @@ -13,5 +13,5 @@ MonoBehaviour: m_Name: DistanceCondition m_EditorClassIdentifier: NetworkObject: {fileID: 0} - _maximumDistance: 100 + _maximumDistance: 13 _hideDistancePercent: 0.1 diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions/DistanceCondition.asset.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions/DistanceCondition.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions/DistanceCondition.asset.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Observer Conditions/DistanceCondition.asset.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Prefabs.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Prefabs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Prefabs.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Prefabs.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/Player.prefab b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/Player.prefab similarity index 93% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/Player.prefab rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/Player.prefab index 4c7247d..5629354 100644 --- a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/Player.prefab +++ b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/Player.prefab @@ -24,13 +24,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1814087131438229314} - serializedVersion: 2 m_LocalRotation: {x: 0.5735764, y: 0, z: 0, w: 0.8191521} m_LocalPosition: {x: 0, y: 3, z: 2} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 6508211851680439895} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 70, y: 0, z: 0} --- !u!108 &364480097386140387 Light: @@ -119,13 +119,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2977802116279124631} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 6605224599093577347} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!33 &1556184897009707061 MeshFilter: @@ -203,13 +203,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6605224598710239337} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1.5, z: 0.372} m_LocalScale: {x: 0.75, y: 0.2, z: 0.5} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 6605224599093577347} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!33 &6605224598710239381 MeshFilter: @@ -269,17 +269,9 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6605224598710239337} m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 m_IsTrigger: 0 - m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 2 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} --- !u!1 &6605224599093577351 @@ -310,7 +302,6 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6605224599093577351} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 20, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} @@ -320,6 +311,7 @@ Transform: - {fileID: 6605224598710239336} - {fileID: 6508211851680439895} m_Father: {fileID: 0} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &8192566354860284824 MonoBehaviour: @@ -351,11 +343,18 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} + _enablePrediction: 0 + _predictionType: 0 + _graphicalObject: {fileID: 0} + _enableStateForwarding: 1 + _ownerInterpolation: 1 + _enableTeleport: 0 + _teleportThreshold: 1 k__BackingField: 20 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 - k__BackingField: 881321162475054636 + k__BackingField: 5491988111533709812 --- !u!114 &6767263130208162619 MonoBehaviour: m_ObjectHideFlags: 0 @@ -380,21 +379,10 @@ Rigidbody: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6605224599093577351} - serializedVersion: 4 + serializedVersion: 2 m_Mass: 1 m_Drag: 0 m_AngularDrag: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 m_UseGravity: 0 m_IsKinematic: 1 m_Interpolate: 0 @@ -408,17 +396,8 @@ CapsuleCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6605224599093577351} m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 m_IsTrigger: 0 - m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 m_Radius: 0.5 m_Height: 1 m_Direction: 1 @@ -491,7 +470,6 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7242742394113443571} - serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} @@ -500,6 +478,7 @@ Transform: - {fileID: 1653722379618799168} - {fileID: 6217164647077334158} m_Father: {fileID: 6605224599093577347} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &8611472312372460170 GameObject: @@ -526,13 +505,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8611472312372460170} - serializedVersion: 2 m_LocalRotation: {x: 0.5735764, y: -0, z: -0, w: 0.8191521} m_LocalPosition: {x: 0, y: 5, z: -1} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 6508211851680439895} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 70, y: 0, z: 0} --- !u!20 &8497199479931662325 Camera: @@ -548,17 +527,9 @@ Camera: m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/Player.prefab.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/Player.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/Player.prefab.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/Player.prefab.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/_SceneManager_Additive Scenes_Prefabs.asset b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/_SceneManager_Additive Scenes_Prefabs.asset similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/_SceneManager_Additive Scenes_Prefabs.asset rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/_SceneManager_Additive Scenes_Prefabs.asset diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/_SceneManager_Additive Scenes_Prefabs.asset.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/_SceneManager_Additive Scenes_Prefabs.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/_SceneManager_Additive Scenes_Prefabs.asset.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Prefabs/_SceneManager_Additive Scenes_Prefabs.asset.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0.unity b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0.unity rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0.unity diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0.unity.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0.unity.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0.unity.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/LightingData.asset b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/LightingData.asset similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/LightingData.asset rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/LightingData.asset diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/LightingData.asset.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/LightingData.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/LightingData.asset.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/LightingData.asset.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/ReflectionProbe-0.exr b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/ReflectionProbe-0.exr similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/ReflectionProbe-0.exr rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/ReflectionProbe-0.exr diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/ReflectionProbe-0.exr.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/ReflectionProbe-0.exr.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/ReflectionProbe-0.exr.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_0/ReflectionProbe-0.exr.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_1.unity b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_1.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_1.unity rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_1.unity diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_1.unity.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_1.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_1.unity.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_1.unity.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_2.unity b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_2.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_2.unity rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_2.unity diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_2.unity.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_2.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_2.unity.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_2.unity.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_3.unity b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_3.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_3.unity rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_3.unity diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_3.unity.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_3.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_3.unity.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_3.unity.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_Start.unity b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_Start.unity similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_Start.unity rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_Start.unity diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_Start.unity.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_Start.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_Start.unity.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scenes/AdditiveScenes_Start.unity.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/LevelLoader.cs b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/LevelLoader.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/LevelLoader.cs rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/LevelLoader.cs diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/LevelLoader.cs.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/LevelLoader.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/LevelLoader.cs.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/LevelLoader.cs.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Player.cs b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Player.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Player.cs rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Player.cs diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Player.cs.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Player.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Player.cs.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Player.cs.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/ServerScenePrewarmer.cs b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/ServerScenePrewarmer.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/ServerScenePrewarmer.cs rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/ServerScenePrewarmer.cs diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/ServerScenePrewarmer.cs.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/ServerScenePrewarmer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/ServerScenePrewarmer.cs.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/ServerScenePrewarmer.cs.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Waypoint.cs b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Waypoint.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Waypoint.cs rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Waypoint.cs diff --git a/Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Waypoint.cs.meta b/Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Waypoint.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Waypoint.cs.meta rename to Assets/FishNet/Demos/SceneManager/Additive Scenes/Scripts/Waypoint.cs.meta diff --git a/Assets/Packages/FishNet/Demos/SceneManager/SceneManager Event Diagram.png b/Assets/FishNet/Demos/SceneManager/SceneManager Event Diagram.png similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/SceneManager Event Diagram.png rename to Assets/FishNet/Demos/SceneManager/SceneManager Event Diagram.png diff --git a/Assets/Packages/FishNet/Demos/SceneManager/SceneManager Event Diagram.png.meta b/Assets/FishNet/Demos/SceneManager/SceneManager Event Diagram.png.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SceneManager/SceneManager Event Diagram.png.meta rename to Assets/FishNet/Demos/SceneManager/SceneManager Event Diagram.png.meta diff --git a/Assets/Packages/FishNet/Demos/Scripts.meta b/Assets/FishNet/Demos/Scripts.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Scripts.meta rename to Assets/FishNet/Demos/Scripts.meta diff --git a/Assets/Packages/FishNet/Demos/Scripts/NetworkHudCanvases.cs b/Assets/FishNet/Demos/Scripts/NetworkHudCanvases.cs similarity index 100% rename from Assets/Packages/FishNet/Demos/Scripts/NetworkHudCanvases.cs rename to Assets/FishNet/Demos/Scripts/NetworkHudCanvases.cs diff --git a/Assets/Packages/FishNet/Demos/Scripts/NetworkHudCanvases.cs.meta b/Assets/FishNet/Demos/Scripts/NetworkHudCanvases.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/Scripts/NetworkHudCanvases.cs.meta rename to Assets/FishNet/Demos/Scripts/NetworkHudCanvases.cs.meta diff --git a/Assets/Packages/FishNet/Demos/SpringBoard.prefab b/Assets/FishNet/Demos/SpringBoard.prefab similarity index 100% rename from Assets/Packages/FishNet/Demos/SpringBoard.prefab rename to Assets/FishNet/Demos/SpringBoard.prefab diff --git a/Assets/Packages/FishNet/Demos/SpringBoard.prefab.meta b/Assets/FishNet/Demos/SpringBoard.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Demos/SpringBoard.prefab.meta rename to Assets/FishNet/Demos/SpringBoard.prefab.meta diff --git a/Assets/Packages/FishNet/LICENSE.txt b/Assets/FishNet/LICENSE.txt similarity index 100% rename from Assets/Packages/FishNet/LICENSE.txt rename to Assets/FishNet/LICENSE.txt diff --git a/Assets/Packages/FishNet/LICENSE.txt.meta b/Assets/FishNet/LICENSE.txt.meta similarity index 100% rename from Assets/Packages/FishNet/LICENSE.txt.meta rename to Assets/FishNet/LICENSE.txt.meta diff --git a/Assets/Packages/FishNet/Plugins.meta b/Assets/FishNet/Plugins.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins.meta rename to Assets/FishNet/Plugins.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap.meta b/Assets/FishNet/Plugins/Edgegap.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap.meta rename to Assets/FishNet/Plugins/Edgegap.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Dependencies.meta b/Assets/FishNet/Plugins/Edgegap/Dependencies.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Dependencies.meta rename to Assets/FishNet/Plugins/Edgegap/Dependencies.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Dependencies/HttpEncoder.cs b/Assets/FishNet/Plugins/Edgegap/Dependencies/HttpEncoder.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Dependencies/HttpEncoder.cs rename to Assets/FishNet/Plugins/Edgegap/Dependencies/HttpEncoder.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Dependencies/HttpEncoder.cs.meta b/Assets/FishNet/Plugins/Edgegap/Dependencies/HttpEncoder.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Dependencies/HttpEncoder.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Dependencies/HttpEncoder.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Dependencies/HttpUtility.cs b/Assets/FishNet/Plugins/Edgegap/Dependencies/HttpUtility.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Dependencies/HttpUtility.cs rename to Assets/FishNet/Plugins/Edgegap/Dependencies/HttpUtility.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Dependencies/HttpUtility.cs.meta b/Assets/FishNet/Plugins/Edgegap/Dependencies/HttpUtility.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Dependencies/HttpUtility.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Dependencies/HttpUtility.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Edgegap.asmdef b/Assets/FishNet/Plugins/Edgegap/Edgegap.asmdef similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Edgegap.asmdef rename to Assets/FishNet/Plugins/Edgegap/Edgegap.asmdef diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Edgegap.asmdef.meta b/Assets/FishNet/Plugins/Edgegap/Edgegap.asmdef.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Edgegap.asmdef.meta rename to Assets/FishNet/Plugins/Edgegap/Edgegap.asmdef.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor.meta b/Assets/FishNet/Plugins/Edgegap/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor.meta rename to Assets/FishNet/Plugins/Edgegap/Editor.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapApiBase.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapApiBase.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapApiBase.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapApiBase.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapApiBase.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapApiBase.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapApiBase.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapApiBase.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapAppApi.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapAppApi.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapAppApi.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapAppApi.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapAppApi.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapAppApi.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapAppApi.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapAppApi.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapDeploymentsApi.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapDeploymentsApi.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapDeploymentsApi.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapDeploymentsApi.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapDeploymentsApi.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapDeploymentsApi.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapDeploymentsApi.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapDeploymentsApi.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapIpApi.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapIpApi.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapIpApi.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapIpApi.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapIpApi.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapIpApi.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapIpApi.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapIpApi.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapWizardApi.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapWizardApi.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapWizardApi.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapWizardApi.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapWizardApi.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapWizardApi.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/EdgegapWizardApi.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/EdgegapWizardApi.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/AppPortsData.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/AppPortsData.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/AppPortsData.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/AppPortsData.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/AppPortsData.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/AppPortsData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/AppPortsData.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/AppPortsData.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/DeploymentPortsData.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/DeploymentPortsData.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/DeploymentPortsData.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/DeploymentPortsData.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/DeploymentPortsData.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/DeploymentPortsData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/DeploymentPortsData.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/DeploymentPortsData.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/LocationData.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/LocationData.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/LocationData.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/LocationData.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/LocationData.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/LocationData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/LocationData.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/LocationData.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/ProtocolType.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/ProtocolType.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/ProtocolType.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/ProtocolType.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/ProtocolType.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/ProtocolType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/ProtocolType.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/ProtocolType.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppRequest.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppRequest.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppRequest.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppRequest.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppRequest.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppRequest.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppRequest.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppRequest.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppVersionRequest.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppVersionRequest.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppVersionRequest.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppVersionRequest.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppVersionRequest.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppVersionRequest.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppVersionRequest.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateAppVersionRequest.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateDeploymentRequest.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateDeploymentRequest.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateDeploymentRequest.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateDeploymentRequest.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateDeploymentRequest.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateDeploymentRequest.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateDeploymentRequest.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/CreateDeploymentRequest.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/UpdateAppVersionRequest.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/UpdateAppVersionRequest.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/UpdateAppVersionRequest.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/UpdateAppVersionRequest.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/UpdateAppVersionRequest.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/UpdateAppVersionRequest.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/UpdateAppVersionRequest.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Requests/UpdateAppVersionRequest.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/CreateDeploymentResult.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/CreateDeploymentResult.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/CreateDeploymentResult.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/CreateDeploymentResult.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/CreateDeploymentResult.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/CreateDeploymentResult.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/CreateDeploymentResult.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/CreateDeploymentResult.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapErrorResult.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapErrorResult.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapErrorResult.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapErrorResult.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapErrorResult.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapErrorResult.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapErrorResult.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapErrorResult.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapHttpResult.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapHttpResult.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapHttpResult.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapHttpResult.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapHttpResult.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapHttpResult.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapHttpResult.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/EdgegapHttpResult.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetCreateAppResult.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetCreateAppResult.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetCreateAppResult.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetCreateAppResult.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetCreateAppResult.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetCreateAppResult.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetCreateAppResult.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetCreateAppResult.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetDeploymentStatusResult.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetDeploymentStatusResult.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetDeploymentStatusResult.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetDeploymentStatusResult.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetDeploymentStatusResult.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetDeploymentStatusResult.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetDeploymentStatusResult.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetDeploymentStatusResult.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetRegistryCredentialsResult.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetRegistryCredentialsResult.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetRegistryCredentialsResult.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetRegistryCredentialsResult.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetRegistryCredentialsResult.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetRegistryCredentialsResult.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetRegistryCredentialsResult.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetRegistryCredentialsResult.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetYourPublicIpResult.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetYourPublicIpResult.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetYourPublicIpResult.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetYourPublicIpResult.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetYourPublicIpResult.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetYourPublicIpResult.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetYourPublicIpResult.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/GetYourPublicIpResult.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/StopActiveDeploymentResult.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/StopActiveDeploymentResult.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/StopActiveDeploymentResult.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/StopActiveDeploymentResult.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/StopActiveDeploymentResult.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/StopActiveDeploymentResult.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/StopActiveDeploymentResult.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/StopActiveDeploymentResult.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/UpsertAppVersionResult.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/UpsertAppVersionResult.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/UpsertAppVersionResult.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/UpsertAppVersionResult.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/UpsertAppVersionResult.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/UpsertAppVersionResult.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/UpsertAppVersionResult.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/Results/UpsertAppVersionResult.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/SessionData.cs b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/SessionData.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/SessionData.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/SessionData.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/SessionData.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/SessionData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Api/Models/SessionData.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Api/Models/SessionData.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/ButtonShaker.cs b/Assets/FishNet/Plugins/Edgegap/Editor/ButtonShaker.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/ButtonShaker.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/ButtonShaker.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/ButtonShaker.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/ButtonShaker.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/ButtonShaker.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/ButtonShaker.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapBuildUtils.cs b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapBuildUtils.cs similarity index 98% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapBuildUtils.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapBuildUtils.cs index cbae559..d7ed357 100644 --- a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapBuildUtils.cs +++ b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapBuildUtils.cs @@ -23,7 +23,9 @@ public static bool IsArmCPU() => public static BuildReport BuildServer() { - IEnumerable scenes = EditorBuildSettings.scenes.Select(s=>s.path); + IEnumerable scenes = EditorBuildSettings.scenes + .Where(s => s.enabled) + .Select(s => s.path); BuildPlayerOptions options = new BuildPlayerOptions { scenes = scenes.ToArray(), @@ -102,7 +104,7 @@ await RunCommand("/bin/bash", $"-c \"docker {buildCommand} -t {registry}/{imageR onStatusUpdate(msg); }); - if (realErrorMessage != null) + if(realErrorMessage != null) { throw new Exception(realErrorMessage); } @@ -297,4 +299,4 @@ public static async Task LoginContainerRegistry( } } -#endif \ No newline at end of file +#endif diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapBuildUtils.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapBuildUtils.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapBuildUtils.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapBuildUtils.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapScriptEditor.cs b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapScriptEditor.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapScriptEditor.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapScriptEditor.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapScriptEditor.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapScriptEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapScriptEditor.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapScriptEditor.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapServerData.uss b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapServerData.uss similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapServerData.uss rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapServerData.uss diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapServerData.uss.meta b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapServerData.uss.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapServerData.uss.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapServerData.uss.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapServerDataManager.cs b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapServerDataManager.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapServerDataManager.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapServerDataManager.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapServerDataManager.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapServerDataManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapServerDataManager.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapServerDataManager.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapToolScript.cs b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapToolScript.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapToolScript.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapToolScript.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapToolScript.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapToolScript.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapToolScript.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapToolScript.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.cs b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uss b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uss similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uss rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uss diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uss.meta b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uss.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uss.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uss.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uxml b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uxml similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uxml rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uxml diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uxml.meta b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uxml.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uxml.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindow.uxml.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindowMetadata.cs b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindowMetadata.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindowMetadata.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindowMetadata.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindowMetadata.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindowMetadata.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindowMetadata.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindowMetadata.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindowV2.cs b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindowV2.cs similarity index 99% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindowV2.cs rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindowV2.cs index dd42f1f..7544351 100644 --- a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindowV2.cs +++ b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindowV2.cs @@ -44,7 +44,6 @@ public class EdgegapWindowV2 : EditorWindow private string _deploymentRequestId; private string _userExternalIp; private bool _isAwaitingDeploymentReadyStatus; - private bool _registered; #endregion // Vars @@ -151,7 +150,6 @@ protected void OnDisable() unregisterClickEvents(); unregisterFieldCallbacks(); SyncObjectWithForm(); - _registered = false; } #endregion // Unity Funcs @@ -163,7 +161,6 @@ protected void OnDisable() /// private void InitUIElements() { - _registered = true; setVisualElementsToFields(); assertVisualElementKeys(); closeDisableGroups(); @@ -380,9 +377,6 @@ private void registerFieldCallbacks() /// private void unregisterFieldCallbacks() { - if (!_registered) - return; - _apiTokenInput.UnregisterValueChangedCallback(onApiTokenInputChanged); _apiTokenInput.UnregisterCallback(onApiTokenInputFocusOut); @@ -419,8 +413,6 @@ private void registerClickCallbacks() /// private void unregisterClickEvents() { - if (!_registered) - return; _debugBtn.clickable.clicked -= onDebugBtnClick; _apiTokenVerifyBtn.clickable.clicked -= onApiTokenVerifyBtnClick; @@ -612,8 +604,6 @@ private void assertAppNameExists() => /// private void SyncObjectWithForm() { - if (_appIconSpriteObjInput == null) - return; _appIconSpriteObj = _appIconSpriteObjInput.value as Sprite; } diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindowV2.cs.meta b/Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindowV2.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/EdgegapWindowV2.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/EdgegapWindowV2.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/BaronNeue SDF.asset b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/BaronNeue SDF.asset similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/BaronNeue SDF.asset rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/BaronNeue SDF.asset diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/BaronNeue SDF.asset.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/BaronNeue SDF.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/BaronNeue SDF.asset.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/BaronNeue SDF.asset.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-Regular SDF.asset b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-Regular SDF.asset similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-Regular SDF.asset rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-Regular SDF.asset diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-Regular SDF.asset.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-Regular SDF.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-Regular SDF.asset.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-Regular SDF.asset.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-SemiBold SDF.asset b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-SemiBold SDF.asset similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-SemiBold SDF.asset rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-SemiBold SDF.asset diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-SemiBold SDF.asset.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-SemiBold SDF.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-SemiBold SDF.asset.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Spartan-SemiBold SDF.asset.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/BaronNeue.otf b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/BaronNeue.otf similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/BaronNeue.otf rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/BaronNeue.otf diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/BaronNeue.otf.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/BaronNeue.otf.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/BaronNeue.otf.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/BaronNeue.otf.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-Regular.ttf b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-Regular.ttf similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-Regular.ttf rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-Regular.ttf diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-Regular.ttf.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-Regular.ttf.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-Regular.ttf.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-Regular.ttf.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-SemiBold.ttf b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-SemiBold.ttf similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-SemiBold.ttf rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-SemiBold.ttf diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-SemiBold.ttf.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-SemiBold.ttf.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-SemiBold.ttf.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/Spartan/Spartan-SemiBold.ttf.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/UbuntuMono-R.ttf b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/UbuntuMono-R.ttf similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/UbuntuMono-R.ttf rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/UbuntuMono-R.ttf diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/UbuntuMono-R.ttf.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/UbuntuMono-R.ttf.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/Src/UbuntuMono-R.ttf.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/Src/UbuntuMono-R.ttf.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/UbuntuMono-R SDF.asset b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/UbuntuMono-R SDF.asset similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/UbuntuMono-R SDF.asset rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/UbuntuMono-R SDF.asset diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/UbuntuMono-R SDF.asset.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Fonts/UbuntuMono-R SDF.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Fonts/UbuntuMono-R SDF.asset.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Fonts/UbuntuMono-R SDF.asset.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Images.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Images.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Images.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Images.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Images/clipboard-128.png b/Assets/FishNet/Plugins/Edgegap/Editor/Images/clipboard-128.png similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Images/clipboard-128.png rename to Assets/FishNet/Plugins/Edgegap/Editor/Images/clipboard-128.png diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Images/clipboard-128.png.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Images/clipboard-128.png.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Images/clipboard-128.png.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Images/clipboard-128.png.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Images/logo_transparent_400_alpha25.png b/Assets/FishNet/Plugins/Edgegap/Editor/Images/logo_transparent_400_alpha25.png similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Images/logo_transparent_400_alpha25.png rename to Assets/FishNet/Plugins/Edgegap/Editor/Images/logo_transparent_400_alpha25.png diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Editor/Images/logo_transparent_400_alpha25.png.meta b/Assets/FishNet/Plugins/Edgegap/Editor/Images/logo_transparent_400_alpha25.png.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Editor/Images/logo_transparent_400_alpha25.png.meta rename to Assets/FishNet/Plugins/Edgegap/Editor/Images/logo_transparent_400_alpha25.png.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Enums.meta b/Assets/FishNet/Plugins/Edgegap/Enums.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Enums.meta rename to Assets/FishNet/Plugins/Edgegap/Enums.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Enums/ApiEnvironment.cs b/Assets/FishNet/Plugins/Edgegap/Enums/ApiEnvironment.cs similarity index 94% rename from Assets/Packages/FishNet/Plugins/Edgegap/Enums/ApiEnvironment.cs rename to Assets/FishNet/Plugins/Edgegap/Enums/ApiEnvironment.cs index 8533a9b..dc854b5 100644 --- a/Assets/Packages/FishNet/Plugins/Edgegap/Enums/ApiEnvironment.cs +++ b/Assets/FishNet/Plugins/Edgegap/Enums/ApiEnvironment.cs @@ -55,10 +55,10 @@ public static string GetDocumentationUrl(this ApiEnvironment apiEnvironment) switch (apiEnvironment) { case ApiEnvironment.Staging: - apiUrl = "https://staging-docs.edgegap.com/docs"; + apiUrl = "https://staging-docs.edgegap.com/docs/category/unity"; break; case ApiEnvironment.Console: - apiUrl = "https://docs.edgegap.com/docs"; + apiUrl = "https://docs.edgegap.com/docs/category/unity"; break; default: apiUrl = null; diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Enums/ApiEnvironment.cs.meta b/Assets/FishNet/Plugins/Edgegap/Enums/ApiEnvironment.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Enums/ApiEnvironment.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Enums/ApiEnvironment.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Enums/ServerStatus.cs b/Assets/FishNet/Plugins/Edgegap/Enums/ServerStatus.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Enums/ServerStatus.cs rename to Assets/FishNet/Plugins/Edgegap/Enums/ServerStatus.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Enums/ServerStatus.cs.meta b/Assets/FishNet/Plugins/Edgegap/Enums/ServerStatus.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Enums/ServerStatus.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Enums/ServerStatus.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Enums/ToolState.cs b/Assets/FishNet/Plugins/Edgegap/Enums/ToolState.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Enums/ToolState.cs rename to Assets/FishNet/Plugins/Edgegap/Enums/ToolState.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Enums/ToolState.cs.meta b/Assets/FishNet/Plugins/Edgegap/Enums/ToolState.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Enums/ToolState.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Enums/ToolState.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models.meta b/Assets/FishNet/Plugins/Edgegap/Models.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models.meta rename to Assets/FishNet/Plugins/Edgegap/Models.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/AppVersionUpdatePatchData.cs b/Assets/FishNet/Plugins/Edgegap/Models/AppVersionUpdatePatchData.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/AppVersionUpdatePatchData.cs rename to Assets/FishNet/Plugins/Edgegap/Models/AppVersionUpdatePatchData.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/AppVersionUpdatePatchData.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/AppVersionUpdatePatchData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/AppVersionUpdatePatchData.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/AppVersionUpdatePatchData.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/DeployPostData.cs b/Assets/FishNet/Plugins/Edgegap/Models/DeployPostData.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/DeployPostData.cs rename to Assets/FishNet/Plugins/Edgegap/Models/DeployPostData.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/DeployPostData.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/DeployPostData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/DeployPostData.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/DeployPostData.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainercrashdata.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainercrashdata.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainercrashdata.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainercrashdata.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainercrashdata.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainercrashdata.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainercrashdata.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainercrashdata.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainerlogs.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainerlogs.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainerlogs.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainerlogs.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainerlogs.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainerlogs.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainerlogs.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/ApiModelContainerlogs.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppCreation.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppCreation.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppCreation.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppCreation.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppCreation.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppCreation.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppCreation.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppCreation.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersion.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersion.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersion.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersion.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersion.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersion.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersion.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersion.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionCreateSessionConfig.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionCreateSessionConfig.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionCreateSessionConfig.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionCreateSessionConfig.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionCreateSessionConfig.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionCreateSessionConfig.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionCreateSessionConfig.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionCreateSessionConfig.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionEnv.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionEnv.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionEnv.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionEnv.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionEnv.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionEnv.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionEnv.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionEnv.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionPort.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionPort.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionPort.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionPort.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionPort.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionPort.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionPort.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionPort.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionProbe.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionProbe.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionProbe.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionProbe.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionProbe.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionProbe.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionProbe.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionProbe.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdateSessionConfig.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdateSessionConfig.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdateSessionConfig.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdateSessionConfig.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdateSessionConfig.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdateSessionConfig.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdateSessionConfig.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionUpdateSessionConfig.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntry.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntry.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntry.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntry.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntry.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntry.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntry.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntry.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntryPayload.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntryPayload.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntryPayload.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntryPayload.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntryPayload.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntryPayload.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntryPayload.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntryPayload.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntrySuccess.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntrySuccess.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntrySuccess.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntrySuccess.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntrySuccess.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntrySuccess.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntrySuccess.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistEntrySuccess.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistResponse.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistResponse.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistResponse.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistResponse.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistResponse.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistResponse.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistResponse.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersionWhitelistResponse.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersions.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersions.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersions.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersions.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersions.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/AppVersions.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/AppVersions.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Application.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Application.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Application.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Application.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Application.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Application.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Application.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Application.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPatch.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPatch.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPatch.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPatch.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPatch.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPatch.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPatch.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPatch.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPost.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPost.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPost.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPost.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPost.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPost.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPost.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/ApplicationPost.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Applications.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Applications.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Applications.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Applications.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Applications.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Applications.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Applications.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Applications.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/BaseModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/BaseModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/BaseModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/BaseModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/BaseModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/BaseModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/BaseModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/BaseModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionDelete.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionDelete.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionDelete.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionDelete.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionDelete.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionDelete.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionDelete.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionDelete.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionPost.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionPost.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionPost.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionPost.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionPost.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionPost.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionPost.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/BulkSessionPost.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ComponentCredentials.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/ComponentCredentials.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ComponentCredentials.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/ComponentCredentials.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ComponentCredentials.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/ComponentCredentials.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ComponentCredentials.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/ComponentCredentials.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ContainerLogStorageModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/ContainerLogStorageModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ContainerLogStorageModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/ContainerLogStorageModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ContainerLogStorageModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/ContainerLogStorageModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/ContainerLogStorageModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/ContainerLogStorageModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionsModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionsModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionsModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionsModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionsModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionsModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionsModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomBulkSessionsModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionDeleteModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionDeleteModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionDeleteModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionDeleteModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionDeleteModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionDeleteModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionDeleteModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionDeleteModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/CustomSessionModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Delete.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Delete.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Delete.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Delete.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Delete.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Delete.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Delete.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Delete.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeployEnvModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/DeployEnvModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeployEnvModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/DeployEnvModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeployEnvModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/DeployEnvModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeployEnvModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/DeployEnvModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeployModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/DeployModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeployModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/DeployModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeployModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/DeployModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeployModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/DeployModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Deployment.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Deployment.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Deployment.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Deployment.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Deployment.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Deployment.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Deployment.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Deployment.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeploymentLocation.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/DeploymentLocation.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeploymentLocation.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/DeploymentLocation.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeploymentLocation.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/DeploymentLocation.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeploymentLocation.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/DeploymentLocation.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeploymentSessionContext.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/DeploymentSessionContext.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeploymentSessionContext.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/DeploymentSessionContext.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeploymentSessionContext.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/DeploymentSessionContext.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/DeploymentSessionContext.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/DeploymentSessionContext.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Deployments.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Deployments.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Deployments.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Deployments.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Deployments.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Deployments.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Deployments.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Deployments.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Error.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Error.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Error.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Error.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Error.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Error.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Error.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Error.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/GeoIpListModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/GeoIpListModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/GeoIpListModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/GeoIpListModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/GeoIpListModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/GeoIpListModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/GeoIpListModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/GeoIpListModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Location.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Location.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Location.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Location.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Location.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Location.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Location.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Location.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/LocationModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/LocationModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/LocationModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/LocationModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/LocationModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/LocationModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/LocationModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/LocationModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Locations.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Locations.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Locations.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Locations.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Locations.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Locations.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Locations.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Locations.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentCreate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentCreate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentCreate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentCreate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentCreate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentCreate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentCreate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentCreate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvListResponse.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvListResponse.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvListResponse.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvListResponse.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvListResponse.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvListResponse.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvListResponse.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvListResponse.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsCreate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsCreate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsCreate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsCreate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsCreate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsCreate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsCreate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsCreate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsResponse.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsResponse.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsResponse.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsResponse.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsResponse.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsResponse.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsResponse.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsResponse.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsUpdate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsUpdate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsUpdate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsUpdate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsUpdate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsUpdate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsUpdate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentEnvsUpdate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentListResponse.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentListResponse.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentListResponse.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentListResponse.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentListResponse.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentListResponse.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentListResponse.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentListResponse.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentResponse.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentResponse.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentResponse.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentResponse.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentResponse.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentResponse.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentResponse.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentResponse.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentUpdate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentUpdate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentUpdate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentUpdate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentUpdate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentUpdate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentUpdate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerComponentUpdate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerCreate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerCreate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerCreate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerCreate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerCreate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerCreate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerCreate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerCreate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerListResponse.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerListResponse.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerListResponse.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerListResponse.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerListResponse.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerListResponse.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerListResponse.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerListResponse.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseCreate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseCreate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseCreate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseCreate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseCreate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseCreate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseCreate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseCreate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseResponse.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseResponse.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseResponse.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseResponse.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseResponse.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseResponse.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseResponse.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseResponse.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseUpdate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseUpdate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseUpdate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseUpdate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseUpdate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseUpdate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseUpdate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerManagedReleaseUpdate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigCreate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigCreate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigCreate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigCreate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigCreate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigCreate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigCreate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigCreate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigResponse.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigResponse.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigResponse.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigResponse.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigResponse.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigResponse.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigResponse.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigResponse.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigUpdate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigUpdate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigUpdate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigUpdate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigUpdate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigUpdate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigUpdate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseConfigUpdate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreateBase.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreateBase.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreateBase.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreateBase.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreateBase.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreateBase.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreateBase.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseCreateBase.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponse.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponse.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponse.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponse.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponse.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponse.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponse.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponse.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponseBase.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponseBase.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponseBase.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponseBase.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponseBase.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponseBase.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponseBase.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseResponseBase.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdateBase.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdateBase.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdateBase.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdateBase.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdateBase.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdateBase.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdateBase.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerReleaseUpdateBase.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerResponse.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerResponse.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerResponse.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerResponse.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerResponse.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerResponse.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerResponse.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerResponse.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerUpdate.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerUpdate.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerUpdate.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerUpdate.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerUpdate.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerUpdate.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerUpdate.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MatchmakerUpdate.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MetricsModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MetricsModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MetricsModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MetricsModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MetricsModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MetricsModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MetricsModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MetricsModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MetricsResponse.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MetricsResponse.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MetricsResponse.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MetricsResponse.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MetricsResponse.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/MetricsResponse.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/MetricsResponse.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/MetricsResponse.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Monitor.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Monitor.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Monitor.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Monitor.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Monitor.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Monitor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Monitor.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Monitor.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/NetworkMetricsModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/NetworkMetricsModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/NetworkMetricsModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/NetworkMetricsModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/NetworkMetricsModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/NetworkMetricsModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/NetworkMetricsModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/NetworkMetricsModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Pagination.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Pagination.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Pagination.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Pagination.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Pagination.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Pagination.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Pagination.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Pagination.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Paginator.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Paginator.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Paginator.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Paginator.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Paginator.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Paginator.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Paginator.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Paginator.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/PatchSessionModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/PatchSessionModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/PatchSessionModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/PatchSessionModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/PatchSessionModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/PatchSessionModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/PatchSessionModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/PatchSessionModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/PortMapping.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/PortMapping.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/PortMapping.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/PortMapping.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/PortMapping.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/PortMapping.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/PortMapping.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/PortMapping.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Request.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Request.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Request.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Request.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Request.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Request.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Request.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Request.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SelectorEnvModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SelectorEnvModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SelectorEnvModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SelectorEnvModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SelectorEnvModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SelectorEnvModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SelectorEnvModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SelectorEnvModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SelectorModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SelectorModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SelectorModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SelectorModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SelectorModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SelectorModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SelectorModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SelectorModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionContext.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionContext.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionContext.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionContext.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionContext.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionContext.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionContext.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionContext.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionDelete.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionDelete.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionDelete.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionDelete.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionDelete.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionDelete.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionDelete.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionDelete.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionGet.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionGet.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionGet.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionGet.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionGet.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionGet.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionGet.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionGet.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionRequest.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionRequest.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionRequest.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionRequest.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionRequest.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionRequest.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionRequest.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionRequest.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionUser.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionUser.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionUser.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionUser.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionUser.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionUser.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionUser.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionUser.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionUserContext.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionUserContext.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionUserContext.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionUserContext.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionUserContext.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionUserContext.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/SessionUserContext.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/SessionUserContext.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Sessions.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Sessions.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Sessions.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Sessions.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Sessions.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Sessions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Sessions.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Sessions.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/StaticSites.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/StaticSites.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/StaticSites.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/StaticSites.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/StaticSites.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/StaticSites.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/StaticSites.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/StaticSites.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/StaticSitesList.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/StaticSitesList.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/StaticSitesList.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/StaticSitesList.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/StaticSitesList.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/StaticSitesList.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/StaticSitesList.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/StaticSitesList.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Status.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Status.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Status.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Status.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Status.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/Status.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/Status.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/Status.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/TotalMetricsModel.cs b/Assets/FishNet/Plugins/Edgegap/Models/SDK/TotalMetricsModel.cs similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/TotalMetricsModel.cs rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/TotalMetricsModel.cs diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/TotalMetricsModel.cs.meta b/Assets/FishNet/Plugins/Edgegap/Models/SDK/TotalMetricsModel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Models/SDK/TotalMetricsModel.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Models/SDK/TotalMetricsModel.cs.meta diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Newtonsoft_Package_Patch.cs b/Assets/FishNet/Plugins/Edgegap/Newtonsoft_Package_Patch.cs similarity index 98% rename from Assets/Packages/FishNet/Plugins/Edgegap/Newtonsoft_Package_Patch.cs rename to Assets/FishNet/Plugins/Edgegap/Newtonsoft_Package_Patch.cs index 5ad72dc..c9197e6 100644 --- a/Assets/Packages/FishNet/Plugins/Edgegap/Newtonsoft_Package_Patch.cs +++ b/Assets/FishNet/Plugins/Edgegap/Newtonsoft_Package_Patch.cs @@ -18,7 +18,7 @@ internal static void ResetWarnTime() [InitializeOnLoadMethod] private static void Initialize() - { + { string dtStr = EditorPrefs.GetString(WARN_TIME_NAME, string.Empty); //Somehow got cleared. Reset. if (string.IsNullOrWhiteSpace(dtStr)) @@ -43,12 +43,13 @@ private static void Initialize() } + ResetWarnTime(); UnityEngine.Debug.LogWarning($"Edgegap requires Json.NET to be imported to function. To import Json.NET navigate to Window -> Package Manager -> Click the + symbol and choose 'Add package by name' -> com.unity.nuget.newtonsoft-json -> Leave version blank and click Add. If you are not currently using Edgegap you may ignore this message."); } } } #endif - + namespace Newtonsoft.Json { diff --git a/Assets/Packages/FishNet/Plugins/Edgegap/Newtonsoft_Package_Patch.cs.meta b/Assets/FishNet/Plugins/Edgegap/Newtonsoft_Package_Patch.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Plugins/Edgegap/Newtonsoft_Package_Patch.cs.meta rename to Assets/FishNet/Plugins/Edgegap/Newtonsoft_Package_Patch.cs.meta diff --git a/Assets/Packages/FishNet/Runtime.meta b/Assets/FishNet/Runtime.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime.meta rename to Assets/FishNet/Runtime.meta diff --git a/Assets/Packages/FishNet/Runtime/Authenticating.meta b/Assets/FishNet/Runtime/Authenticating.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Authenticating.meta rename to Assets/FishNet/Runtime/Authenticating.meta diff --git a/Assets/Packages/FishNet/Runtime/Authenticating/Authenticator.cs b/Assets/FishNet/Runtime/Authenticating/Authenticator.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Authenticating/Authenticator.cs rename to Assets/FishNet/Runtime/Authenticating/Authenticator.cs diff --git a/Assets/Packages/FishNet/Runtime/Authenticating/Authenticator.cs.meta b/Assets/FishNet/Runtime/Authenticating/Authenticator.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Authenticating/Authenticator.cs.meta rename to Assets/FishNet/Runtime/Authenticating/Authenticator.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Broadcast.meta b/Assets/FishNet/Runtime/Broadcast.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Broadcast.meta rename to Assets/FishNet/Runtime/Broadcast.meta diff --git a/Assets/Packages/FishNet/Runtime/Broadcast/Helping.meta b/Assets/FishNet/Runtime/Broadcast/Helping.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Broadcast/Helping.meta rename to Assets/FishNet/Runtime/Broadcast/Helping.meta diff --git a/Assets/FishNet/Runtime/Broadcast/Helping/BroadcastHelpers.cs b/Assets/FishNet/Runtime/Broadcast/Helping/BroadcastHelpers.cs new file mode 100644 index 0000000..db237cd --- /dev/null +++ b/Assets/FishNet/Runtime/Broadcast/Helping/BroadcastHelpers.cs @@ -0,0 +1,199 @@ +//using FishNet.Connection; //remove on v5 +//using FishNet.Serializing; +//using FishNet.Transporting; +//using GameKit.Dependencies.Utilities; +//using System; +//using System.Collections.Generic; +//using System.Diagnostics; + +//namespace FishNet.Broadcast.Helping +//{ +// internal static class BroadcastHelper +// { +// /// +// /// Gets the key for a broadcast type. +// /// +// /// +// /// +// /// +// internal static ushort GetKey() +// { +// return typeof(T).FullName.GetStableHashU16(); +// } +// } + +// /// +// /// Implemented by server and client broadcast handlers. +// /// +// public abstract class BroadcastHandlerBase +// { +// /// +// /// Current index when iterating invokes. +// /// This value will be -1 when not iterating. +// /// +// protected int IteratingIndex; + +// public abstract void RegisterHandler(object obj); +// public abstract void UnregisterHandler(object obj); +// public virtual void InvokeHandlers(PooledReader reader, Channel channel) { } +// public virtual void InvokeHandlers(NetworkConnection conn, PooledReader reader, Channel channel) { } +// public virtual bool RequireAuthentication => false; +// } + +// /// +// /// Handles broadcasts received on server, from clients. +// /// +// internal class ClientBroadcastHandler : BroadcastHandlerBase +// { +// /// +// /// Action handlers for the broadcast. +// /// +// private List> _handlers = new List>(); +// /// +// /// True to require authentication for the broadcast type. +// /// +// private bool _requireAuthentication; + +// public ClientBroadcastHandler(bool requireAuthentication) +// { +// _requireAuthentication = requireAuthentication; +// } + +// /// +// /// Invokes handlers after reading broadcast. +// /// +// /// True if a rebuild was required. +// public override void InvokeHandlers(NetworkConnection conn, PooledReader reader, Channel channel) +// { +// T result = reader.Read(); +// for (base.IteratingIndex = 0; base.IteratingIndex < _handlers.Count; base.IteratingIndex++) +// { +// Action item = _handlers[base.IteratingIndex]; +// if (item != null) +// { +// item.Invoke(conn, result, channel); +// } +// else +// { +// _handlers.RemoveAt(base.IteratingIndex); +// base.IteratingIndex--; +// } +// } + +// base.IteratingIndex = -1; +// } + +// /// +// /// Adds a handler for this type. +// /// +// public override void RegisterHandler(object obj) +// { +// Action handler = (Action)obj; +// _handlers.AddUnique(handler); +// } + +// /// +// /// Removes a handler from this type. +// /// +// /// +// public override void UnregisterHandler(object obj) +// { +// Action handler = (Action)obj; +// int indexOf = _handlers.IndexOf(handler); +// //Not registered. +// if (indexOf == -1) +// return; + +// /* Has already been iterated over, need to subtract +// * 1 from iteratingIndex to accomodate +// * for the entry about to be removed. */ +// if (base.IteratingIndex >= 0 && (indexOf <= base.IteratingIndex)) +// base.IteratingIndex--; + +// //Remove entry. +// _handlers.RemoveAt(indexOf); +// } + +// /// +// /// True to require authentication for the broadcast type. +// /// +// public override bool RequireAuthentication => _requireAuthentication; +// } + + + +// /// +// /// Handles broadcasts received on client, from server. +// /// +// internal class ServerBroadcastHandler : BroadcastHandlerBase +// { +// /// +// /// Action handlers for the broadcast. +// /// Even though List lookups are slower this allows easy adding and removing of entries during iteration. +// /// +// private List> _handlers = new List>(); + +// /// +// /// Invokes handlers after reading broadcast. +// /// +// /// True if a rebuild was required. +// public override void InvokeHandlers(PooledReader reader, Channel channel) +// { +// T result = reader.Read(); +// for (base.IteratingIndex = 0; base.IteratingIndex < _handlers.Count; base.IteratingIndex++) +// { +// Action item = _handlers[base.IteratingIndex]; +// if (item != null) +// { +// item.Invoke(result, channel); +// } +// else +// { +// _handlers.RemoveAt(base.IteratingIndex); +// base.IteratingIndex--; +// } +// } + +// base.IteratingIndex = -1; +// } + +// /// +// /// Adds a handler for this type. +// /// +// public override void RegisterHandler(object obj) +// { +// Action handler = (Action)obj; +// _handlers.AddUnique(handler); +// } + +// /// +// /// Removes a handler from this type. +// /// +// /// +// public override void UnregisterHandler(object obj) +// { +// Action handler = (Action)obj; +// int indexOf = _handlers.IndexOf(handler); +// //Not registered. +// if (indexOf == -1) +// return; + +// /* Has already been iterated over, need to subtract +// * 1 from iteratingIndex to accomodate +// * for the entry about to be removed. */ +// if (base.IteratingIndex >= 0 && (indexOf <= base.IteratingIndex)) +// base.IteratingIndex--; + +// //Remove entry. +// _handlers.RemoveAt(indexOf); +// } + +// /// +// /// True to require authentication for the broadcast type. +// /// +// public override bool RequireAuthentication => false; +// } + + + +//} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Broadcast/Helping/BroadcastHelpers.cs.meta b/Assets/FishNet/Runtime/Broadcast/Helping/BroadcastHelpers.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Broadcast/Helping/BroadcastHelpers.cs.meta rename to Assets/FishNet/Runtime/Broadcast/Helping/BroadcastHelpers.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Broadcast/IBroadcast.cs b/Assets/FishNet/Runtime/Broadcast/IBroadcast.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Broadcast/IBroadcast.cs rename to Assets/FishNet/Runtime/Broadcast/IBroadcast.cs diff --git a/Assets/Packages/FishNet/Runtime/Broadcast/IBroadcast.cs.meta b/Assets/FishNet/Runtime/Broadcast/IBroadcast.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Broadcast/IBroadcast.cs.meta rename to Assets/FishNet/Runtime/Broadcast/IBroadcast.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/CodeGenerating.meta b/Assets/FishNet/Runtime/CodeGenerating.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/CodeGenerating.meta rename to Assets/FishNet/Runtime/CodeGenerating.meta diff --git a/Assets/Packages/FishNet/Runtime/CodeGenerating/Attributes.cs b/Assets/FishNet/Runtime/CodeGenerating/Attributes.cs similarity index 75% rename from Assets/Packages/FishNet/Runtime/CodeGenerating/Attributes.cs rename to Assets/FishNet/Runtime/CodeGenerating/Attributes.cs index d4e8c26..6f3e9a0 100644 --- a/Assets/Packages/FishNet/Runtime/CodeGenerating/Attributes.cs +++ b/Assets/FishNet/Runtime/CodeGenerating/Attributes.cs @@ -25,4 +25,9 @@ internal class MakePublicAttribute : Attribute { } /// Method is a comparer for a value type. /// public class CustomComparerAttribute : Attribute { } + /// + /// Used on a type when you want a custom serializer to be global across all assemblies. + /// + [AttributeUsage((AttributeTargets.Class | AttributeTargets.Struct), Inherited = true, AllowMultiple = false)] + public class UseGlobalCustomSerializerAttribute : Attribute { } } \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/CodeGenerating/Attributes.cs.meta b/Assets/FishNet/Runtime/CodeGenerating/Attributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/CodeGenerating/Attributes.cs.meta rename to Assets/FishNet/Runtime/CodeGenerating/Attributes.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Config.json b/Assets/FishNet/Runtime/Config.json similarity index 100% rename from Assets/Packages/FishNet/Runtime/Config.json rename to Assets/FishNet/Runtime/Config.json diff --git a/Assets/Packages/FishNet/Runtime/Config.json.meta b/Assets/FishNet/Runtime/Config.json.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Config.json.meta rename to Assets/FishNet/Runtime/Config.json.meta diff --git a/Assets/Packages/FishNet/Runtime/Connection.meta b/Assets/FishNet/Runtime/Connection.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection.meta rename to Assets/FishNet/Runtime/Connection.meta diff --git a/Assets/Packages/FishNet/Runtime/Connection/Buffer.cs b/Assets/FishNet/Runtime/Connection/Buffer.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Connection/Buffer.cs rename to Assets/FishNet/Runtime/Connection/Buffer.cs index 0c3b563..61d0892 100644 --- a/Assets/Packages/FishNet/Runtime/Connection/Buffer.cs +++ b/Assets/FishNet/Runtime/Connection/Buffer.cs @@ -147,7 +147,7 @@ internal PacketBundle(NetworkManager manager, int mtu, int reserve = 0, DataOrde * Modify reserve after making sendLast bundle * so that the wrong reserve is not passed into * the sendLast bundle. */ - reserve += TransportManager.TICK_BYTES; + reserve += TransportManager.UNPACKED_TICK_LENGTH; _reserve = reserve; //Add buffer requires the right reserve so call after setting. AddBuffer(); diff --git a/Assets/Packages/FishNet/Runtime/Connection/Buffer.cs.meta b/Assets/FishNet/Runtime/Connection/Buffer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/Buffer.cs.meta rename to Assets/FishNet/Runtime/Connection/Buffer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Connection/EstimatedTick.cs b/Assets/FishNet/Runtime/Connection/EstimatedTick.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/EstimatedTick.cs rename to Assets/FishNet/Runtime/Connection/EstimatedTick.cs diff --git a/Assets/Packages/FishNet/Runtime/Connection/EstimatedTick.cs.meta b/Assets/FishNet/Runtime/Connection/EstimatedTick.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/EstimatedTick.cs.meta rename to Assets/FishNet/Runtime/Connection/EstimatedTick.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs b/Assets/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs rename to Assets/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs.meta b/Assets/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs.meta rename to Assets/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.LOD.cs b/Assets/FishNet/Runtime/Connection/NetworkConnection.LOD.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.LOD.cs rename to Assets/FishNet/Runtime/Connection/NetworkConnection.LOD.cs diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.LOD.cs.meta b/Assets/FishNet/Runtime/Connection/NetworkConnection.LOD.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.LOD.cs.meta rename to Assets/FishNet/Runtime/Connection/NetworkConnection.LOD.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Observers.cs b/Assets/FishNet/Runtime/Connection/NetworkConnection.Observers.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Observers.cs rename to Assets/FishNet/Runtime/Connection/NetworkConnection.Observers.cs diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Observers.cs.meta b/Assets/FishNet/Runtime/Connection/NetworkConnection.Observers.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Observers.cs.meta rename to Assets/FishNet/Runtime/Connection/NetworkConnection.Observers.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.PingPong.cs b/Assets/FishNet/Runtime/Connection/NetworkConnection.PingPong.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.PingPong.cs rename to Assets/FishNet/Runtime/Connection/NetworkConnection.PingPong.cs diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.PingPong.cs.meta b/Assets/FishNet/Runtime/Connection/NetworkConnection.PingPong.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.PingPong.cs.meta rename to Assets/FishNet/Runtime/Connection/NetworkConnection.PingPong.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Prediction.cs b/Assets/FishNet/Runtime/Connection/NetworkConnection.Prediction.cs similarity index 70% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Prediction.cs rename to Assets/FishNet/Runtime/Connection/NetworkConnection.Prediction.cs index 4f10511..bead439 100644 --- a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Prediction.cs +++ b/Assets/FishNet/Runtime/Connection/NetworkConnection.Prediction.cs @@ -1,6 +1,7 @@ using FishNet.Managing; using FishNet.Managing.Predicting; using FishNet.Managing.Timing; +using FishNet.Managing.Transporting; using FishNet.Serializing; using FishNet.Transporting; using System.Collections.Generic; @@ -17,7 +18,7 @@ public partial class NetworkConnection { internal void Prediction_Initialize(NetworkManager manager, bool asServer) { } -#if !PREDICTION_V2 +#if PREDICTION_1 /// /// Local tick when the connection last replicated. /// @@ -51,24 +52,39 @@ internal void WriteState(PooledWriter data) return; #endif - TimeManager tm = NetworkManager.TimeManager; - uint ticksBehind = (IsLocalClient) ? 0 : PacketTick.LocalTickDifference(tm); + TimeManager timeManager = NetworkManager.TimeManager; + TransportManager transportManager = NetworkManager.TransportManager; + uint ticksBehind = (IsLocalClient) ? 0 : PacketTick.LocalTickDifference(timeManager); /* If it's been a really long while the client could just be setting up * or dropping. Only send if they've communicated within 5 seconds. */ - if (ticksBehind > (tm.TickRate * 5)) + if (ticksBehind > (timeManager.TickRate * 5)) return; - int mtu = NetworkManager.TransportManager.GetLowestMTU((byte)Channel.Unreliable); + int mtu = transportManager.GetLowestMTU((byte)Channel.Unreliable); PooledWriter stateWriter; int writerCount = PredictionStateWriters.Count; /* Conditions to create a new writer are: * - writer does not exist yet. * - data length + currentWriter length > mtu */ - if (writerCount == 0 || (data.Length + PredictionStateWriters[writerCount-1].Length) > mtu) + Channel channel = Channel.Unreliable; + if (writerCount > 0) + transportManager.CheckSetReliableChannel((data.Length + PredictionStateWriters[writerCount - 1].Length), ref channel); + /* If no writers or if channel would be forced reliable. + * + * By checking if channel would be reliable this is + * essentially asking if (current written + new data) would + * exceed mtu. When it would get a new writer to try + * and favor unreliable. Emphasis on try, because if some + * really unlikely chance the data was really large it would + * still send on reliable down the line. */ + if (writerCount == 0 || channel == Channel.Reliable) { stateWriter = WriterPool.Retrieve(mtu); - PredictionStateWriters.Add(stateWriter); - stateWriter.Reserve(PredictionManager.STATE_HEADER_RESERVE_COUNT); + PredictionStateWriters.Add(stateWriter); + stateWriter.Reserve(PredictionManager.STATE_HEADER_RESERVE_LENGTH); + /// 2 PacketId. + /// 4 Last replicate tick run for connection. + /// 4 Length unpacked. } else { diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Prediction.cs.meta b/Assets/FishNet/Runtime/Connection/NetworkConnection.Prediction.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.Prediction.cs.meta rename to Assets/FishNet/Runtime/Connection/NetworkConnection.Prediction.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.QOL.cs b/Assets/FishNet/Runtime/Connection/NetworkConnection.QOL.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.QOL.cs rename to Assets/FishNet/Runtime/Connection/NetworkConnection.QOL.cs diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.QOL.cs.meta b/Assets/FishNet/Runtime/Connection/NetworkConnection.QOL.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.QOL.cs.meta rename to Assets/FishNet/Runtime/Connection/NetworkConnection.QOL.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.cs b/Assets/FishNet/Runtime/Connection/NetworkConnection.cs similarity index 95% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.cs rename to Assets/FishNet/Runtime/Connection/NetworkConnection.cs index 351bd0e..54710fa 100644 --- a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.cs +++ b/Assets/FishNet/Runtime/Connection/NetworkConnection.cs @@ -166,6 +166,22 @@ public void SetFirstObject(NetworkObject nob) /// Value used when ClientId has not been set. /// public const int UNSET_CLIENTID_VALUE = -1; + /// + /// Maximum value a ClientId can be. + /// + public const int MAXIMUM_CLIENTID_VALUE = int.MaxValue; + /// + /// Maximum value a ClientId can be excluding simulated value. + /// + public const int MAXIMUM_CLIENTID_WITHOUT_SIMULATED_VALUE = (int.MaxValue - 1); + /// + /// Value to use as a ClientId when simulating a local client without actually using a socket. + /// + public const int SIMULATED_CLIENTID_VALUE = int.MaxValue; + /// + /// Number of bytes to reserve for a connectionId if writing the value uncompressed. + /// + public const int CLIENTID_UNCOMPRESSED_RESERVE_LENGTH = 4; #endregion #region Comparers. diff --git a/Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.cs.meta b/Assets/FishNet/Runtime/Connection/NetworkConnection.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/NetworkConnection.cs.meta rename to Assets/FishNet/Runtime/Connection/NetworkConnection.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Connection/OldTickOption.cs b/Assets/FishNet/Runtime/Connection/OldTickOption.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/OldTickOption.cs rename to Assets/FishNet/Runtime/Connection/OldTickOption.cs diff --git a/Assets/Packages/FishNet/Runtime/Connection/OldTickOption.cs.meta b/Assets/FishNet/Runtime/Connection/OldTickOption.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Connection/OldTickOption.cs.meta rename to Assets/FishNet/Runtime/Connection/OldTickOption.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Documenting.meta b/Assets/FishNet/Runtime/Documenting.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Documenting.meta rename to Assets/FishNet/Runtime/Documenting.meta diff --git a/Assets/Packages/FishNet/Runtime/Documenting/Attributes.cs b/Assets/FishNet/Runtime/Documenting/Attributes.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Documenting/Attributes.cs rename to Assets/FishNet/Runtime/Documenting/Attributes.cs diff --git a/Assets/Packages/FishNet/Runtime/Documenting/Attributes.cs.meta b/Assets/FishNet/Runtime/Documenting/Attributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Documenting/Attributes.cs.meta rename to Assets/FishNet/Runtime/Documenting/Attributes.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor.meta b/Assets/FishNet/Runtime/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor.meta rename to Assets/FishNet/Runtime/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/CodeStripping.cs b/Assets/FishNet/Runtime/Editor/CodeStripping.cs similarity index 55% rename from Assets/Packages/FishNet/Runtime/Editor/CodeStripping.cs rename to Assets/FishNet/Runtime/Editor/CodeStripping.cs index dd303ef..50a7758 100644 --- a/Assets/Packages/FishNet/Runtime/Editor/CodeStripping.cs +++ b/Assets/FishNet/Runtime/Editor/CodeStripping.cs @@ -16,11 +16,7 @@ namespace FishNet.Configuring public class CodeStripping - //PROSTART -#if UNITY_EDITOR - : IPreprocessBuildWithReport, IPostprocessBuildWithReport -#endif - //PROEND + { /// @@ -39,40 +35,7 @@ public static bool RemoveServerLogic { get { - //PROSTART - if (!StripBuild) - return false; - //Cannot remove server code if headless. - if (Configuration.Configurations.CodeStripping.IsHeadless) - return false; - - return true; - //PROSTART - - /* This is to protect non pro users from enabling this - * without the extra logic code. */ -#pragma warning disable CS0162 // Unreachable code detected - return false; -#pragma warning restore CS0162 // Unreachable code detected - } - } - /// - /// Returns if to remove server logic. - /// - /// - public static bool RemoveClientLogic - { - get - { - //PROSTART - if (!StripBuild) - return false; - //Cannot remove server code if headless. - if (!Configuration.Configurations.CodeStripping.IsHeadless) - return false; - - return true; - //PROEND + /* This is to protect non pro users from enabling this * without the extra logic code. */ @@ -88,16 +51,7 @@ public static bool StripBuild { get { - //PROSTART - if (!Configuration.Configurations.CodeStripping.IsBuilding || Configuration.Configurations.CodeStripping.IsDevelopment) - return false; - //Stripping isn't enabled. - if (!Configuration.Configurations.CodeStripping.StripReleaseBuilds) - return false; - - //Fall through. - return true; - //PROEND + /* This is to protect non pro users from enabling this * without the extra logic code. */ @@ -121,21 +75,7 @@ public void OnPreprocessBuild(BuildReport report) CompilationPipeline.compilationStarted += CompilationPipelineOnCompilationStarted; CompilationPipeline.compilationFinished += CompilationPipelineOnCompilationFinished; - //PROSTART - //Set building values. - Configuration.Configurations.CodeStripping.IsBuilding = true; - - BuildOptions options = report.summary.options; -#if UNITY_2021_2_OR_NEWER && !UNITY_ANDROID && !UNITY_IPHONE && !UNITY_WEBGL && !UNITY_WSA - Configuration.Configurations.CodeStripping.IsHeadless = (report.summary.GetSubtarget() == StandaloneBuildSubtarget.Server); -#else - Configuration.Configurations.CodeStripping.IsHeadless = options.HasFlag(BuildOptions.EnableHeadlessMode); -#endif - Configuration.Configurations.CodeStripping.IsDevelopment = options.HasFlag(BuildOptions.Development); - - //Write to file. - Configuration.Configurations.Write(false); - //PROEND + } /* Solution for builds ending with errors and not triggering OnPostprocessBuild. * Link: https://gamedev.stackexchange.com/questions/181611/custom-build-failure-callback @@ -160,23 +100,14 @@ private void CompilationPipelineOnCompilationFinished(object compilationContext) private void BuildingEnded() { - //PROSTART - //Set building values. - Configuration.Configurations.CodeStripping.IsBuilding = false; - Configuration.Configurations.CodeStripping.IsHeadless = false; - Configuration.Configurations.CodeStripping.IsDevelopment = false; - //Write to file. - Configuration.Configurations.Write(false); - //PROEND + Generator.IgnorePostProcess = false; } public void OnPostprocessBuild(BuildReport report) { - //PROSTART - if (Configuration.Configurations.CodeStripping.IsBuilding) - //PROEND + BuildingEnded(); } } diff --git a/Assets/Packages/FishNet/Runtime/Editor/CodeStripping.cs.meta b/Assets/FishNet/Runtime/Editor/CodeStripping.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/CodeStripping.cs.meta rename to Assets/FishNet/Runtime/Editor/CodeStripping.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring.meta b/Assets/FishNet/Runtime/Editor/Configuring.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring.meta rename to Assets/FishNet/Runtime/Editor/Configuring.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring/ConfigurationData.cs b/Assets/FishNet/Runtime/Editor/Configuring/ConfigurationData.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring/ConfigurationData.cs rename to Assets/FishNet/Runtime/Editor/Configuring/ConfigurationData.cs diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring/ConfigurationData.cs.meta b/Assets/FishNet/Runtime/Editor/Configuring/ConfigurationData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring/ConfigurationData.cs.meta rename to Assets/FishNet/Runtime/Editor/Configuring/ConfigurationData.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs b/Assets/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs similarity index 90% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs rename to Assets/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs index 7eed38e..41ece8f 100644 --- a/Assets/Packages/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs +++ b/Assets/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs @@ -26,7 +26,7 @@ public class DeveloperMenu : MonoBehaviour { #region const. private const string STABLE_DEFINE = "FISHNET_STABLE_MODE"; - private const string PREDICTIONV2_DEFINE = "PREDICTION_V2"; + private const string PREDICTION_1_DEFINE = "PREDICTION_1"; private const string QOL_ATTRIBUTES_DEFINE = "DISABLE_QOL_ATTRIBUTES"; private const string DEVELOPER_ONLY_WARNING = "If you are not a developer or were not instructed to do this by a developer things are likely to break. You have been warned."; #endregion @@ -54,28 +54,31 @@ private static void SwitchToBeta() #endregion #region PredictionV2. -#if !PREDICTION_V2 - [MenuItem("Fish-Networking/Experimental/PredictionV2/Enable", false, -999)] +#if PREDICTION_1 + [MenuItem("Fish-Networking/Utility/Prediction/Switch To Prediction 2", false, -998)] private static void EnablePredictionV2() { - bool result = RemoveOrAddDefine(PREDICTIONV2_DEFINE, false); + bool result = RemoveOrAddDefine(PREDICTION_1_DEFINE, true); if (result) - Debug.LogWarning($"PredictionV2 has been enabled. {DEVELOPER_ONLY_WARNING}"); + Debug.Log("Prediction 2 has been enabled."); } #else - [MenuItem("Fish-Networking/Experimental/PredictionV2/Disable", false, -998)] + [MenuItem("Fish-Networking/Utility/Prediction/Switch To Prediction 1", false, -998)] private static void DisablePredictionV2() { - bool result = RemoveOrAddDefine(PREDICTIONV2_DEFINE, true); + bool result = RemoveOrAddDefine(PREDICTION_1_DEFINE, false); if (result) - Debug.Log("PredictionV2 has been disabled."); + { + Debug.Log("Prediction 1 has been enabled."); + Debug.LogWarning($"Please note that Prediction 1 is no longer supported and will be removed in FishNet 5."); + } } #endif #endregion #region QOL Attributes #if DISABLE_QOL_ATTRIBUTES - [MenuItem("Fish-Networking/Experimental/Quality of Life Attributes/Enable", false, -999)] + [MenuItem("Fish-Networking/Utility/Quality of Life Attributes/Enable", false, -999)] private static void EnableQOLAttributes() { bool result = RemoveOrAddDefine(QOL_ATTRIBUTES_DEFINE, true); @@ -83,7 +86,7 @@ private static void EnableQOLAttributes() Debug.LogWarning($"Quality of Life Attributes have been enabled."); } #else - [MenuItem("Fish-Networking/Experimental/Quality of Life Attributes/Disable", false, -998)] + [MenuItem("Fish-Networking/Utility/Quality of Life Attributes/Disable", false, -998)] private static void DisableQOLAttributes() { bool result = RemoveOrAddDefine(QOL_ATTRIBUTES_DEFINE, false); diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs.meta b/Assets/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs.meta rename to Assets/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring/Configuring.cs b/Assets/FishNet/Runtime/Editor/Configuring/Configuring.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring/Configuring.cs rename to Assets/FishNet/Runtime/Editor/Configuring/Configuring.cs diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring/Configuring.cs.meta b/Assets/FishNet/Runtime/Editor/Configuring/Configuring.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring/Configuring.cs.meta rename to Assets/FishNet/Runtime/Editor/Configuring/Configuring.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring/FIshNetGettingStartedEditor.cs b/Assets/FishNet/Runtime/Editor/Configuring/FIshNetGettingStartedEditor.cs similarity index 96% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring/FIshNetGettingStartedEditor.cs rename to Assets/FishNet/Runtime/Editor/Configuring/FIshNetGettingStartedEditor.cs index 1d5c29d..fae3bb6 100644 --- a/Assets/Packages/FishNet/Runtime/Editor/Configuring/FIshNetGettingStartedEditor.cs +++ b/Assets/FishNet/Runtime/Editor/Configuring/FIshNetGettingStartedEditor.cs @@ -140,10 +140,10 @@ void OnGUI() Application.OpenURL("https://www.firstgeargames.com/"); } - if (GUILayout.Button("Examples", GUILayout.Width(this.position.width * 0.485f))) - { - Application.OpenURL("https://fish-networking.gitbook.io/docs/manual/tutorials/example-projects"); - } + //if (GUILayout.Button("Examples", GUILayout.Width(this.position.width * 0.485f))) + //{ + // Application.OpenURL("https://fish-networking.gitbook.io/docs/manual/tutorials/example-projects"); + //} EditorGUILayout.EndHorizontal(); //GUILayout.Space(20); diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring/FIshNetGettingStartedEditor.cs.meta b/Assets/FishNet/Runtime/Editor/Configuring/FIshNetGettingStartedEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring/FIshNetGettingStartedEditor.cs.meta rename to Assets/FishNet/Runtime/Editor/Configuring/FIshNetGettingStartedEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring/ReviewReminderEditor.cs b/Assets/FishNet/Runtime/Editor/Configuring/ReviewReminderEditor.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring/ReviewReminderEditor.cs rename to Assets/FishNet/Runtime/Editor/Configuring/ReviewReminderEditor.cs diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring/ReviewReminderEditor.cs.meta b/Assets/FishNet/Runtime/Editor/Configuring/ReviewReminderEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring/ReviewReminderEditor.cs.meta rename to Assets/FishNet/Runtime/Editor/Configuring/ReviewReminderEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring/SettingsProvider.cs b/Assets/FishNet/Runtime/Editor/Configuring/SettingsProvider.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring/SettingsProvider.cs rename to Assets/FishNet/Runtime/Editor/Configuring/SettingsProvider.cs diff --git a/Assets/Packages/FishNet/Runtime/Editor/Configuring/SettingsProvider.cs.meta b/Assets/FishNet/Runtime/Editor/Configuring/SettingsProvider.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Configuring/SettingsProvider.cs.meta rename to Assets/FishNet/Runtime/Editor/Configuring/SettingsProvider.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Constants.cs b/Assets/FishNet/Runtime/Editor/Constants.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Constants.cs rename to Assets/FishNet/Runtime/Editor/Constants.cs diff --git a/Assets/Packages/FishNet/Runtime/Editor/Constants.cs.meta b/Assets/FishNet/Runtime/Editor/Constants.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Constants.cs.meta rename to Assets/FishNet/Runtime/Editor/Constants.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/DefaultPrefabsFinder.cs b/Assets/FishNet/Runtime/Editor/DefaultPrefabsFinder.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/DefaultPrefabsFinder.cs rename to Assets/FishNet/Runtime/Editor/DefaultPrefabsFinder.cs diff --git a/Assets/Packages/FishNet/Runtime/Editor/DefaultPrefabsFinder.cs.meta b/Assets/FishNet/Runtime/Editor/DefaultPrefabsFinder.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/DefaultPrefabsFinder.cs.meta rename to Assets/FishNet/Runtime/Editor/DefaultPrefabsFinder.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Finding.cs b/Assets/FishNet/Runtime/Editor/Finding.cs similarity index 91% rename from Assets/Packages/FishNet/Runtime/Editor/Finding.cs rename to Assets/FishNet/Runtime/Editor/Finding.cs index 4a0a6bc..bcd30af 100644 --- a/Assets/Packages/FishNet/Runtime/Editor/Finding.cs +++ b/Assets/FishNet/Runtime/Editor/Finding.cs @@ -25,7 +25,7 @@ public static class Finding /// Sets FishNet assembly paths. /// /// - private static void SetPaths(bool error) + private static void UpdateFishNetPaths() { if (_fishNetGeneratedPath != string.Empty && _fishNetRuntimePath != string.Empty) return; @@ -51,25 +51,6 @@ private static void SetPaths(bool error) return; } } - /// - /// Gets path for where the FishNet.Runtime assembly is. - /// - /// - public static string GetFishNetRuntimePath(bool error) - { - SetPaths(error); - return _fishNetRuntimePath; - } - /// - /// Gets path for where the FishNet.Generated assembly is. - /// - /// - /// - public static string GetFishNetGeneratedPath(bool error) - { - SetPaths(error); - return _fishNetGeneratedPath; - } /// /// Gets all GameObjects in Assets and optionally scenes. @@ -83,6 +64,8 @@ public static List GetGameObjects(bool userAssemblies, bool fishNetA string[] guids; string[] objectPaths; + UpdateFishNetPaths(); + guids = AssetDatabase.FindAssets("t:GameObject", null); objectPaths = new string[guids.Length]; for (int i = 0; i < guids.Length; i++) diff --git a/Assets/Packages/FishNet/Runtime/Editor/Finding.cs.meta b/Assets/FishNet/Runtime/Editor/Finding.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Finding.cs.meta rename to Assets/FishNet/Runtime/Editor/Finding.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/PlayModeTracker.cs b/Assets/FishNet/Runtime/Editor/PlayModeTracker.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/PlayModeTracker.cs rename to Assets/FishNet/Runtime/Editor/PlayModeTracker.cs diff --git a/Assets/Packages/FishNet/Runtime/Editor/PlayModeTracker.cs.meta b/Assets/FishNet/Runtime/Editor/PlayModeTracker.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/PlayModeTracker.cs.meta rename to Assets/FishNet/Runtime/Editor/PlayModeTracker.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/PrefabCollectionGenerator.meta b/Assets/FishNet/Runtime/Editor/PrefabCollectionGenerator.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/PrefabCollectionGenerator.meta rename to Assets/FishNet/Runtime/Editor/PrefabCollectionGenerator.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/PrefabCollectionGenerator/Generator.cs b/Assets/FishNet/Runtime/Editor/PrefabCollectionGenerator/Generator.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/PrefabCollectionGenerator/Generator.cs rename to Assets/FishNet/Runtime/Editor/PrefabCollectionGenerator/Generator.cs diff --git a/Assets/Packages/FishNet/Runtime/Editor/PrefabCollectionGenerator/Generator.cs.meta b/Assets/FishNet/Runtime/Editor/PrefabCollectionGenerator/Generator.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/PrefabCollectionGenerator/Generator.cs.meta rename to Assets/FishNet/Runtime/Editor/PrefabCollectionGenerator/Generator.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/PrefabCollectionGenerator/SettingsProvider.cs b/Assets/FishNet/Runtime/Editor/PrefabCollectionGenerator/SettingsProvider.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/PrefabCollectionGenerator/SettingsProvider.cs rename to Assets/FishNet/Runtime/Editor/PrefabCollectionGenerator/SettingsProvider.cs diff --git a/Assets/Packages/FishNet/Runtime/Editor/PrefabCollectionGenerator/SettingsProvider.cs.meta b/Assets/FishNet/Runtime/Editor/PrefabCollectionGenerator/SettingsProvider.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/PrefabCollectionGenerator/SettingsProvider.cs.meta rename to Assets/FishNet/Runtime/Editor/PrefabCollectionGenerator/SettingsProvider.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/ScriptingDefines.cs b/Assets/FishNet/Runtime/Editor/ScriptingDefines.cs similarity index 96% rename from Assets/Packages/FishNet/Runtime/Editor/ScriptingDefines.cs rename to Assets/FishNet/Runtime/Editor/ScriptingDefines.cs index fe46d88..f2d7cc8 100644 --- a/Assets/Packages/FishNet/Runtime/Editor/ScriptingDefines.cs +++ b/Assets/FishNet/Runtime/Editor/ScriptingDefines.cs @@ -46,9 +46,7 @@ public static void AddDefineSymbols() { "FISHNET", thisVersion, - //PROSTART - proDefine, - //PROEND + }; bool modified = false; //Now add FN defines. @@ -57,9 +55,7 @@ public static void AddDefineSymbols() /* Remove pro define if not on pro. This might look a little * funny because the code below varies depending on if pro or not. */ - //PROSTART - if (1 == 2) - //PROEND + #pragma warning disable CS0162 // Unreachable code detected modified |= definesHs.Remove(proDefine); #pragma warning restore CS0162 // Unreachable code detected diff --git a/Assets/Packages/FishNet/Runtime/Editor/ScriptingDefines.cs.meta b/Assets/FishNet/Runtime/Editor/ScriptingDefines.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/ScriptingDefines.cs.meta rename to Assets/FishNet/Runtime/Editor/ScriptingDefines.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures.meta b/Assets/FishNet/Runtime/Editor/Textures.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures.meta rename to Assets/FishNet/Runtime/Editor/Textures.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures/Icon.meta b/Assets/FishNet/Runtime/Editor/Textures/Icon.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures/Icon.meta rename to Assets/FishNet/Runtime/Editor/Textures/Icon.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures/Icon/fishnet_light.png b/Assets/FishNet/Runtime/Editor/Textures/Icon/fishnet_light.png similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures/Icon/fishnet_light.png rename to Assets/FishNet/Runtime/Editor/Textures/Icon/fishnet_light.png diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures/Icon/fishnet_light.png.meta b/Assets/FishNet/Runtime/Editor/Textures/Icon/fishnet_light.png.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures/Icon/fishnet_light.png.meta rename to Assets/FishNet/Runtime/Editor/Textures/Icon/fishnet_light.png.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures/UI.meta b/Assets/FishNet/Runtime/Editor/Textures/UI.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures/UI.meta rename to Assets/FishNet/Runtime/Editor/Textures/UI.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Client_Background.png b/Assets/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Client_Background.png similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Client_Background.png rename to Assets/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Client_Background.png diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Client_Background.png.meta b/Assets/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Client_Background.png.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Client_Background.png.meta rename to Assets/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Client_Background.png.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Indicator.png b/Assets/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Indicator.png similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Indicator.png rename to Assets/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Indicator.png diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Indicator.png.meta b/Assets/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Indicator.png.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Indicator.png.meta rename to Assets/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Indicator.png.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Server_Background.png b/Assets/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Server_Background.png similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Server_Background.png rename to Assets/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Server_Background.png diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Server_Background.png.meta b/Assets/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Server_Background.png.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Server_Background.png.meta rename to Assets/FishNet/Runtime/Editor/Textures/UI/Button_Dark_Server_Background.png.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Logo_With_Text.png b/Assets/FishNet/Runtime/Editor/Textures/UI/Logo_With_Text.png similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Logo_With_Text.png rename to Assets/FishNet/Runtime/Editor/Textures/UI/Logo_With_Text.png diff --git a/Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Logo_With_Text.png.meta b/Assets/FishNet/Runtime/Editor/Textures/UI/Logo_With_Text.png.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Textures/UI/Logo_With_Text.png.meta rename to Assets/FishNet/Runtime/Editor/Textures/UI/Logo_With_Text.png.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Upgrading.meta b/Assets/FishNet/Runtime/Editor/Upgrading.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Upgrading.meta rename to Assets/FishNet/Runtime/Editor/Upgrading.meta diff --git a/Assets/Packages/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs b/Assets/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs similarity index 82% rename from Assets/Packages/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs rename to Assets/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs index 55a4547..ff5cfa4 100644 --- a/Assets/Packages/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs +++ b/Assets/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs @@ -17,20 +17,20 @@ namespace FishNet.Editing.Upgrading [APIExclude] public class UpgradeFromV3ToV4Menu : MonoBehaviour { - public const string EnabledWarning = "Version 3 to Version 4 upgrade helpers are currently enabled. This will result in longer compile times for code changes. If you are no longer seeing any errors in your console related to upgrading consider disabling this feature in the Fish-Networking menu, under Upgrading."; + public const string EnabledWarning = "FishNet 3 to FishNet 4 upgrade helpers are currently enabled. This will result in longer compile times for code changes. If you are no longer seeing any errors in your console related to upgrading consider disabling this feature in the Fish-Networking menu, Utility, Upgrading."; private const string DISABLE_V3TOV4_HELPERS_DEFINE = "FISHNET_DISABLE_V3TOV4_HELPERS"; #if !FISHNET_DISABLE_V3TOV4_HELPERS - [MenuItem("Fish-Networking/Upgrading/From V3 to V4/Disable Helpers", false, -1100)] - private static void DisableV3ToV4Helpers() + [MenuItem("Fish-Networking/Utility/Upgrading/FishNet 3 to FishNet 4/Disable Helpers", false, -1100)] + private static void Disable3To4Helpers() { bool result = RemoveOrAddDefine(DISABLE_V3TOV4_HELPERS_DEFINE, false); if (result) Debug.LogWarning($"Version 3 to Version 4 migration helpers have been disabled."); } #else - [MenuItem("Fish-Networking/Upgrading/From V3 to V4/Enable Helpers", false, -1100)] - private static void DisableV3ToV4Helpers() + [MenuItem("Fish-Networking/Utility/Upgrading/FishNet 3 to FishNet 4/Enable Helpers", false, -1100)] + private static void Enable3To4Helpers() { bool result = RemoveOrAddDefine(DISABLE_V3TOV4_HELPERS_DEFINE, true); if (result) diff --git a/Assets/Packages/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs.meta b/Assets/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs.meta rename to Assets/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/FishNet.Runtime.asmdef b/Assets/FishNet/Runtime/FishNet.Runtime.asmdef similarity index 100% rename from Assets/Packages/FishNet/Runtime/FishNet.Runtime.asmdef rename to Assets/FishNet/Runtime/FishNet.Runtime.asmdef diff --git a/Assets/Packages/FishNet/Runtime/FishNet.Runtime.asmdef.meta b/Assets/FishNet/Runtime/FishNet.Runtime.asmdef.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/FishNet.Runtime.asmdef.meta rename to Assets/FishNet/Runtime/FishNet.Runtime.asmdef.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated.meta b/Assets/FishNet/Runtime/Generated.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated.meta rename to Assets/FishNet/Runtime/Generated.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component.meta b/Assets/FishNet/Runtime/Generated/Component.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component.meta rename to Assets/FishNet/Runtime/Generated/Component.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator.meta b/Assets/FishNet/Runtime/Generated/Component/NetworkAnimator.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator.meta rename to Assets/FishNet/Runtime/Generated/Component/NetworkAnimator.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor.meta b/Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor.meta rename to Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor/NetworkAnimatorEditor.cs b/Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor/NetworkAnimatorEditor.cs similarity index 97% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor/NetworkAnimatorEditor.cs rename to Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor/NetworkAnimatorEditor.cs index 0ea5cd3..f171a2b 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor/NetworkAnimatorEditor.cs +++ b/Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor/NetworkAnimatorEditor.cs @@ -41,11 +41,7 @@ public override void OnInspectorGUI() EditorGUILayout.ObjectField("Script:", MonoScript.FromMonoBehaviour(na), typeof(NetworkAnimator), false); GUI.enabled = true; - //PROSTART - if (1 == 1) - EditorGUILayout.HelpBox(EditingConstants.PRO_ASSETS_UNLOCKED_TEXT, MessageType.None); - else - //PROEND + #pragma warning disable CS0162 // Unreachable code detected EditorGUILayout.HelpBox(EditingConstants.PRO_ASSETS_LOCKED_TEXT, MessageType.Warning); #pragma warning restore CS0162 // Unreachable code detected diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor/NetworkAnimatorEditor.cs.meta b/Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor/NetworkAnimatorEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor/NetworkAnimatorEditor.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/Editor/NetworkAnimatorEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs b/Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs rename to Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs index 867c9d3..8f6f017 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs +++ b/Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs @@ -356,13 +356,24 @@ public ParameterDetail(AnimatorControllerParameter controllerParameter, byte typ /// private List _toClientsBuffer = new List(); /// - /// Returns if the animator is exist and is active. + /// Returns if the animator is exist and is enabled. /// private bool _isAnimatorEnabled { get { - bool failedChecks = (_animator == null || !_animator.enabled || _animator.runtimeAnimatorController == null); + bool failedChecks = (!_isAnimatorValid || !_animator.enabled); + return !failedChecks; + } + } + /// + /// True if the animator is valid but not enabled. + /// + private bool _isAnimatorValid + { + get + { + bool failedChecks = (_animator == null || _animator.runtimeAnimatorController == null); return !failedChecks; } } @@ -615,12 +626,7 @@ private void InitializeOnce() foreach (AnimatorControllerParameter item in _animator.parameters) { bool process = !_animator.IsParameterControlledByCurve(item.name); - //PROSTART - /* This is done in a weird way for processing - * to work with the pro tool stripper. */ - if (IgnoredParameters.Contains(item.name)) - process = false; - //PROEND + if (process) { //Over 250 parameters; who would do this!? diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs.meta b/Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform.meta b/Assets/FishNet/Runtime/Generated/Component/NetworkTransform.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform.meta rename to Assets/FishNet/Runtime/Generated/Component/NetworkTransform.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/Editor.meta b/Assets/FishNet/Runtime/Generated/Component/NetworkTransform/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/Editor.meta rename to Assets/FishNet/Runtime/Generated/Component/NetworkTransform/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/Editor/NetworkTransformEditor.cs b/Assets/FishNet/Runtime/Generated/Component/NetworkTransform/Editor/NetworkTransformEditor.cs similarity index 98% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/Editor/NetworkTransformEditor.cs rename to Assets/FishNet/Runtime/Generated/Component/NetworkTransform/Editor/NetworkTransformEditor.cs index 20052a5..d805731 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/Editor/NetworkTransformEditor.cs +++ b/Assets/FishNet/Runtime/Generated/Component/NetworkTransform/Editor/NetworkTransformEditor.cs @@ -62,9 +62,7 @@ public override void OnInspectorGUI() GameKitEditing.AddObjectField("Script:", MonoScript.FromMonoBehaviour((NetworkTransform)target), typeof(NetworkTransform), false, EditorLayoutEnableType.Disabled); bool isPro = false; - //PROSTART - isPro = true; - //PROEND + if (isPro) EditorGUILayout.HelpBox(EditingConstants.PRO_ASSETS_UNLOCKED_TEXT, MessageType.None); else diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/Editor/NetworkTransformEditor.cs.meta b/Assets/FishNet/Runtime/Generated/Component/NetworkTransform/Editor/NetworkTransformEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/Editor/NetworkTransformEditor.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/NetworkTransform/Editor/NetworkTransformEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/NetworkTransform.cs b/Assets/FishNet/Runtime/Generated/Component/NetworkTransform/NetworkTransform.cs similarity index 95% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/NetworkTransform.cs rename to Assets/FishNet/Runtime/Generated/Component/NetworkTransform/NetworkTransform.cs index 302cc64..5183efb 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/NetworkTransform.cs +++ b/Assets/FishNet/Runtime/Generated/Component/NetworkTransform/NetworkTransform.cs @@ -16,6 +16,7 @@ using UnityEngine; using UnityEngine.Scripting; using UnityEngine.Serialization; +using static FishNet.Object.NetworkObject; namespace FishNet.Component.Transforming { @@ -335,6 +336,10 @@ public void InitializeState() { } /// True if the local client used TakeOwnership and is awaiting an ownership change. /// public bool TakenOwnership { get; private set; } + /// + /// NetworkBehaviour this transform is a child of. + /// + public NetworkBehaviour ParentBehaviour { get; private set; } #endregion #region Serialized. @@ -518,10 +523,6 @@ public void SetSendToOwner(bool value) /// private bool _lastReceiveReliable = true; /// - /// NetworkBehaviour this transform is a child of. - /// - private NetworkBehaviour _parentBehaviour; - /// /// Last transform which this object was a child of. /// private Transform _parentTransform; @@ -661,6 +662,8 @@ public override void OnOwnershipServer(NetworkConnection prevOwner) _intervalsRemaining = 0; //Reset last tick since each client sends their own ticks. _lastServerRpcTick = 0; + + TryClearGoalDatas_OwnershipChange(prevOwner, true); } public override void OnOwnershipClient(NetworkConnection prevOwner) @@ -687,17 +690,46 @@ public override void OnOwnershipClient(NetworkConnection prevOwner) if (!base.IsServerInitialized) ChangeTickSubscription(false); } + + TryClearGoalDatas_OwnershipChange(prevOwner, false); + } + + /// + /// Tries to clear the GoalDatas queue during an ownership change. + /// + private void TryClearGoalDatas_OwnershipChange(NetworkConnection prevOwner, bool asServer) + { + if (_clientAuthoritative) + { + //If not server + if (!asServer) + { + //If owner now then clear as the owner controls the object now and shouldnt use past datas. + if (base.IsOwner) + _goalDataQueue.Clear(); + } + //as Server. + else + { + //If new owner is valid then clear to allow new owner datas. + if (base.Owner.IsValid) + _goalDataQueue.Clear(); + } + } + /* Server authoritative never clears because the + * clients do not control this object thus should always + * follow the queue. */ } public override void OnStopNetwork() { - ResetState(false); + ResetState(); } /// /// Deinitializes this component. /// - private void ResetState(bool destroyed) + private void ResetState() { ChangeTickSubscription(false); /* Reset server and client side since this is called from @@ -1066,7 +1098,7 @@ private void SetDefaultGoalData() else { _parentTransform = transform.parent; - _parentBehaviour = parentBehaviour; + ParentBehaviour = parentBehaviour; } } } @@ -1265,10 +1297,10 @@ private void SerializeChanged(ChangedDelta changed, PooledWriter writer, byte lo } //Childed. - if (ChangedContains(changed, ChangedDelta.Childed) && _parentBehaviour != null) + if (ChangedContains(changed, ChangedDelta.Childed) && ParentBehaviour != null) { flagsB |= UpdateFlagB.Child; - writer.WriteNetworkBehaviour(_parentBehaviour); + writer.WriteNetworkBehaviour(ParentBehaviour); } writer.FastInsertByte((byte)flagsB, startIndexB); @@ -1427,7 +1459,7 @@ private void UpdateParentBehaviour() if (base.NetworkObject.RuntimeParentNetworkBehaviour != null) Debug.LogWarning($"{gameObject.name} parent object was removed without calling UnsetParent. Use networkObject.UnsetParent() to remove a NetworkObject from it's parent. This is being made a requirement in Fish-Networking v4."); - _parentBehaviour = null; + ParentBehaviour = null; _parentTransform = null; } //Has a parent, see if eligible. @@ -1438,15 +1470,18 @@ private void UpdateParentBehaviour() return; _parentTransform = parent; - parent.TryGetComponent(out _parentBehaviour); - if (_parentBehaviour == null) + NetworkBehaviour outParentBehaviour; + + if (!parent.TryGetComponent(out outParentBehaviour)) { + ParentBehaviour = null; LogInvalidParent(); } else { + ParentBehaviour = outParentBehaviour; //Check for being set without using nob.SetParent. - if (base.NetworkObject.CurrentParentNetworkBehaviour != _parentBehaviour) + if (base.NetworkObject.CurrentParentNetworkBehaviour != ParentBehaviour) Debug.LogWarning($"{gameObject.name} parent was set without calling SetParent. Use networkObject.SetParent(obj) to assign a NetworkObject a new parent. This is being made a requirement in Fish-Networking v4."); } } @@ -1582,27 +1617,7 @@ private void MoveToTarget(float deltaOverride = -1f) //No more in buffer, see if can extrapolate. else { - //PROSTART - //Can extrapolate. - if (td.ExtrapolationState == TransformData.ExtrapolateState.Available) - { - rd.TimeRemaining = (float)(_extrapolation * base.TimeManager.TickDelta); - td.ExtrapolationState = TransformData.ExtrapolateState.Active; - if (leftOver > 0f) - MoveToTarget(leftOver); - } - //Ran out of extrapolate. - else if (td.ExtrapolationState == TransformData.ExtrapolateState.Active) - { - rd.TimeRemaining = (float)(_extrapolation * base.TimeManager.TickDelta); - td.ExtrapolationState = TransformData.ExtrapolateState.Disabled; - if (leftOver > 0f) - MoveToTarget(leftOver); - } - //Extrapolation has ended or was never enabled. - else - { - //PROEND + /* If everything matches up then end queue. * Otherwise let it play out until stuff * aligns. Generally the time remaining is enough @@ -1611,9 +1626,7 @@ private void MoveToTarget(float deltaOverride = -1f) if (!HasChanged(td)) _currentGoalData = null; OnInterpolationComplete?.Invoke(); - //PROSTART - } - //PROEND + } } @@ -1679,7 +1692,7 @@ private void SendToClients(byte lodIndex) Transform t = transform; /* If here a send for transform values will occur. Update last values. * Tick doesn't need to be set for whoever controls transform. */ - lastSentData.Update(0, t.localPosition, t.localRotation, t.localScale, t.localPosition, _parentBehaviour); + lastSentData.Update(0, t.localPosition, t.localRotation, t.localScale, t.localPosition, ParentBehaviour); SerializeChanged(changed, writer, lodIndex); } @@ -1697,37 +1710,7 @@ private void SendToClients(byte lodIndex) //If to not send to owner. if (!_sendToOwner && nc == base.Owner) continue; - //PROSTART - if (useLod) - { - NetworkConnection.LevelOfDetailData cachedLod; - //LOD not found. - if (!nc.LevelOfDetails.TryGetValue(base.NetworkObject, out cachedLod)) - { - /* If not found do not check skips. This means LOD - * has not been set. When LOD is not set the client - * is to receive updates at regular intervals. */ - } - //If LOD was found check if lodIndex has been met. - else - { - /* If neither current nor previous LOD meet - * the index then skip sending data. When index - * is current reset previous lod. This ensures that when - * LODs increase the previous LOD will send until on - * the increased index. By doing so there will be no unexpected - * receive delays. When going down in index this is not required - * because the new index will send faster than the old and the - * client will receive data before the buffer runs out. */ - if (cachedLod.PreviousLevelOfDetail > lodIndex && cachedLod.CurrentLevelOfDetail > lodIndex) - continue; - /* If currentLevelOfDetail is the same as index then a full cycle - * has been met and previousLod can be updated to current. */ - if (lodIndex >= cachedLod.CurrentLevelOfDetail) - cachedLod.PreviousLevelOfDetail = cachedLod.CurrentLevelOfDetail; - } - } - //PROEND + //No need for server to send to local client (clientHost). //Still send if development for stat tracking. #if !DEVELOPMENT @@ -1784,7 +1767,7 @@ private void SendToServer(TransformData lastSentTransformData) /* If here a send for transform values will occur. Update last values. * Tick doesn't need to be set for whoever controls transform. */ Transform t = transform; - lastSentTransformData.Update(0, t.localPosition, t.localRotation, t.localScale, t.localPosition, _parentBehaviour); + lastSentTransformData.Update(0, t.localPosition, t.localRotation, t.localScale, t.localPosition, ParentBehaviour); //Send latest. PooledWriter writer = WriterPool.Retrieve(); @@ -1896,7 +1879,7 @@ private ChangedDelta GetChanged(ref Vector3 lastPosition, ref Quaternion lastRot changed |= ChangedDelta.ScaleZ; //if (lastParentBehaviour != _parentBehaviour) - if (_parentBehaviour != null) + if (ParentBehaviour != null) changed |= ChangedDelta.Childed; //If added scale or childed then also add extended. @@ -2184,14 +2167,7 @@ private void SetExtrapolation(TransformData prev, TransformData next, Channel ch //Default value. next.ExtrapolationState = TransformData.ExtrapolateState.Disabled; - //PROSTART - if (_extrapolation == 0 || !_synchronizePosition || channel == Channel.Reliable || next.Position == prev.Position) - return; - - Vector3 offet = (next.Position - prev.Position) * _extrapolation; - next.ExtrapolatedPosition = (next.Position + offet); - next.ExtrapolationState = TransformData.ExtrapolateState.Available; - //PROEND + } @@ -2298,7 +2274,6 @@ private void DataReceived(ArraySegment data, Channel channel, bool asServe { SetCalculatedRates(lodIndex, prevTd, prevRd, nextGd, changedFull, hasChanged, channel, asServer); } - prevTd.Update(nextTd); _lastReceiveReliable = (channel == Channel.Reliable); /* If channel is reliable then this is a settled packet. @@ -2427,14 +2402,38 @@ private void UpdateTransformData(ArraySegment packetData, TransformData pr nextTransformData.Tick = base.TimeManager.LastPacketTick.LastRemoteTick; } +#if !PREDICTION_1 /// /// Configures this NetworkTransform for CSP. /// - internal void ConfigureForCSP() + internal void ConfigureForPrediction(PredictionType predictionType) { _clientAuthoritative = false; - if (base.IsServerInitialized) - _sendToOwner = false; + _sendToOwner = false; + + //Do not try to change component configuration if its already specified. + if (_componentConfiguration != ComponentConfigurationType.Disabled) + { + if (predictionType == PredictionType.Rigidbody) + _componentConfiguration = ComponentConfigurationType.Rigidbody; + else if (predictionType == PredictionType.Rigidbody2D) + _componentConfiguration = ComponentConfigurationType.Rigidbody2D; + else if (predictionType == PredictionType.Other) + /* If other or CC then needs to be configured. + * When CC it will be configured properly, if there + * is no CC then no action will be taken. */ + _componentConfiguration = ComponentConfigurationType.CharacterController; + } + ConfigureComponents(); + } +#else + /// + /// Configures this NetworkTransform for CSP. + /// + internal void ConfigureForPrediction() + { + _clientAuthoritative = false; + _sendToOwner = false; /* If other or CC then needs to be configured. * When CC it will be configured properly, if there @@ -2442,7 +2441,7 @@ internal void ConfigureForCSP() _componentConfiguration = ComponentConfigurationType.CharacterController; ConfigureComponents(); } - +#endif /// /// Updates which properties are synchronized. /// diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/NetworkTransform.cs.meta b/Assets/FishNet/Runtime/Generated/Component/NetworkTransform/NetworkTransform.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/NetworkTransform.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/NetworkTransform/NetworkTransform.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/SynchronizedProperty.cs b/Assets/FishNet/Runtime/Generated/Component/NetworkTransform/SynchronizedProperty.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/SynchronizedProperty.cs rename to Assets/FishNet/Runtime/Generated/Component/NetworkTransform/SynchronizedProperty.cs diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/SynchronizedProperty.cs.meta b/Assets/FishNet/Runtime/Generated/Component/NetworkTransform/SynchronizedProperty.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/NetworkTransform/SynchronizedProperty.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/NetworkTransform/SynchronizedProperty.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/Editor.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/Editor.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/Editor/PredictedObjectEditor.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/Editor/PredictedObjectEditor.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/Editor/PredictedObjectEditor.cs rename to Assets/FishNet/Runtime/Generated/Component/Prediction/Editor/PredictedObjectEditor.cs index fd97550..d62f2f6 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/Editor/PredictedObjectEditor.cs +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/Editor/PredictedObjectEditor.cs @@ -11,7 +11,7 @@ namespace FishNet.Component.Prediction [CanEditMultipleObjects] public class PredictedObjectEditor : Editor { -#if !PREDICTION_V2 +#if PREDICTION_1 private SerializedProperty _implementsPredictionMethods; private SerializedProperty _graphicalObject; diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/Editor/PredictedObjectEditor.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/Editor/PredictedObjectEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/Editor/PredictedObjectEditor.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/Editor/PredictedObjectEditor.cs.meta diff --git a/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollider.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollider.cs new file mode 100644 index 0000000..cbe53b8 --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollider.cs @@ -0,0 +1,491 @@ +using FishNet.Managing; +using FishNet.Object; +using GameKit.Dependencies.Utilities; +using GameKit.Dependencies.Utilities.Types; +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using UnityEngine; +using TimeManagerCls = FishNet.Managing.Timing.TimeManager; + +namespace FishNet.Component.Prediction +{ + + public abstract class NetworkCollider : NetworkBehaviour + { +#if !PREDICTION_1 + #region Types. + private struct ColliderData : IResettable + { + /// + /// Tick which the collisions happened. + /// + public uint Tick; + /// + /// Hits for Tick. + /// + public HashSet Hits; + + public ColliderData(uint tick, HashSet hits) + { + Tick = tick; + Hits = hits; + } + + public void InitializeState() { } + public void ResetState() + { + Tick = TimeManagerCls.UNSET_TICK; + CollectionCaches.StoreAndDefault(ref Hits); + } + } + #endregion + + /// + /// Called when another collider enters this collider. + /// + public event Action OnEnter; + /// + /// Called when another collider stays in this collider. + /// + public event Action OnStay; + /// + /// Called when another collider exits this collider. + /// + public event Action OnExit; + /// + /// True to run collisions for colliders which are triggers, false to run collisions for colliders which are not triggers. + /// + [HideInInspector] + protected bool IsTrigger; + /// + /// Maximum number of simultaneous hits to check for. Larger values decrease performance but allow detection to work for more overlapping colliders. Typically the default value of 16 is more than sufficient. + /// + [Tooltip("Maximum number of simultaneous hits to check for. Larger values decrease performance but allow detection to work for more overlapping colliders. Typically the default value of 16 is more than sufficient.")] + [SerializeField] + private ushort _maximumSimultaneousHits = 16; + /// + /// How long of collision history to keep. Lower values will result in marginally better memory usage at the cost of collision histories desynchronizing on clients with excessive latency. + /// + [Tooltip("How long of collision history to keep. Lower values will result in marginally better memory usage at the cost of collision histories desynchronizing on clients with excessive latency.")] + [Range(0.1f, 2f)] + [SerializeField] + private float _historyDuration = 0.5f; + /// + /// Units to extend collision traces by. This is used to prevent missed overlaps when colliders do not intersect enough. + /// + [Tooltip("Units to extend collision traces by. This is used to prevent missed overlaps when colliders do not intersect enough.")] + [Range(0f, 100f)] + [SerializeField] + private float _additionalSize = 0.1f; + + /// + /// The colliders on this object. + /// + private Collider[] _colliders; + /// + /// The hits from the last check. + /// + private Collider[] _hits; + /// + /// The history of collider data. + /// + private ResettableRingBuffer _colliderDataHistory; + /// + /// True if colliders have been searched for at least once. + /// We cannot check the null state on _colliders because Unity has a habit of initializing collections on it's own. + /// + private bool _collidersFound; + /// + /// True to cache collision histories for comparing start and exits. + /// + private bool _useCache => (OnEnter != null || OnExit != null); + /// + /// Last layer of the gameObject. + /// + private int _lastGameObjectLayer = -1; + /// + /// Interactable layers for the layer of this gameObject. + /// + private int _interactableLayers; + + protected virtual void Awake() + { + _colliderDataHistory = ResettableCollectionCaches.RetrieveRingBuffer(); + _hits = CollectionCaches.RetrieveArray(); + if (_hits.Length < _maximumSimultaneousHits) + _hits = new Collider[_maximumSimultaneousHits]; + } + + private void OnDestroy() + { + ResettableCollectionCaches.StoreAndDefault(ref _colliderDataHistory); + CollectionCaches.StoreAndDefault(ref _hits, -_hits.Length); + } + + public override void OnStartNetwork() + { + FindColliders(); + + //Initialize the ringbuffer. Server only needs 1 tick worth of history. + uint historyTicks = (base.IsServerStarted) ? 1 : TimeManager.TimeToTicks(_historyDuration); + _colliderDataHistory.Initialize((int)historyTicks); + + //Events needed by server and client. + TimeManager.OnPostPhysicsSimulation += TimeManager_OnPostPhysicsSimulation; + } + + public override void OnStartClient() + { + //Events only needed by the client. + PredictionManager.OnPostReplicateReplay += PredictionManager_OnPostReplicateReplay; + } + + public override void OnStopClient() + { + //Events only needed by the client. + PredictionManager.OnPostReplicateReplay -= PredictionManager_OnPostReplicateReplay; + + } + + public override void OnStopNetwork() + { + TimeManager.OnPostPhysicsSimulation -= TimeManager_OnPostPhysicsSimulation; + } + + + /// + /// When using TimeManager for physics timing, this is called immediately after the physics simulation has occured for the tick. + /// While using Unity for physics timing, this is called during Update, only if a physics frame. + /// This may be useful if you wish to run physics differently for stacked scenes. + private void TimeManager_OnPostPhysicsSimulation(float delta) + { + CheckColliders(TimeManager.LocalTick, false); + } + + /// + /// Called after physics is simulated when replaying a replicate method. + /// + private void PredictionManager_OnPostReplicateReplay(uint clientTick, uint serverTick) + { + CheckColliders(clientTick, true); + } + + /// + /// Cleans history up to, while excluding tick. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void CleanHistory(uint tick) + { + if (_useCache) + { + int removeCount = 0; + int historyCount = _colliderDataHistory.Count; + for (int i = 0; i < historyCount; i++) + { + if (_colliderDataHistory[i].Tick >= tick) + break; + removeCount++; + } + + for (int i = 0; i < removeCount; i++) + _colliderDataHistory[i].ResetState(); + _colliderDataHistory.RemoveRange(true, removeCount); + } + //Cache is not used. + else + { + ClearColliderDataHistory(); + } + } + + /// + /// Units to extend collision traces by. This is used to prevent missed overlaps when colliders do not intersect enough. + /// + public virtual float GetAdditionalSize() => _additionalSize; + + /// + /// Checks for any trigger changes; + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void CheckColliders(uint tick, bool replay) + { + //Should not be possible as tick always starts on 1. + if (tick == TimeManagerCls.UNSET_TICK) + return; + + const int INVALID_HISTORY_VALUE = -1; + + HashSet current = CollectionCaches.RetrieveHashSet(); + HashSet previous = null; + + int previousHitsIndex = INVALID_HISTORY_VALUE; + /* Server only keeps 1 history so + * if server is started then + * simply clean one. When the server is + * started replay will never be true, so this + * will only call once per tick. */ + if (base.IsServerStarted && tick > 0) + CleanHistory(tick - 1); + + if (_useCache) + { + if (replay) + { + previousHitsIndex = GetHistoryIndex(tick - 1, false); + if (previousHitsIndex != -1) + previous = _colliderDataHistory[previousHitsIndex].Hits; + } + //Not replaying. + else + { + if (_colliderDataHistory.Count > 0) + { + ColliderData cd = _colliderDataHistory[_colliderDataHistory.Count - 1]; + /* If the hit tick one before current then it can be used, otherwise + * use a new collection for previous. */ + if (cd.Tick == (tick - 1)) + previous = cd.Hits; + } + } + } + //Not using history, clear it all. + else + { + ClearColliderDataHistory(); + } + + /* Previous may not be set here if there were + * no collisions during the previous tick. */ + + // The rotation of the object for box colliders. + Quaternion rotation = transform.rotation; + + //If layer changed then get new interactableLayers. + if (_lastGameObjectLayer != gameObject.layer) + { + _lastGameObjectLayer = gameObject.layer; + _interactableLayers = Layers.GetInteractableLayersValue(_lastGameObjectLayer); + } + + // Check each collider for triggers. + foreach (Collider col in _colliders) + { + if (!col.enabled) + continue; + if (IsTrigger != col.isTrigger) + continue; + + //Number of hits from the checks. + int hits; + if (col is SphereCollider sphereCollider) + hits = GetSphereColliderHits(sphereCollider, _interactableLayers); + else if (col is CapsuleCollider capsuleCollider) + hits = GetCapsuleColliderHits(capsuleCollider, _interactableLayers); + else if (col is BoxCollider boxCollider) + hits = GetBoxColliderHits(boxCollider, rotation, _interactableLayers); + else + hits = 0; + + // Check the hits for triggers. + for (int i = 0; i < hits; i++) + { + Collider hit = _hits[i]; + if (hit == null || hit == col) + continue; + + /* If not in previous then add and + * invoke enter. */ + if (previous == null || !previous.Contains(hit)) + OnEnter?.Invoke(hit); + + //Also add to current hits. + current.Add(hit); + OnStay?.Invoke(hit); + } + } + + if (previous != null) + { + //Check for stays and exits. + foreach (Collider col in previous) + { + //If it was in previous but not current, it has exited. + if (!current.Contains(col)) + OnExit?.Invoke(col); + } + } + + //If not using the cache then clean up collections. + if (_useCache) + { + //If not replaying add onto the end. */ + if (!replay) + { + AddToEnd(); + } + /* If a replay then set current colliders + * to one entry past historyIndex. If the next entry + * beyond historyIndex is for the right tick it can be + * updated, otherwise a result has to be inserted. */ + else + { + /* Previous hits was not found in history so we + * cannot assume current results go right after the previousIndex. + * Find whichever index is the closest to tick and return it. + * + * If an exact match is not found for tick then the entry just after + * tick will be returned. This will let us insert current hits right + * before that entry. */ + if (previousHitsIndex == -1) + { + int currentIndex = GetHistoryIndex(tick, true); + AddDataToIndex(currentIndex); + } + //If previous hits are known then the index to update is right after previous index. + else + { + int insertIndex = (previousHitsIndex + 1); + /* InsertIndex is out of bounds which means + * to add onto the end. */ + if (insertIndex >= _colliderDataHistory.Count) + AddToEnd(); + //Not the last entry to insert in the middle. + else + AddDataToIndex(insertIndex); + } + + /* Adds data to an index. If the tick + * matches on index with the current tick then + * replace the entry. Otherwise insert to the + * correct location. */ + void AddDataToIndex(int index) + { + ColliderData colliderData = new ColliderData(tick, current); + /* If insertIndex is the same tick then replace, otherwise + * put in front of. */ + //Replace. + if (_colliderDataHistory[index].Tick == tick) + { + _colliderDataHistory[index].ResetState(); + _colliderDataHistory[index] = colliderData; + } + //Insert before. + else + { + _colliderDataHistory.Insert(index, colliderData); + } + } + } + + void AddToEnd() + { + ColliderData colliderData = new ColliderData(tick, current); + _colliderDataHistory.Add(colliderData); + } + + } + /* If not using caching then store results from this run. */ + else + { + CollectionCaches.Store(current); + } + + //Returns history index for a tick. + /* GetClosest will return the closest match which is + * past lTick if lTick could not be found. */ + int GetHistoryIndex(uint lTick, bool getClosest) + { + for (int i = 0; i < _colliderDataHistory.Count; i++) + { + uint localTick = _colliderDataHistory[i].Tick; + if (localTick == lTick) + return i; + /* Tick is too high, any further results + * will also be too high. */ + if (localTick > tick) + { + if (getClosest) + return i; + else + return INVALID_HISTORY_VALUE; + } + } + + //Fall through. + return INVALID_HISTORY_VALUE; + } + } + + /// + /// Checks for Sphere collisions. + /// + /// Number of colliders hit. + private int GetSphereColliderHits(SphereCollider sphereCollider, int layerMask) + { + sphereCollider.GetSphereOverlapParams(out Vector3 center, out float radius); + radius += GetAdditionalSize(); + return Physics.OverlapSphereNonAlloc(center, radius, _hits, layerMask); + } + + /// + /// Checks for Capsule collisions. + /// + /// Number of colliders hit. + private int GetCapsuleColliderHits(CapsuleCollider capsuleCollider, int layerMask) + { + capsuleCollider.GetCapsuleCastParams(out Vector3 start, out Vector3 end, out float radius); + radius += GetAdditionalSize(); + return Physics.OverlapCapsuleNonAlloc(start, end, radius, _hits, layerMask); + } + + /// + /// Checks for Box collisions. + /// + /// Number of colliders hit. + private int GetBoxColliderHits(BoxCollider boxCollider, Quaternion rotation, int layerMask) + { + + boxCollider.GetBoxOverlapParams(out Vector3 center, out Vector3 halfExtents); + Vector3 additional = (Vector3.one * GetAdditionalSize()); + halfExtents += additional; + return Physics.OverlapBoxNonAlloc(center, halfExtents, _hits, rotation, layerMask); + } + + /// + /// Finds colliders to use. + /// True to rebuild the colliders even if they are already populated. + /// + public void FindColliders(bool rebuild = false) + { + if (_collidersFound && !rebuild) + return; + _collidersFound = true; + + _colliders = GetComponents(); + } + + /// + /// Resets this NetworkBehaviour so that it may be added to an object pool. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override void ResetState(bool asServer) + { + base.ResetState(asServer); + ClearColliderDataHistory(); + } + + /// + /// Resets datas in collider data history and clears collection. + /// + private void ClearColliderDataHistory() + { + foreach (ColliderData cd in _colliderDataHistory) + cd.ResetState(); + _colliderDataHistory.Clear(); + } +#endif + } + + +} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkCollider.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollider.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkCollider.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollider.cs.meta diff --git a/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollider2D.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollider2D.cs new file mode 100644 index 0000000..ccdcac5 --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollider2D.cs @@ -0,0 +1,493 @@ +using FishNet.Managing; +using FishNet.Object; +using GameKit.Dependencies.Utilities; +using GameKit.Dependencies.Utilities.Types; +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using UnityEngine; +using TimeManagerCls = FishNet.Managing.Timing.TimeManager; + +namespace FishNet.Component.Prediction +{ + + public abstract class NetworkCollider2D : NetworkBehaviour + { +#if !PREDICTION_1 + #region Types. + private struct Collider2DData : IResettable + { + /// + /// Tick which the collisions happened. + /// + public uint Tick; + /// + /// Hits for Tick. + /// + public HashSet Hits; + + public Collider2DData(uint tick, HashSet hits) + { + Tick = tick; + Hits = hits; + } + + public void InitializeState() { } + public void ResetState() + { + Tick = TimeManagerCls.UNSET_TICK; + CollectionCaches.StoreAndDefault(ref Hits); + } + } + #endregion + + /// + /// Called when another collider enters this collider. + /// + public event Action OnEnter; + /// + /// Called when another collider stays in this collider. + /// + public event Action OnStay; + /// + /// Called when another collider exits this collider. + /// + public event Action OnExit; + /// + /// True to run collisions for colliders which are triggers, false to run collisions for colliders which are not triggers. + /// + [HideInInspector] + protected bool IsTrigger; + /// + /// Maximum number of simultaneous hits to check for. Larger values decrease performance but allow detection to work for more overlapping colliders. Typically the default value of 16 is more than sufficient. + /// + [Tooltip("Maximum number of simultaneous hits to check for. Larger values decrease performance but allow detection to work for more overlapping colliders. Typically the default value of 16 is more than sufficient.")] + [SerializeField] + private ushort _maximumSimultaneousHits = 16; + /// + /// How long of collision history to keep. Lower values will result in marginally better memory usage at the cost of collision histories desynchronizing on clients with excessive latency. + /// + [Tooltip("How long of collision history to keep. Lower values will result in marginally better memory usage at the cost of collision histories desynchronizing on clients with excessive latency.")] + [Range(0.1f, 2f)] + [SerializeField] + private float _historyDuration = 0.5f; + /// + /// Units to extend collision traces by. This is used to prevent missed overlaps when colliders do not intersect enough. + /// + [Tooltip("Units to extend collision traces by. This is used to prevent missed overlaps when colliders do not intersect enough.")] + [Range(0f, 100f)] + [SerializeField] + private float _additionalSize = 0.1f; + + /// + /// The colliders on this object. + /// + private Collider2D[] _colliders; + /// + /// The hits from the last check. + /// + private Collider2D[] _hits; + /// + /// The history of collider data. + /// + private ResettableRingBuffer _colliderDataHistory; + /// + /// True if colliders have been searched for at least once. + /// We cannot check the null state on _colliders because Unity has a habit of initializing collections on it's own. + /// + private bool _collidersFound; + /// + /// True to cache collision histories for comparing start and exits. + /// + private bool _useCache => (OnEnter != null || OnExit != null); + /// + /// Last layer of the gameObject. + /// + private int _lastGameObjectLayer = -1; + /// + /// Interactable layers for the layer of this gameObject. + /// + private int _interactableLayers; + + protected virtual void Awake() + { + _colliderDataHistory = ResettableCollectionCaches.RetrieveRingBuffer(); + _hits = CollectionCaches.RetrieveArray(); + if (_hits.Length < _maximumSimultaneousHits) + _hits = new Collider2D[_maximumSimultaneousHits]; + } + + private void OnDestroy() + { + ResettableCollectionCaches.StoreAndDefault(ref _colliderDataHistory); + CollectionCaches.StoreAndDefault(ref _hits, -_hits.Length); + } + + public override void OnStartNetwork() + { + FindColliders(); + + //Initialize the ringbuffer. Server only needs 1 tick worth of history. + uint historyTicks = (base.IsServerStarted) ? 1 : TimeManager.TimeToTicks(_historyDuration); + _colliderDataHistory.Initialize((int)historyTicks); + + //Events needed by server and client. + TimeManager.OnPostPhysicsSimulation += TimeManager_OnPostPhysicsSimulation; + } + + public override void OnStartClient() + { + //Events only needed by the client. + PredictionManager.OnPostPhysicsTransformSync += PredictionManager_OnPostPhysicsTransformSync; + PredictionManager.OnPostReplicateReplay += PredictionManager_OnPostReplicateReplay; + } + + public override void OnStopClient() + { + //Events only needed by the client. + PredictionManager.OnPostPhysicsTransformSync -= PredictionManager_OnPostPhysicsTransformSync; + PredictionManager.OnPostReplicateReplay -= PredictionManager_OnPostReplicateReplay; + + } + + public override void OnStopNetwork() + { + TimeManager.OnPostPhysicsSimulation -= TimeManager_OnPostPhysicsSimulation; + } + + /// + /// Called after Physics SyncTransforms are run after a reconcile. + /// This will only invoke if physics are set to TimeManager, within the TimeManager inspector. + /// + private void PredictionManager_OnPostPhysicsTransformSync(uint clientTick, uint serverTick) + { + /* This callback will only occur when client only. + * SInce this is the case remove histories prior + * to clientTick. */ + if (clientTick > 0) + CleanHistory(clientTick - 1); + CheckColliders(clientTick, true); + } + + /// + /// When using TimeManager for physics timing, this is called immediately after the physics simulation has occured for the tick. + /// While using Unity for physics timing, this is called during Update, only if a physics frame. + /// This may be useful if you wish to run physics differently for stacked scenes. + private void TimeManager_OnPostPhysicsSimulation(float delta) + { + CheckColliders(TimeManager.LocalTick, false); + } + + /// + /// Called after physics is simulated when replaying a replicate method. + /// + private void PredictionManager_OnPostReplicateReplay(uint clientTick, uint serverTick) + { + CheckColliders(clientTick, true); + } + + /// + /// Cleans history up to, while excluding tick. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void CleanHistory(uint tick) + { + if (_useCache) + { + int removeCount = 0; + int historyCount = _colliderDataHistory.Count; + for (int i = 0; i < historyCount; i++) + { + if (_colliderDataHistory[i].Tick >= tick) + break; + removeCount++; + } + + for (int i = 0; i < removeCount; i++) + _colliderDataHistory[i].ResetState(); + _colliderDataHistory.RemoveRange(true, removeCount); + } + //Cache is not used. + else + { + ClearColliderDataHistory(); + } + } + + + /// + /// Units to extend collision traces by. This is used to prevent missed overlaps when colliders do not intersect enough. + /// + protected virtual float GetAdditionalSize() => _additionalSize; + + /// + /// Checks for any trigger changes; + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void CheckColliders(uint tick, bool replay) + { + //Should not be possible as tick always starts on 1. + if (tick == TimeManagerCls.UNSET_TICK) + return; + + const int INVALID_HISTORY_VALUE = -1; + + HashSet current = CollectionCaches.RetrieveHashSet(); + HashSet previous = null; + + int previousHitsIndex = INVALID_HISTORY_VALUE; + /* Server only keeps 1 history so + * if server is started then + * simply clean one. When the server is + * started replay will never be true, so this + * will only call once per tick. */ + if (base.IsServerStarted && tick > 0) + CleanHistory(tick - 1); + + if (_useCache) + { + if (replay) + { + previousHitsIndex = GetHistoryIndex(tick - 1, false); + if (previousHitsIndex != -1) + previous = _colliderDataHistory[previousHitsIndex].Hits; + } + //Not replaying. + else + { + if (_colliderDataHistory.Count > 0) + { + Collider2DData cd = _colliderDataHistory[_colliderDataHistory.Count - 1]; + /* If the hit tick one before current then it can be used, otherwise + * use a new collection for previous. */ + if (cd.Tick == (tick - 1)) + previous = cd.Hits; + } + } + } + //Not using history, clear it all. + else + { + ClearColliderDataHistory(); + } + + /* Previous may not be set here if there were + * no collisions during the previous tick. */ + + // The rotation of the object for box colliders. + Quaternion rotation = transform.rotation; + + //If layer changed then get new interactableLayers. + if (_lastGameObjectLayer != gameObject.layer) + { + _lastGameObjectLayer = gameObject.layer; + _interactableLayers = Layers.GetInteractableLayersValue(_lastGameObjectLayer); + } + + // Check each collider for triggers. + foreach (Collider2D col in _colliders) + { + if (!col.enabled) + continue; + if (IsTrigger != col.isTrigger) + continue; + + //Number of hits from the checks. + int hits; + if (col is CircleCollider2D circleCollider) + hits = GetCircleCollider2DHits(circleCollider, _interactableLayers); + else if (col is BoxCollider2D boxCollider) + hits = GetBoxCollider2DHits(boxCollider, rotation, _interactableLayers); + else + hits = 0; + + // Check the hits for triggers. + for (int i = 0; i < hits; i++) + { + Collider2D hit = _hits[i]; + if (hit == null || hit == col) + continue; + + /* If not in previous then add and + * invoke enter. */ + if (previous == null || !previous.Contains(hit)) + OnEnter?.Invoke(hit); + + //Also add to current hits. + current.Add(hit); + OnStay?.Invoke(hit); + } + } + + if (previous != null) + { + //Check for stays and exits. + foreach (Collider2D col in previous) + { + //If it was in previous but not current, it has exited. + if (!current.Contains(col)) + OnExit?.Invoke(col); + } + } + + //If not using the cache then clean up collections. + if (_useCache) + { + //If not replaying add onto the end. */ + if (!replay) + { + AddToEnd(); + } + /* If a replay then set current colliders + * to one entry past historyIndex. If the next entry + * beyond historyIndex is for the right tick it can be + * updated, otherwise a result has to be inserted. */ + else + { + /* Previous hits was not found in history so we + * cannot assume current results go right after the previousIndex. + * Find whichever index is the closest to tick and return it. + * + * If an exact match is not found for tick then the entry just after + * tick will be returned. This will let us insert current hits right + * before that entry. */ + if (previousHitsIndex == -1) + { + int currentIndex = GetHistoryIndex(tick, true); + AddDataToIndex(currentIndex); + } + //If previous hits are known then the index to update is right after previous index. + else + { + int insertIndex = (previousHitsIndex + 1); + /* InsertIndex is out of bounds which means + * to add onto the end. */ + if (insertIndex >= _colliderDataHistory.Count) + AddToEnd(); + //Not the last entry to insert in the middle. + else + AddDataToIndex(insertIndex); + } + + /* Adds data to an index. If the tick + * matches on index with the current tick then + * replace the entry. Otherwise insert to the + * correct location. */ + void AddDataToIndex(int index) + { + Collider2DData colliderData = new Collider2DData(tick, current); + /* If insertIndex is the same tick then replace, otherwise + * put in front of. */ + //Replace. + if (_colliderDataHistory[index].Tick == tick) + { + _colliderDataHistory[index].ResetState(); + _colliderDataHistory[index] = colliderData; + } + //Insert before. + else + { + _colliderDataHistory.Insert(index, colliderData); + } + } + } + + void AddToEnd() + { + Collider2DData colliderData = new Collider2DData(tick, current); + _colliderDataHistory.Add(colliderData); + } + + } + /* If not using caching then store results from this run. */ + else + { + CollectionCaches.Store(current); + } + + //Returns history index for a tick. + /* GetClosest will return the closest match which is + * past lTick if lTick could not be found. */ + int GetHistoryIndex(uint lTick, bool getClosest) + { + for (int i = 0; i < _colliderDataHistory.Count; i++) + { + uint localTick = _colliderDataHistory[i].Tick; + if (localTick == lTick) + return i; + /* Tick is too high, any further results + * will also be too high. */ + if (localTick > tick) + { + if (getClosest) + return i; + else + return INVALID_HISTORY_VALUE; + } + } + + //Fall through. + return INVALID_HISTORY_VALUE; + } + } + + /// + /// Checks for circle collisions. + /// + /// Number of colliders hit. + private int GetCircleCollider2DHits(CircleCollider2D circleCollider, int layerMask) + { + circleCollider.GetCircleOverlapParams(out Vector3 center, out float radius); + radius += GetAdditionalSize(); + return Physics2D.OverlapCircleNonAlloc(center, radius, _hits, layerMask); + } + + /// + /// Checks for Box collisions. + /// + /// Number of colliders hit. + private int GetBoxCollider2DHits(BoxCollider2D boxCollider, Quaternion rotation, int layerMask) + { + boxCollider.GetBox2DOverlapParams(out Vector3 center, out Vector3 halfExtents); + Vector3 additional = (Vector3.one * GetAdditionalSize()); + halfExtents += additional; + return Physics2D.OverlapBoxNonAlloc(center, halfExtents, rotation.z, _hits, layerMask); + } + + /// + /// Finds colliders to use. + /// True to rebuild the colliders even if they are already populated. + /// + public void FindColliders(bool rebuild = false) + { + if (_collidersFound && !rebuild) + return; + _collidersFound = true; + + _colliders = GetComponents(); + } + + /// + /// Resets this NetworkBehaviour so that it may be added to an object pool. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override void ResetState(bool asServer) + { + base.ResetState(asServer); + ClearColliderDataHistory(); + } + + /// + /// Resets datas in collider data history and clears collection. + /// + private void ClearColliderDataHistory() + { + foreach (Collider2DData cd in _colliderDataHistory) + cd.ResetState(); + _colliderDataHistory.Clear(); + } +#endif + } + + +} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scripts/CharacterControllerPrediction.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollider2D.cs.meta similarity index 83% rename from Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scripts/CharacterControllerPrediction.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollider2D.cs.meta index 04a2558..d787f48 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scripts/CharacterControllerPrediction.cs.meta +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollider2D.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6bb7bd88fd11b5d4aa7fca3d42172ab8 +guid: df45081143314fd469a062670a0fe1ea MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollision.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollision.cs new file mode 100644 index 0000000..be50af9 --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollision.cs @@ -0,0 +1,17 @@ +using UnityEngine; + +namespace FishNet.Component.Prediction +{ + public sealed class NetworkCollision : NetworkCollider + { +#if !PREDICTION_1 + protected override void Awake() + { + base.IsTrigger = false; + base.Awake(); + } +#endif + + } + +} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkCollision.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollision.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkCollision.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollision.cs.meta diff --git a/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollision2D.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollision2D.cs new file mode 100644 index 0000000..c690895 --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollision2D.cs @@ -0,0 +1,17 @@ +using UnityEngine; + +namespace FishNet.Component.Prediction +{ + public sealed class NetworkCollision2D : NetworkCollider2D + { +#if !PREDICTION_1 + protected override void Awake() + { + base.IsTrigger = false; + base.Awake(); + } +#endif + + } + +} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Scripts/PredictedBullet.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollision2D.cs.meta similarity index 83% rename from Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Scripts/PredictedBullet.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollision2D.cs.meta index 338a0b6..500a2c2 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Scripts/PredictedBullet.cs.meta +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkCollision2D.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fc7792d9dc338aa4dbc8a2f0533cf6ec +guid: be3cb2952c351714c963b0766f53cef3 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkTrigger.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkTrigger.cs new file mode 100644 index 0000000..c491d99 --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkTrigger.cs @@ -0,0 +1,15 @@ +namespace FishNet.Component.Prediction +{ + + public sealed class NetworkTrigger : NetworkCollider + { +#if !PREDICTION_1 + protected override void Awake() + { + base.IsTrigger = true; + base.Awake(); + } +#endif + } + +} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkTrigger.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkTrigger.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkTrigger.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkTrigger.cs.meta diff --git a/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkTrigger2D.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkTrigger2D.cs new file mode 100644 index 0000000..6cac0d1 --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkTrigger2D.cs @@ -0,0 +1,15 @@ +namespace FishNet.Component.Prediction +{ + + public sealed class NetworkTrigger2D : NetworkCollider2D + { +#if !PREDICTION_1 + protected override void Awake() + { + base.IsTrigger = true; + base.Awake(); + } +#endif + } + +} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Scripts/RigidbodyPrediction.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkTrigger2D.cs.meta similarity index 83% rename from Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Scripts/RigidbodyPrediction.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkTrigger2D.cs.meta index b80d6e4..9e3478d 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Scripts/RigidbodyPrediction.cs.meta +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/NetworkTrigger2D.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9e123f937d4b4f94c9cb6cc03944f786 +guid: a60424afcf0b5984dbe878a1f21c10b2 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/OfflineRigidbody.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/OfflineRigidbody.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/OfflineRigidbody.cs rename to Assets/FishNet/Runtime/Generated/Component/Prediction/OfflineRigidbody.cs index 9d49a6b..52a2e0b 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/OfflineRigidbody.cs +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/OfflineRigidbody.cs @@ -1,4 +1,4 @@ -#if !PREDICTION_V2 +#if PREDICTION_1 using FishNet.Managing.Predicting; using FishNet.Managing.Timing; using FishNet.Object; diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/OfflineRigidbody.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/OfflineRigidbody.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/OfflineRigidbody.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/OfflineRigidbody.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.Rigidbodies.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.Rigidbodies.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.Rigidbodies.cs rename to Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.Rigidbodies.cs index cb27bf0..152dfc7 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.Rigidbodies.cs +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.Rigidbodies.cs @@ -12,7 +12,7 @@ namespace FishNet.Component.Prediction { public partial class PredictedObject : NetworkBehaviour { -#if !PREDICTION_V2 +#if PREDICTION_1 #region Types. [System.Serializable] public struct SmoothingData diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.Rigidbodies.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.Rigidbodies.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.Rigidbodies.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.Rigidbodies.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.cs rename to Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.cs index 136f7e8..070e3e6 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.cs +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.cs @@ -11,7 +11,7 @@ namespace FishNet.Component.Prediction [AddComponentMenu("FishNet/Component/PredictedObject")] public partial class PredictedObject : NetworkBehaviour { -#if !PREDICTION_V2 +#if PREDICTION_1 #region Types. /// /// How to favor smoothing for predicted objects. @@ -551,7 +551,7 @@ private void ConfigureRigidbodies() private void ConfigureNetworkTransform() { if (!IsRigidbodyPrediction) - _networkTransform?.ConfigureForCSP(); + _networkTransform?.ConfigureForPrediction(); } diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObject.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectOwnerSmoother.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectOwnerSmoother.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectOwnerSmoother.cs rename to Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectOwnerSmoother.cs index b696034..937aea4 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectOwnerSmoother.cs +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectOwnerSmoother.cs @@ -7,7 +7,7 @@ namespace FishNet.Component.Prediction { internal class PredictedObjectOwnerSmoother { -#if !PREDICTION_V2 +#if PREDICTION_1 #region Serialized. /// diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectOwnerSmoother.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectOwnerSmoother.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectOwnerSmoother.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectOwnerSmoother.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectSpectatorSmoother.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectSpectatorSmoother.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectSpectatorSmoother.cs rename to Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectSpectatorSmoother.cs index bf49709..ce31bb1 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectSpectatorSmoother.cs +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectSpectatorSmoother.cs @@ -9,7 +9,7 @@ namespace FishNet.Component.Prediction { internal class PredictedObjectSpectatorSmoother { -#if !PREDICTION_V2 +#if PREDICTION_1 #region Types. /// /// Data on a goal to move towards. diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectSpectatorSmoother.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectSpectatorSmoother.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectSpectatorSmoother.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/PredictedObjectSpectatorSmoother.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyPauser.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyPauser.cs similarity index 87% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyPauser.cs rename to Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyPauser.cs index c4e0a85..c93d29b 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyPauser.cs +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyPauser.cs @@ -1,4 +1,5 @@ using FishNet.Managing; +using GameKit.Dependencies.Utilities; using System.Collections.Generic; using UnityEngine; @@ -7,7 +8,7 @@ namespace FishNet.Component.Prediction /// /// Pauses and unpauses rigidbodies. While paused rigidbodies cannot be interacted with or simulated. /// - public class RigidbodyPauser + public class RigidbodyPauser : IResettable { #region Types. /// @@ -35,6 +36,10 @@ private struct RigidbodyData /// True if the rigidbody was detecting collisions prior to being paused. /// public bool DetectCollisions; + /// + /// Detection mode of the Rigidbody. + /// + public CollisionDetectionMode CollisionDetectionMode; public RigidbodyData(Rigidbody rb) { @@ -43,14 +48,16 @@ public RigidbodyData(Rigidbody rb) AngularVelocity = Vector3.zero; IsKinematic = rb.isKinematic; DetectCollisions = rb.detectCollisions; + CollisionDetectionMode = rb.collisionDetectionMode; } public void Update(Rigidbody rb) { - Velocity = rb.velocity; + Velocity = rb.linearVelocity; AngularVelocity = rb.angularVelocity; IsKinematic = rb.isKinematic; DetectCollisions = rb.detectCollisions; + CollisionDetectionMode = rb.collisionDetectionMode; } } /// @@ -78,6 +85,10 @@ private struct Rigidbody2DData /// True if the rigidbody was simulated prior to being paused. /// public bool Simulated; + /// + /// Detection mode of the rigidbody. + /// + public CollisionDetectionMode2D CollisionDetectionMode; public Rigidbody2DData(Rigidbody2D rb) { @@ -86,14 +97,16 @@ public Rigidbody2DData(Rigidbody2D rb) AngularVelocity = 0f; Simulated = rb.simulated; IsKinematic = rb.isKinematic; + CollisionDetectionMode = rb.collisionDetectionMode; } public void Update(Rigidbody2D rb) { - Velocity = rb.velocity; + Velocity = rb.linearVelocity; AngularVelocity = rb.angularVelocity; Simulated = rb.simulated; IsKinematic = rb.isKinematic; + CollisionDetectionMode = rb.collisionDetectionMode; } } #endregion @@ -230,6 +243,7 @@ bool PauseRigidbody(int index) rbData.Update(rb); _rigidbodyDatas[index] = rbData; + rb.collisionDetectionMode = CollisionDetectionMode.Discrete; rb.isKinematic = true; rb.detectCollisions = false; @@ -258,6 +272,7 @@ bool PauseRigidbody(int index) rbData.Update(rb); _rigidbody2dDatas[index] = rbData; + rb.collisionDetectionMode = CollisionDetectionMode2D.Discrete; rb.isKinematic = true; rb.simulated = false; @@ -299,9 +314,10 @@ bool UnpauseRigidbody(int index) rb.isKinematic = rbData.IsKinematic; rb.detectCollisions = rbData.DetectCollisions; + rb.collisionDetectionMode = rbData.CollisionDetectionMode; if (!rb.isKinematic) { - rb.velocity = rbData.Velocity; + rb.linearVelocity = rbData.Velocity; rb.angularVelocity = rbData.AngularVelocity; } return true; @@ -329,9 +345,10 @@ bool UnpauseRigidbody(int index) rb.isKinematic = rbData.IsKinematic; rb.simulated = rbData.Simulated; + rb.collisionDetectionMode = rbData.CollisionDetectionMode; if (!rb.isKinematic) { - rb.velocity = rbData.Velocity; + rb.linearVelocity = rbData.Velocity; rb.angularVelocity = rbData.AngularVelocity; } return true; @@ -339,7 +356,18 @@ bool UnpauseRigidbody(int index) } } + public void ResetState() + { + _rigidbodyDatas.Clear(); + _rigidbody2dDatas.Clear(); + _getInChildren = default; + _transform = default; + _rigidbodyType = default; + _initialized = default; + Paused = default; + } + public void InitializeState() { } } diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyPauser.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyPauser.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyPauser.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyPauser.cs.meta diff --git a/Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyState.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyState.cs new file mode 100644 index 0000000..e3f43bb --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyState.cs @@ -0,0 +1,328 @@ +#if !PREDICTION_1 +using FishNet.CodeGenerating; +using FishNet.Serializing; +using UnityEngine; + +namespace FishNet.Component.Prediction +{ + [UseGlobalCustomSerializer] + public struct RigidbodyState + { + public Vector3 Position; + public Quaternion Rotation; + public bool IsKinematic; + public Vector3 Velocity; + public Vector3 AngularVelocity; + + public RigidbodyState(Rigidbody rb, bool isKinematic) : this(rb) + { + Position = rb.transform.position; + Rotation = rb.transform.rotation; + IsKinematic = isKinematic; + Velocity = rb.linearVelocity; + AngularVelocity = rb.angularVelocity; + + } + + public RigidbodyState(Rigidbody rb) + { + Position = rb.transform.position; + Rotation = rb.transform.rotation; + IsKinematic = rb.isKinematic; + Velocity = rb.linearVelocity; + AngularVelocity = rb.angularVelocity; + } + } + + [UseGlobalCustomSerializer] + public struct Rigidbody2DState + { + public Vector3 Position; + public Quaternion Rotation; + public Vector2 Velocity; + public float AngularVelocity; + public bool Simulated; + public bool IsKinematic; + + public Rigidbody2DState(Rigidbody2D rb, bool simulated) + { + Position = rb.transform.position; + Rotation = rb.transform.rotation; + Velocity = rb.linearVelocity; + AngularVelocity = rb.angularVelocity; + Simulated = simulated; + IsKinematic = rb.isKinematic; + } + + public Rigidbody2DState(Rigidbody2D rb) + { + Position = rb.transform.position; + Rotation = rb.transform.rotation; + Velocity = rb.linearVelocity; + AngularVelocity = rb.angularVelocity; + Simulated = rb.simulated; + IsKinematic = rb.isKinematic; + } + } + + public static class RigidbodyStateSerializers + { + + public static void WriteRigidbodyState(this Writer writer, RigidbodyState value) + { + writer.WriteVector3(value.Position); + writer.WriteQuaternion(value.Rotation); + writer.WriteBoolean(value.IsKinematic); + if (!value.IsKinematic) + { + writer.WriteVector3(value.Velocity); + writer.WriteVector3(value.AngularVelocity); + } + } + + public static RigidbodyState ReadRigidbodyState(this Reader reader) + { + RigidbodyState state = new RigidbodyState() + { + Position = reader.ReadVector3(), + Rotation = reader.ReadQuaternion(), + IsKinematic = reader.ReadBoolean() + }; + + if (!state.IsKinematic) + { + state.Velocity = reader.ReadVector3(); + state.AngularVelocity = reader.ReadVector3(); + } + + return state; + } + + + public static void WriteRigidbody2DState(this Writer writer, Rigidbody2DState value) + { + writer.WriteVector3(value.Position); + writer.WriteQuaternion(value.Rotation); + writer.WriteBoolean(value.Simulated); + writer.WriteBoolean(value.IsKinematic); + + if (value.Simulated) + { + writer.WriteVector2(value.Velocity); + writer.WriteSingle(value.AngularVelocity); + } + } + + public static Rigidbody2DState ReadRigidbody2DState(this Reader reader) + { + Rigidbody2DState state = new Rigidbody2DState() + { + Position = reader.ReadVector3(), + Rotation = reader.ReadQuaternion(), + Simulated = reader.ReadBoolean(), + IsKinematic = reader.ReadBoolean() + }; + + if (state.Simulated) + { + state.Velocity = reader.ReadVector2(); + state.AngularVelocity = reader.ReadSingle(); + } + + return state; + } + + + } + + + public static class RigidbodyStateExtensions + { + /// + /// Gets a RigidbodyState. + /// + public static RigidbodyState GetState(this Rigidbody rb) + { + return new RigidbodyState(rb); + } + /// + /// Sets a state to a rigidbody. + /// + public static void SetState(this Rigidbody rb, RigidbodyState state) + { + Transform t = rb.transform; + t.position = state.Position; + t.rotation = state.Rotation; + rb.linearVelocity = state.Velocity; + rb.angularVelocity = state.AngularVelocity; + } + + /// + /// Gets a Rigidbody2DState. + /// + public static Rigidbody2DState GetState(this Rigidbody2D rb) + { + return new Rigidbody2DState(rb); + } + /// + /// Sets a state to a rigidbody. + /// + public static void SetState(this Rigidbody2D rb, Rigidbody2DState state) + { + Transform t = rb.transform; + t.position = state.Position; + t.rotation = state.Rotation; + rb.linearVelocity = state.Velocity; + rb.angularVelocity = state.AngularVelocity; + } + + } +} +#else +using FishNet.Component.Prediction; +using FishNet.Serializing; +using UnityEngine; + +namespace FishNet.Component.Prediction +{ + public struct RigidbodyState + { + public uint LocalTick; + public Vector3 Position; + public Quaternion Rotation; + public bool IsKinematic; + public Vector3 Velocity; + public Vector3 AngularVelocity; + + public RigidbodyState(Rigidbody rb, bool isKinematic, uint tick) : this(rb, tick) + { + Position = rb.transform.position; + Rotation = rb.transform.rotation; + IsKinematic = isKinematic; + Velocity = rb.velocity; + AngularVelocity = rb.angularVelocity; + LocalTick = tick; + + } + + public RigidbodyState(Rigidbody rb, uint tick) + { + Position = rb.transform.position; + Rotation = rb.transform.rotation; + IsKinematic = rb.isKinematic; + Velocity = rb.velocity; + AngularVelocity = rb.angularVelocity; + LocalTick = tick; + } + } + + public struct Rigidbody2DState + { + public uint LocalTick; + public Vector3 Position; + public Quaternion Rotation; + public Vector2 Velocity; + public float AngularVelocity; + public bool Simulated; + public bool IsKinematic; + + public Rigidbody2DState(Rigidbody2D rb, bool simulated, uint tick) + { + Position = rb.transform.position; + Rotation = rb.transform.rotation; + Velocity = rb.velocity; + AngularVelocity = rb.angularVelocity; + Simulated = simulated; + IsKinematic = rb.isKinematic; + LocalTick = tick; + } + + public Rigidbody2DState(Rigidbody2D rb, uint tick) + { + Position = rb.transform.position; + Rotation = rb.transform.rotation; + Velocity = rb.velocity; + AngularVelocity = rb.angularVelocity; + Simulated = rb.simulated; + IsKinematic = rb.isKinematic; + LocalTick = tick; + } + } + + public static class RigidbodyStateSerializers + { + + public static void WriteRigidbodyState(this Writer writer, RigidbodyState value) + { + writer.WriteTickUnpacked(value.LocalTick); + writer.WriteVector3(value.Position); + writer.WriteQuaternion(value.Rotation); + writer.WriteBoolean(value.IsKinematic); + if (!value.IsKinematic) + { + writer.WriteVector3(value.Velocity); + writer.WriteVector3(value.AngularVelocity); + } + } + + public static RigidbodyState ReadRigidbodyState(this Reader reader) + { + RigidbodyState state = new RigidbodyState() + { + LocalTick = reader.ReadTickUnpacked(), + Position = reader.ReadVector3(), + Rotation = reader.ReadQuaternion(), + IsKinematic = reader.ReadBoolean() + }; + + if (!state.IsKinematic) + { + state.Velocity = reader.ReadVector3(); + state.AngularVelocity = reader.ReadVector3(); + } + + return state; + } + + + public static void WriteRigidbody2DState(this Writer writer, Rigidbody2DState value) + { + writer.WriteTickUnpacked(value.LocalTick); + writer.WriteVector3(value.Position); + writer.WriteQuaternion(value.Rotation); + writer.WriteBoolean(value.Simulated); + writer.WriteBoolean(value.IsKinematic); + + if (value.Simulated) + { + writer.WriteVector2(value.Velocity); + writer.WriteSingle(value.AngularVelocity); + } + } + + public static Rigidbody2DState ReadRigidbody2DState(this Reader reader) + { + Rigidbody2DState state = new Rigidbody2DState() + { + LocalTick = reader.ReadTickUnpacked(), + Position = reader.ReadVector3(), + Rotation = reader.ReadQuaternion(), + Simulated = reader.ReadBoolean(), + IsKinematic = reader.ReadBoolean() + }; + + if (state.Simulated) + { + state.Velocity = reader.ReadVector2(); + state.AngularVelocity = reader.ReadSingle(); + } + + return state; + } + + + } + + +} +#endif \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyState.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyState.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyState.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyState.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyType.cs b/Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyType.cs rename to Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyType.cs diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyType.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyType.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Prediction/RigidbodyType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Spawning.meta b/Assets/FishNet/Runtime/Generated/Component/Spawning.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Spawning.meta rename to Assets/FishNet/Runtime/Generated/Component/Spawning.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Spawning/PlayerSpawner.cs b/Assets/FishNet/Runtime/Generated/Component/Spawning/PlayerSpawner.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Spawning/PlayerSpawner.cs rename to Assets/FishNet/Runtime/Generated/Component/Spawning/PlayerSpawner.cs diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Spawning/PlayerSpawner.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Spawning/PlayerSpawner.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Spawning/PlayerSpawner.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Spawning/PlayerSpawner.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/TakeOwnership.meta b/Assets/FishNet/Runtime/Generated/Component/TakeOwnership.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/TakeOwnership.meta rename to Assets/FishNet/Runtime/Generated/Component/TakeOwnership.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedOwner.cs b/Assets/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedOwner.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedOwner.cs rename to Assets/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedOwner.cs diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedOwner.cs.meta b/Assets/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedOwner.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedOwner.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedOwner.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedSpawn.cs b/Assets/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedSpawn.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedSpawn.cs rename to Assets/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedSpawn.cs diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedSpawn.cs.meta b/Assets/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedSpawn.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedSpawn.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/TakeOwnership/PredictedSpawn.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility.meta b/Assets/FishNet/Runtime/Generated/Component/Utility.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Utility.meta rename to Assets/FishNet/Runtime/Generated/Component/Utility.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/BandwidthDisplay.cs b/Assets/FishNet/Runtime/Generated/Component/Utility/BandwidthDisplay.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Utility/BandwidthDisplay.cs rename to Assets/FishNet/Runtime/Generated/Component/Utility/BandwidthDisplay.cs diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/BandwidthDisplay.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Utility/BandwidthDisplay.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Utility/BandwidthDisplay.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Utility/BandwidthDisplay.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/DefaultScene.cs b/Assets/FishNet/Runtime/Generated/Component/Utility/DefaultScene.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Utility/DefaultScene.cs rename to Assets/FishNet/Runtime/Generated/Component/Utility/DefaultScene.cs diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/DefaultScene.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Utility/DefaultScene.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Utility/DefaultScene.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Utility/DefaultScene.cs.meta diff --git a/Assets/FishNet/Runtime/Generated/Component/Utility/DetachableNetworkTickSmoother.cs b/Assets/FishNet/Runtime/Generated/Component/Utility/DetachableNetworkTickSmoother.cs new file mode 100644 index 0000000..454ef03 --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Utility/DetachableNetworkTickSmoother.cs @@ -0,0 +1,254 @@ +using FishNet.Managing; +using FishNet.Managing.Logging; +using FishNet.Managing.Timing; +using FishNet.Object; +using FishNet.Object.Prediction; +using FishNet.Utility.Extension; +using GameKit.Dependencies.Utilities; +using UnityEngine; + +namespace FishNet.Component.Transforming +{ + /// + /// Detaches the object which this component resides and follows another. + /// + public class DetachableNetworkTickSmoother : NetworkBehaviour + { + #region Serialized. + /// + /// True to attach the object to it's original parent when OnStopClient is called. + /// + [Tooltip("True to attach the object to it's original parent when OnStopClient is called.")] + [SerializeField] + private bool _attachOnStop = true; + + /// + /// Object to follow, and smooth towards. + /// + [Tooltip("Object to follow, and smooth towards.")] + [SerializeField] + private Transform _followObject; + /// + /// How many ticks to interpolate over. + /// + [Tooltip("How many ticks to interpolate over.")] + [Range(1, byte.MaxValue)] + [SerializeField] + private byte _interpolation = 1; + /// + /// True to enable teleport threshhold. + /// + [Tooltip("True to enable teleport threshold.")] + [SerializeField] + private bool _enableTeleport; + /// + /// How far the object must move between ticks to teleport rather than smooth. + /// + [Tooltip("How far the object must move between ticks to teleport rather than smooth.")] + [Range(0f, ushort.MaxValue)] + [SerializeField] + private float _teleportThreshold; + + /// + /// True to synchronize the position of the followObject. + /// + [Tooltip("True to synchronize the position of the followObject.")] + [SerializeField] + private bool _synchronizePosition = true; + /// + /// True to synchronize the rotation of the followObject. + /// + [Tooltip("True to synchronize the rotation of the followObject.")] + [SerializeField] + private bool _synchronizeRotation; + /// + /// True to synchronize the scale of the followObject. + /// + [Tooltip("True to synchronize the scale of the followObject.")] + [SerializeField] + private bool _synchronizeScale; + #endregion + + #region Private. + /// + /// TimeManager subscribed to. + /// + private TimeManager _timeManager; + /// + /// Parent of the object prior to detaching. + /// + private Transform _parent; + /// + /// Local properties of the graphical during instantation. + /// + private TransformProperties _transformInstantiatedLocalProperties; + /// + /// World properties of the followObject during post tick. + /// + private TransformProperties _postTickFollowObjectWorldProperties; + + /// + /// How quickly to move towards target. + /// + private MoveRates _moveRates = new MoveRates(MoveRatesCls.INSTANT_VALUE); + /// + /// True if initialized. + /// + private bool _initialized; + /// + /// Cached TickDelta of the TimeManager. + /// + private float _tickDelta; + #endregion + + private void Awake() + { + _transformInstantiatedLocalProperties = transform.GetLocalProperties(); + } + + private void OnDestroy() + { + ChangeSubscription(false); + } + + public override void OnStartClient() + { + bool error = false; + if (transform.parent == null) + { + NetworkManagerExtensions.LogError($"{GetType().Name} on gameObject {gameObject.name} requires a parent to detach from."); + error = true; + } + if (_followObject == null) + { + NetworkManagerExtensions.LogError($"{GetType().Name} on gameObject {gameObject}, root {transform.root} requires followObject to be set."); + error = true; + } + + if (error) + return; + + _parent = transform.parent; + transform.SetParent(null); + + SetTimeManager(base.TimeManager); + //Unsub first in the rare chance we already subbed such as a stop callback issue. + ChangeSubscription(false); + ChangeSubscription(true); + + _postTickFollowObjectWorldProperties = _followObject.GetWorldProperties(); + _tickDelta = (float)base.TimeManager.TickDelta; + _initialized = true; + } + + public override void OnStopClient() + { +#if UNITY_EDITOR + if (ApplicationState.IsQuitting()) + return; +#endif + //Reattach to parent. + if (_attachOnStop && _parent != null) + { + //Reparent + transform.SetParent(_parent); + //Set to instantiated local values. + transform.SetLocalProperties(_transformInstantiatedLocalProperties); + } + + _postTickFollowObjectWorldProperties.Reset(); + ChangeSubscription(false); + + _initialized = false; + } + + [Client(Logging = LoggingType.Off)] + private void Update() + { + MoveTowardsFollowTarget(); + } + + /// + /// Called after a tick completes. + /// + private void _timeManager_OnPostTick() + { + if (!_initialized) + return; + + _postTickFollowObjectWorldProperties.Update(_followObject); + //Unset values if not following the transform property. + if (!_synchronizePosition) + _postTickFollowObjectWorldProperties.Position = transform.position; + if (!_synchronizeRotation) + _postTickFollowObjectWorldProperties.Rotation = transform.rotation; + if (!_synchronizeScale) + _postTickFollowObjectWorldProperties.LocalScale = transform.localScale; + SetMoveRates(); + } + + /// + /// Sets a new PredictionManager to use. + /// + /// + private void SetTimeManager(TimeManager tm) + { + if (tm == _timeManager) + return; + + //Unsub from current. + ChangeSubscription(false); + //Sub to newest. + _timeManager = tm; + ChangeSubscription(true); + } + + + /// + /// Changes the subscription to the TimeManager. + /// + private void ChangeSubscription(bool subscribe) + { + if (_timeManager == null) + return; + + if (subscribe) + _timeManager.OnPostTick += _timeManager_OnPostTick; + else + _timeManager.OnPostTick -= _timeManager_OnPostTick; + } + + /// + /// Moves towards targetObject. + /// + private void MoveTowardsFollowTarget() + { + if (!_initialized) + return; + + _moveRates.MoveWorldToTarget(transform, _postTickFollowObjectWorldProperties, Time.deltaTime); + } + + private void SetMoveRates() + { + if (!_initialized) + return; + + float duration = (_tickDelta * _interpolation); + /* If interpolation is 1 then add on a tiny amount + * of more time to compensate for frame time, so that + * the smoothing does not complete before the next tick, + * as this would result in jitter. */ + if (_interpolation == 1) + duration += Mathf.Max(Time.deltaTime, (1f / 50f)); + + float teleportT = (_enableTeleport) ? _teleportThreshold : MoveRatesCls.UNSET_VALUE; + _moveRates = MoveRates.GetWorldMoveRates(transform, _followObject, duration, teleportT); + } + + + } + + +} + diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Scripts/TransformPrediction.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Utility/DetachableNetworkTickSmoother.cs.meta similarity index 83% rename from Assets/Packages/FishNet/Demos/Prediction V1/Transform/Scripts/TransformPrediction.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Utility/DetachableNetworkTickSmoother.cs.meta index 01cb9f1..cbb01e0 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Scripts/TransformPrediction.cs.meta +++ b/Assets/FishNet/Runtime/Generated/Component/Utility/DetachableNetworkTickSmoother.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 13cad243fdfd7294e8a6a393735726eb +guid: c631fa10037fa844292bacd140d7c7f9 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/FishNet/Runtime/Generated/Component/Utility/Editor.meta b/Assets/FishNet/Runtime/Generated/Component/Utility/Editor.meta new file mode 100644 index 0000000..28cdeb9 --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Utility/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: edb137ec1a2c56540a187929d6b97b54 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FishNet/Runtime/Generated/Component/Utility/Editor/DetachableNetworkTickSmootherEditor.cs b/Assets/FishNet/Runtime/Generated/Component/Utility/Editor/DetachableNetworkTickSmootherEditor.cs new file mode 100644 index 0000000..0fa952f --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Utility/Editor/DetachableNetworkTickSmootherEditor.cs @@ -0,0 +1,79 @@ +#if UNITY_EDITOR +using FishNet.Editing; +using GameKit.Dependencies.Utilities; +using UnityEditor; +using UnityEngine; +using GameKitEditing = GameKit.Dependencies.Utilities.Editing; + +namespace FishNet.Component.Transforming.Editing +{ + + + [CustomEditor(typeof(DetachableNetworkTickSmoother), true)] + [CanEditMultipleObjects] + public class DetachableNetworkTickSmootherEditor : Editor + { + private SerializedProperty _attachOnStop; + private SerializedProperty _followObject; + private SerializedProperty _interpolation; + private SerializedProperty _enableTeleport; + private SerializedProperty _teleportThreshold; + private SerializedProperty _synchronizePosition; + private SerializedProperty _synchronizeRotation; + private SerializedProperty _synchronizeScale; + + protected virtual void OnEnable() + { + _attachOnStop = serializedObject.FindProperty(nameof(_attachOnStop)); + _followObject = serializedObject.FindProperty(nameof(_followObject)); + _interpolation = serializedObject.FindProperty(nameof(_interpolation)); + _enableTeleport = serializedObject.FindProperty(nameof(_enableTeleport)); + _teleportThreshold = serializedObject.FindProperty(nameof(_teleportThreshold)); + _synchronizePosition = serializedObject.FindProperty(nameof(_synchronizePosition)); + _synchronizeRotation = serializedObject.FindProperty(nameof(_synchronizeRotation)); + _synchronizeScale = serializedObject.FindProperty(nameof(_synchronizeScale)); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + GameKitEditing.AddObjectField("Script:", MonoScript.FromMonoBehaviour((DetachableNetworkTickSmoother)target), typeof(DetachableNetworkTickSmoother), false, EditorLayoutEnableType.Disabled); + + //Misc. + EditorGUILayout.LabelField("Misc", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(_attachOnStop); + EditorGUI.indentLevel--; + EditorGUILayout.Space(); + + //Smoothing. + EditorGUILayout.LabelField("Smoothing", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(_followObject); + EditorGUILayout.PropertyField(_interpolation); + + EditorGUILayout.PropertyField(_enableTeleport); + if (_enableTeleport.boolValue) + { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(_teleportThreshold); + EditorGUI.indentLevel--; + } + EditorGUI.indentLevel--; + EditorGUILayout.Space(); + + //Authority. + EditorGUILayout.LabelField("Synchronizing", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(_synchronizePosition); + EditorGUILayout.PropertyField(_synchronizeRotation); + EditorGUILayout.PropertyField(_synchronizeScale); + EditorGUI.indentLevel--; + + serializedObject.ApplyModifiedProperties(); + } + } + +} +#endif \ No newline at end of file diff --git a/Assets/FishNet/Runtime/Generated/Component/Utility/Editor/DetachableNetworkTickSmootherEditor.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Utility/Editor/DetachableNetworkTickSmootherEditor.cs.meta new file mode 100644 index 0000000..292ffd3 --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Utility/Editor/DetachableNetworkTickSmootherEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 342594fe005d75a4985e1a8ca218f822 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/MonoTickSmoother.cs b/Assets/FishNet/Runtime/Generated/Component/Utility/MonoTickSmoother.cs similarity index 68% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Utility/MonoTickSmoother.cs rename to Assets/FishNet/Runtime/Generated/Component/Utility/MonoTickSmoother.cs index 91060b8..1e9389a 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/MonoTickSmoother.cs +++ b/Assets/FishNet/Runtime/Generated/Component/Utility/MonoTickSmoother.cs @@ -1,15 +1,15 @@ using FishNet.Managing.Logging; -using FishNet.Managing.Predicting; using FishNet.Managing.Timing; using FishNet.Object; using FishNet.Object.Prediction; using GameKit.Dependencies.Utilities; using UnityEngine; -namespace FishNet.Component.Prediction +namespace FishNet.Component.Transforming { /// /// Smoothes an object between ticks. + /// This can be used on objects without NetworkObject components. /// public class MonoTickSmoother : MonoBehaviour { @@ -20,6 +20,25 @@ public class MonoTickSmoother : MonoBehaviour [Tooltip("True to use InstanceFinder to locate the TimeManager. When false specify which TimeManager to use by calling SetTimeManager.")] [SerializeField] private bool _useInstanceFinder = true; + /// + /// GraphicalObject you wish to smooth. + /// + [Tooltip("GraphicalObject you wish to smooth.")] + [SerializeField] + private Transform _graphicalObject; + /// + /// True to enable teleport threshhold. + /// + [Tooltip("True to enable teleport threshold.")] + [SerializeField] + private bool _enableTeleport; + /// + /// How far the object must move between ticks to teleport rather than smooth. + /// + [Tooltip("How far the object must move between ticks to teleport rather than smooth.")] + [Range(0f, ushort.MaxValue)] + [SerializeField] + private float _teleportThreshold; #endregion #region Private. @@ -30,7 +49,7 @@ public class MonoTickSmoother : MonoBehaviour /// /// BasicTickSmoother for this script. /// - private TransformTickSmoother _tickSmoother; + private LocalTransformTickSmoother _tickSmoother; #endregion private void Awake() @@ -41,7 +60,7 @@ private void Awake() private void OnDestroy() { ChangeSubscription(false); - ObjectCaches.StoreAndDefault(ref _tickSmoother); + ObjectCaches.StoreAndDefault(ref _tickSmoother); } [Client(Logging = LoggingType.Off)] @@ -55,7 +74,7 @@ private void Update() /// private void InitializeOnce() { - _tickSmoother = ObjectCaches.Retrieve(); + _tickSmoother = ObjectCaches.Retrieve(); if (_useInstanceFinder) { _timeManager = InstanceFinder.TimeManager; @@ -90,6 +109,11 @@ private void ChangeSubscription(bool subscribe) if (subscribe) { + if (_tickSmoother != null) + { + float tDistance = (_enableTeleport) ? _teleportThreshold : MoveRatesCls.UNSET_VALUE; + _tickSmoother.InitializeOnce(_graphicalObject, tDistance, (float)_timeManager.TickDelta, 1); + } _timeManager.OnPreTick += _timeManager_OnPreTick; _timeManager.OnPostTick += _timeManager_OnPostTick; } diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/MonoTickSmoother.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Utility/MonoTickSmoother.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Utility/MonoTickSmoother.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Utility/MonoTickSmoother.cs.meta diff --git a/Assets/FishNet/Runtime/Generated/Component/Utility/NetworkTickSmoother.cs b/Assets/FishNet/Runtime/Generated/Component/Utility/NetworkTickSmoother.cs new file mode 100644 index 0000000..87873d6 --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Utility/NetworkTickSmoother.cs @@ -0,0 +1,140 @@ +using FishNet.Managing.Logging; +using FishNet.Managing.Timing; +using FishNet.Object; +using FishNet.Object.Prediction; +using GameKit.Dependencies.Utilities; +using UnityEngine; + +namespace FishNet.Component.Transforming +{ + /// + /// Smoothes an object between ticks. + /// + public class NetworkTickSmoother : NetworkBehaviour + { + #region Serialized. + /// + /// GraphicalObject you wish to smooth. + /// + [Tooltip("GraphicalObject you wish to smooth.")] + [SerializeField] + private Transform _graphicalObject; + /// + /// True to enable teleport threshhold. + /// + [Tooltip("True to enable teleport threshold.")] + [SerializeField] + private bool _enableTeleport; + /// + /// How far the object must move between ticks to teleport rather than smooth. + /// + [Tooltip("How far the object must move between ticks to teleport rather than smooth.")] + [Range(0f, ushort.MaxValue)] + [SerializeField] + private float _teleportThreshold; + #endregion + + #region Private. + /// + /// TimeManager subscribed to. + /// + private TimeManager _timeManager; + /// + /// BasicTickSmoother for this script. + /// + private LocalTransformTickSmoother _tickSmoother; + #endregion + + private void OnDestroy() + { + ChangeSubscription(false); + ObjectCaches.StoreAndDefault(ref _tickSmoother); + } + + public override void OnStartClient() + { + Initialize(); + } + + [Client(Logging = LoggingType.Off)] + private void Update() + { + _tickSmoother?.Update(); + } + + /// + /// Initializes this script for use. + /// + private void Initialize() + { + if (_tickSmoother == null) + _tickSmoother = ObjectCaches.Retrieve(); + + SetTimeManager(base.TimeManager); + } + + /// + /// Sets a new PredictionManager to use. + /// + /// + public void SetTimeManager(TimeManager tm) + { + if (tm == _timeManager) + return; + + //Unsub from current. + ChangeSubscription(false); + //Sub to newest. + _timeManager = tm; + ChangeSubscription(true); + } + + + /// + /// Changes the subscription to the TimeManager. + /// + private void ChangeSubscription(bool subscribe) + { + if (_timeManager == null) + return; + + if (subscribe) + { + if (_tickSmoother != null) + { + float tDistance = (_enableTeleport) ? _teleportThreshold : MoveRatesCls.UNSET_VALUE; + _tickSmoother.InitializeOnce(_graphicalObject, tDistance, (float)_timeManager.TickDelta, 1); + } + _timeManager.OnPreTick += _timeManager_OnPreTick; + _timeManager.OnPostTick += _timeManager_OnPostTick; + } + else + { + _timeManager.OnPreTick -= _timeManager_OnPreTick; + _timeManager.OnPostTick -= _timeManager_OnPostTick; + } + } + + + /// + /// Called before a tick starts. + /// + private void _timeManager_OnPreTick() + { + _tickSmoother.OnPreTick(); + } + + /// + /// Called after a tick completes. + /// + private void _timeManager_OnPostTick() + { + _tickSmoother.OnPostTick(); + } + + + } + + +} + diff --git a/Assets/FishNet/Runtime/Generated/Component/Utility/NetworkTickSmoother.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Utility/NetworkTickSmoother.cs.meta new file mode 100644 index 0000000..7628d32 --- /dev/null +++ b/Assets/FishNet/Runtime/Generated/Component/Utility/NetworkTickSmoother.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6dcb9fd44a7969d4f9cfbc130479b3ed +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/PingDisplay.cs b/Assets/FishNet/Runtime/Generated/Component/Utility/PingDisplay.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Utility/PingDisplay.cs rename to Assets/FishNet/Runtime/Generated/Component/Utility/PingDisplay.cs diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/PingDisplay.cs.meta b/Assets/FishNet/Runtime/Generated/Component/Utility/PingDisplay.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/Component/Utility/PingDisplay.cs.meta rename to Assets/FishNet/Runtime/Generated/Component/Utility/PingDisplay.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/SyncTypes.meta b/Assets/FishNet/Runtime/Generated/SyncTypes.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/SyncTypes.meta rename to Assets/FishNet/Runtime/Generated/SyncTypes.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncStopwatch.cs b/Assets/FishNet/Runtime/Generated/SyncTypes/SyncStopwatch.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncStopwatch.cs rename to Assets/FishNet/Runtime/Generated/SyncTypes/SyncStopwatch.cs index 840467f..8c13e1d 100644 --- a/Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncStopwatch.cs +++ b/Assets/FishNet/Runtime/Generated/SyncTypes/SyncStopwatch.cs @@ -346,7 +346,7 @@ internal protected override void OnStartCallback(bool asServer) } /// - /// Removes delta from Remaining for server and client. + /// Adds delta from Remaining for server and client. /// /// Value to remove from Remaining. public void Update(float delta) diff --git a/Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncStopwatch.cs.meta b/Assets/FishNet/Runtime/Generated/SyncTypes/SyncStopwatch.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncStopwatch.cs.meta rename to Assets/FishNet/Runtime/Generated/SyncTypes/SyncStopwatch.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncStopwatchOperation.cs b/Assets/FishNet/Runtime/Generated/SyncTypes/SyncStopwatchOperation.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncStopwatchOperation.cs rename to Assets/FishNet/Runtime/Generated/SyncTypes/SyncStopwatchOperation.cs diff --git a/Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncStopwatchOperation.cs.meta b/Assets/FishNet/Runtime/Generated/SyncTypes/SyncStopwatchOperation.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncStopwatchOperation.cs.meta rename to Assets/FishNet/Runtime/Generated/SyncTypes/SyncStopwatchOperation.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncTimer.cs b/Assets/FishNet/Runtime/Generated/SyncTypes/SyncTimer.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncTimer.cs rename to Assets/FishNet/Runtime/Generated/SyncTypes/SyncTimer.cs diff --git a/Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncTimer.cs.meta b/Assets/FishNet/Runtime/Generated/SyncTypes/SyncTimer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncTimer.cs.meta rename to Assets/FishNet/Runtime/Generated/SyncTypes/SyncTimer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncTimerOperation.cs b/Assets/FishNet/Runtime/Generated/SyncTypes/SyncTimerOperation.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncTimerOperation.cs rename to Assets/FishNet/Runtime/Generated/SyncTypes/SyncTimerOperation.cs diff --git a/Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncTimerOperation.cs.meta b/Assets/FishNet/Runtime/Generated/SyncTypes/SyncTimerOperation.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Generated/SyncTypes/SyncTimerOperation.cs.meta rename to Assets/FishNet/Runtime/Generated/SyncTypes/SyncTimerOperation.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/InstanceFinder.cs b/Assets/FishNet/Runtime/InstanceFinder.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/InstanceFinder.cs rename to Assets/FishNet/Runtime/InstanceFinder.cs diff --git a/Assets/Packages/FishNet/Runtime/InstanceFinder.cs.meta b/Assets/FishNet/Runtime/InstanceFinder.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/InstanceFinder.cs.meta rename to Assets/FishNet/Runtime/InstanceFinder.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing.meta b/Assets/FishNet/Runtime/Managing.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing.meta rename to Assets/FishNet/Runtime/Managing.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client.meta b/Assets/FishNet/Runtime/Managing/Client.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client.meta rename to Assets/FishNet/Runtime/Managing/Client.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.Broadcast.cs b/Assets/FishNet/Runtime/Managing/Client/ClientManager.Broadcast.cs similarity index 94% rename from Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.Broadcast.cs rename to Assets/FishNet/Runtime/Managing/Client/ClientManager.Broadcast.cs index ff8fed1..31cd758 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.Broadcast.cs +++ b/Assets/FishNet/Runtime/Managing/Client/ClientManager.Broadcast.cs @@ -34,7 +34,7 @@ public void RegisterBroadcast(Action handler) where T : struct, I return; } - ushort key = BroadcastHelper.GetKey(); + ushort key = BroadcastExtensions.GetKey(); //Create new IBroadcastHandler if needed. BroadcastHandlerBase bhs; if (!_broadcastHandlers.TryGetValueIL2CPP(key, out bhs)) @@ -53,7 +53,7 @@ public void RegisterBroadcast(Action handler) where T : struct, I /// Method to unregister. public void UnregisterBroadcast(Action handler) where T : struct, IBroadcast { - ushort key = BroadcastHelper.GetKey(); + ushort key = BroadcastExtensions.GetKey(); if (_broadcastHandlers.TryGetValueIL2CPP(key, out BroadcastHandlerBase bhs)) bhs.UnregisterHandler(handler); } @@ -90,7 +90,7 @@ public void Broadcast(T message, Channel channel = Channel.Reliable) where T } PooledWriter writer = WriterPool.Retrieve(); - Broadcasts.WriteBroadcast(NetworkManager, writer, message, ref channel); + BroadcastsSerializers.WriteBroadcast(NetworkManager, writer, message, ref channel); ArraySegment segment = writer.GetArraySegment(); NetworkManager.TransportManager.SendToServer((byte)channel, segment); diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.Broadcast.cs.meta b/Assets/FishNet/Runtime/Managing/Client/ClientManager.Broadcast.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.Broadcast.cs.meta rename to Assets/FishNet/Runtime/Managing/Client/ClientManager.Broadcast.cs.meta diff --git a/Assets/FishNet/Runtime/Managing/Client/ClientManager.LOD.cs b/Assets/FishNet/Runtime/Managing/Client/ClientManager.LOD.cs new file mode 100644 index 0000000..0974336 --- /dev/null +++ b/Assets/FishNet/Runtime/Managing/Client/ClientManager.LOD.cs @@ -0,0 +1,48 @@ +using FishNet.Connection; +using FishNet.Managing.Timing; +using FishNet.Object; +using FishNet.Serializing; +using FishNet.Transporting; +using GameKit.Dependencies.Utilities; +using System.Collections.Generic; +using UnityEngine; + +namespace FishNet.Managing.Client +{ + public sealed partial class ClientManager : MonoBehaviour + { + #region Internal. + /// + /// How many ticks between each LOD update. + /// + public uint LevelOfDetailInterval => NetworkManager.TimeManager.TimeToTicks(0.5d, TickRounding.RoundUp); + #endregion + + #region Private. + /// + /// Positions of the player objects. + /// + private List _objectsPositionsCache = new List(); + /// + /// Next index within Spawned to update the LOD on. + /// + private int _nextLodNobIndex; + #endregion + + /// + /// Sends a level of update if conditions are met. + /// + /// True to force send a full update immediately. + /// This may be useful when teleporting clients. + /// This must be called by on the server by using ServerManager.ForceLodUpdate(NetworkConnection). + /// + internal void TrySendLodUpdate(uint localTick, bool forceFullUpdate) + { + + } + + + } + + +} diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.LOD.cs.meta b/Assets/FishNet/Runtime/Managing/Client/ClientManager.LOD.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.LOD.cs.meta rename to Assets/FishNet/Runtime/Managing/Client/ClientManager.LOD.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.cs b/Assets/FishNet/Runtime/Managing/Client/ClientManager.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.cs rename to Assets/FishNet/Runtime/Managing/Client/ClientManager.cs index 556aa6a..037ddd4 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.cs +++ b/Assets/FishNet/Runtime/Managing/Client/ClientManager.cs @@ -361,7 +361,7 @@ private void ParseReceived(ClientReceivedDataArgs args) segment = args.Data; NetworkManager.StatisticsManager.NetworkTraffic.LocalClientReceivedData((ulong)segment.Count); - if (segment.Count <= TransportManager.TICK_BYTES) + if (segment.Count <= TransportManager.UNPACKED_TICK_LENGTH) return; PooledReader reader = ReaderPool.Retrieve(segment, NetworkManager, Reader.DataSource.Server); @@ -440,10 +440,10 @@ internal void ParseReader(PooledReader reader, Channel channel, bool print = fal { Objects.ParseRpcLink(reader, (ushort)packetId, channel); } -#if PREDICTION_V2 +#if !PREDICTION_1 else if (packetId == PacketId.StateUpdate) { - NetworkManager.PredictionManager.ParseStateUpdate(reader); + NetworkManager.PredictionManager.ParseStateUpdate(reader, channel); } #endif else if (packetId == PacketId.Replicate) @@ -480,7 +480,7 @@ internal void ParseReader(PooledReader reader, Channel channel, bool print = fal } else if (packetId == PacketId.TimingUpdate) { - NetworkManager.TimeManager.ParseTimingUpdate(); + NetworkManager.TimeManager.ParseTimingUpdate(reader); } else if (packetId == PacketId.OwnershipChange) { diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.cs.meta b/Assets/FishNet/Runtime/Managing/Client/ClientManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.cs.meta rename to Assets/FishNet/Runtime/Managing/Client/ClientManager.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/Editor.meta b/Assets/FishNet/Runtime/Managing/Client/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/Editor.meta rename to Assets/FishNet/Runtime/Managing/Client/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/Editor/ClientManagerEditor.cs b/Assets/FishNet/Runtime/Managing/Client/Editor/ClientManagerEditor.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/Editor/ClientManagerEditor.cs rename to Assets/FishNet/Runtime/Managing/Client/Editor/ClientManagerEditor.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/Editor/ClientManagerEditor.cs.meta b/Assets/FishNet/Runtime/Managing/Client/Editor/ClientManagerEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/Editor/ClientManagerEditor.cs.meta rename to Assets/FishNet/Runtime/Managing/Client/Editor/ClientManagerEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/Object.meta b/Assets/FishNet/Runtime/Managing/Client/Object.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/Object.meta rename to Assets/FishNet/Runtime/Managing/Client/Object.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/Object/ClientObjects.RpcLinks.cs b/Assets/FishNet/Runtime/Managing/Client/Object/ClientObjects.RpcLinks.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/Object/ClientObjects.RpcLinks.cs rename to Assets/FishNet/Runtime/Managing/Client/Object/ClientObjects.RpcLinks.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/Object/ClientObjects.RpcLinks.cs.meta b/Assets/FishNet/Runtime/Managing/Client/Object/ClientObjects.RpcLinks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/Object/ClientObjects.RpcLinks.cs.meta rename to Assets/FishNet/Runtime/Managing/Client/Object/ClientObjects.RpcLinks.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/Object/ClientObjects.cs b/Assets/FishNet/Runtime/Managing/Client/Object/ClientObjects.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/Object/ClientObjects.cs rename to Assets/FishNet/Runtime/Managing/Client/Object/ClientObjects.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/Object/ClientObjects.cs.meta b/Assets/FishNet/Runtime/Managing/Client/Object/ClientObjects.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/Object/ClientObjects.cs.meta rename to Assets/FishNet/Runtime/Managing/Client/Object/ClientObjects.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/Object/ObjectCaching.cs b/Assets/FishNet/Runtime/Managing/Client/Object/ObjectCaching.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/Object/ObjectCaching.cs rename to Assets/FishNet/Runtime/Managing/Client/Object/ObjectCaching.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/Object/ObjectCaching.cs.meta b/Assets/FishNet/Runtime/Managing/Client/Object/ObjectCaching.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Client/Object/ObjectCaching.cs.meta rename to Assets/FishNet/Runtime/Managing/Client/Object/ObjectCaching.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Debugging.meta b/Assets/FishNet/Runtime/Managing/Debugging.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Debugging.meta rename to Assets/FishNet/Runtime/Managing/Debugging.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Debugging/DebugManager.cs b/Assets/FishNet/Runtime/Managing/Debugging/DebugManager.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Debugging/DebugManager.cs rename to Assets/FishNet/Runtime/Managing/Debugging/DebugManager.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Debugging/DebugManager.cs.meta b/Assets/FishNet/Runtime/Managing/Debugging/DebugManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Debugging/DebugManager.cs.meta rename to Assets/FishNet/Runtime/Managing/Debugging/DebugManager.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Debugging/ParseLogger.cs b/Assets/FishNet/Runtime/Managing/Debugging/ParseLogger.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Debugging/ParseLogger.cs rename to Assets/FishNet/Runtime/Managing/Debugging/ParseLogger.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Debugging/ParseLogger.cs.meta b/Assets/FishNet/Runtime/Managing/Debugging/ParseLogger.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Debugging/ParseLogger.cs.meta rename to Assets/FishNet/Runtime/Managing/Debugging/ParseLogger.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Editor.meta b/Assets/FishNet/Runtime/Managing/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Editor.meta rename to Assets/FishNet/Runtime/Managing/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Editor/NetworkManagerEditor.cs b/Assets/FishNet/Runtime/Managing/Editor/NetworkManagerEditor.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Editor/NetworkManagerEditor.cs rename to Assets/FishNet/Runtime/Managing/Editor/NetworkManagerEditor.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Editor/NetworkManagerEditor.cs.meta b/Assets/FishNet/Runtime/Managing/Editor/NetworkManagerEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Editor/NetworkManagerEditor.cs.meta rename to Assets/FishNet/Runtime/Managing/Editor/NetworkManagerEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Logging.meta b/Assets/FishNet/Runtime/Managing/Logging.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Logging.meta rename to Assets/FishNet/Runtime/Managing/Logging.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Logging/LevelLoggingConfiguration.cs b/Assets/FishNet/Runtime/Managing/Logging/LevelLoggingConfiguration.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Logging/LevelLoggingConfiguration.cs rename to Assets/FishNet/Runtime/Managing/Logging/LevelLoggingConfiguration.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Logging/LevelLoggingConfiguration.cs.meta b/Assets/FishNet/Runtime/Managing/Logging/LevelLoggingConfiguration.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Logging/LevelLoggingConfiguration.cs.meta rename to Assets/FishNet/Runtime/Managing/Logging/LevelLoggingConfiguration.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Logging/LoggingConfiguration.cs b/Assets/FishNet/Runtime/Managing/Logging/LoggingConfiguration.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Logging/LoggingConfiguration.cs rename to Assets/FishNet/Runtime/Managing/Logging/LoggingConfiguration.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Logging/LoggingConfiguration.cs.meta b/Assets/FishNet/Runtime/Managing/Logging/LoggingConfiguration.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Logging/LoggingConfiguration.cs.meta rename to Assets/FishNet/Runtime/Managing/Logging/LoggingConfiguration.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Logging/LoggingType.cs b/Assets/FishNet/Runtime/Managing/Logging/LoggingType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Logging/LoggingType.cs rename to Assets/FishNet/Runtime/Managing/Logging/LoggingType.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Logging/LoggingType.cs.meta b/Assets/FishNet/Runtime/Managing/Logging/LoggingType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Logging/LoggingType.cs.meta rename to Assets/FishNet/Runtime/Managing/Logging/LoggingType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/NetworkManager.Logging.cs b/Assets/FishNet/Runtime/Managing/NetworkManager.Logging.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/NetworkManager.Logging.cs rename to Assets/FishNet/Runtime/Managing/NetworkManager.Logging.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/NetworkManager.Logging.cs.meta b/Assets/FishNet/Runtime/Managing/NetworkManager.Logging.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/NetworkManager.Logging.cs.meta rename to Assets/FishNet/Runtime/Managing/NetworkManager.Logging.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/NetworkManager.ObjectPooling.cs b/Assets/FishNet/Runtime/Managing/NetworkManager.ObjectPooling.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/NetworkManager.ObjectPooling.cs rename to Assets/FishNet/Runtime/Managing/NetworkManager.ObjectPooling.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/NetworkManager.ObjectPooling.cs.meta b/Assets/FishNet/Runtime/Managing/NetworkManager.ObjectPooling.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/NetworkManager.ObjectPooling.cs.meta rename to Assets/FishNet/Runtime/Managing/NetworkManager.ObjectPooling.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/NetworkManager.Pro.cs b/Assets/FishNet/Runtime/Managing/NetworkManager.Pro.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/NetworkManager.Pro.cs rename to Assets/FishNet/Runtime/Managing/NetworkManager.Pro.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/NetworkManager.Pro.cs.meta b/Assets/FishNet/Runtime/Managing/NetworkManager.Pro.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/NetworkManager.Pro.cs.meta rename to Assets/FishNet/Runtime/Managing/NetworkManager.Pro.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/NetworkManager.QOL.cs b/Assets/FishNet/Runtime/Managing/NetworkManager.QOL.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/NetworkManager.QOL.cs rename to Assets/FishNet/Runtime/Managing/NetworkManager.QOL.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/NetworkManager.QOL.cs.meta b/Assets/FishNet/Runtime/Managing/NetworkManager.QOL.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/NetworkManager.QOL.cs.meta rename to Assets/FishNet/Runtime/Managing/NetworkManager.QOL.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/NetworkManager.cs b/Assets/FishNet/Runtime/Managing/NetworkManager.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/NetworkManager.cs rename to Assets/FishNet/Runtime/Managing/NetworkManager.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/NetworkManager.cs.meta b/Assets/FishNet/Runtime/Managing/NetworkManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/NetworkManager.cs.meta rename to Assets/FishNet/Runtime/Managing/NetworkManager.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object.meta b/Assets/FishNet/Runtime/Managing/Object.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object.meta rename to Assets/FishNet/Runtime/Managing/Object.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/DualPrefab.cs b/Assets/FishNet/Runtime/Managing/Object/DualPrefab.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/DualPrefab.cs rename to Assets/FishNet/Runtime/Managing/Object/DualPrefab.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/DualPrefab.cs.meta b/Assets/FishNet/Runtime/Managing/Object/DualPrefab.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/DualPrefab.cs.meta rename to Assets/FishNet/Runtime/Managing/Object/DualPrefab.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/ManagedObjects.Spawning.cs b/Assets/FishNet/Runtime/Managing/Object/ManagedObjects.Spawning.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Managing/Object/ManagedObjects.Spawning.cs rename to Assets/FishNet/Runtime/Managing/Object/ManagedObjects.Spawning.cs index ccafd52..757d48c 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Object/ManagedObjects.Spawning.cs +++ b/Assets/FishNet/Runtime/Managing/Object/ManagedObjects.Spawning.cs @@ -69,7 +69,7 @@ internal void WriteSpawn_Server(NetworkObject nob, NetworkConnection connection, if (NetworkManager.ServerManager.ShareIds || connection == nob.Owner) headerWriter.WriteNetworkConnection(nob.Owner); else - headerWriter.WriteInt16(-1); + headerWriter.WriteNetworkConnectionId(NetworkConnection.UNSET_CLIENTID_VALUE); bool nested = (nob.CurrentParentNetworkBehaviour != null); bool sceneObject = nob.IsSceneObject; diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/ManagedObjects.Spawning.cs.meta b/Assets/FishNet/Runtime/Managing/Object/ManagedObjects.Spawning.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/ManagedObjects.Spawning.cs.meta rename to Assets/FishNet/Runtime/Managing/Object/ManagedObjects.Spawning.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/ManagedObjects.cs b/Assets/FishNet/Runtime/Managing/Object/ManagedObjects.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/ManagedObjects.cs rename to Assets/FishNet/Runtime/Managing/Object/ManagedObjects.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/ManagedObjects.cs.meta b/Assets/FishNet/Runtime/Managing/Object/ManagedObjects.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/ManagedObjects.cs.meta rename to Assets/FishNet/Runtime/Managing/Object/ManagedObjects.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/ObjectSpawnType.cs b/Assets/FishNet/Runtime/Managing/Object/ObjectSpawnType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/ObjectSpawnType.cs rename to Assets/FishNet/Runtime/Managing/Object/ObjectSpawnType.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/ObjectSpawnType.cs.meta b/Assets/FishNet/Runtime/Managing/Object/ObjectSpawnType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/ObjectSpawnType.cs.meta rename to Assets/FishNet/Runtime/Managing/Object/ObjectSpawnType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects.meta b/Assets/FishNet/Runtime/Managing/Object/PrefabObjects.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects.meta rename to Assets/FishNet/Runtime/Managing/Object/PrefabObjects.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/DefaultPrefabObjects.cs b/Assets/FishNet/Runtime/Managing/Object/PrefabObjects/DefaultPrefabObjects.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/DefaultPrefabObjects.cs rename to Assets/FishNet/Runtime/Managing/Object/PrefabObjects/DefaultPrefabObjects.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/DefaultPrefabObjects.cs.meta b/Assets/FishNet/Runtime/Managing/Object/PrefabObjects/DefaultPrefabObjects.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/DefaultPrefabObjects.cs.meta rename to Assets/FishNet/Runtime/Managing/Object/PrefabObjects/DefaultPrefabObjects.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/DualPrefabObjects.cs b/Assets/FishNet/Runtime/Managing/Object/PrefabObjects/DualPrefabObjects.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/DualPrefabObjects.cs rename to Assets/FishNet/Runtime/Managing/Object/PrefabObjects/DualPrefabObjects.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/DualPrefabObjects.cs.meta b/Assets/FishNet/Runtime/Managing/Object/PrefabObjects/DualPrefabObjects.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/DualPrefabObjects.cs.meta rename to Assets/FishNet/Runtime/Managing/Object/PrefabObjects/DualPrefabObjects.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/PrefabObjects.cs b/Assets/FishNet/Runtime/Managing/Object/PrefabObjects/PrefabObjects.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/PrefabObjects.cs rename to Assets/FishNet/Runtime/Managing/Object/PrefabObjects/PrefabObjects.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/PrefabObjects.cs.meta b/Assets/FishNet/Runtime/Managing/Object/PrefabObjects/PrefabObjects.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/PrefabObjects.cs.meta rename to Assets/FishNet/Runtime/Managing/Object/PrefabObjects/PrefabObjects.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/SinglePrefabObjects.cs b/Assets/FishNet/Runtime/Managing/Object/PrefabObjects/SinglePrefabObjects.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/SinglePrefabObjects.cs rename to Assets/FishNet/Runtime/Managing/Object/PrefabObjects/SinglePrefabObjects.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/SinglePrefabObjects.cs.meta b/Assets/FishNet/Runtime/Managing/Object/PrefabObjects/SinglePrefabObjects.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/PrefabObjects/SinglePrefabObjects.cs.meta rename to Assets/FishNet/Runtime/Managing/Object/PrefabObjects/SinglePrefabObjects.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/SpawnParentType.cs b/Assets/FishNet/Runtime/Managing/Object/SpawnParentType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/SpawnParentType.cs rename to Assets/FishNet/Runtime/Managing/Object/SpawnParentType.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Object/SpawnParentType.cs.meta b/Assets/FishNet/Runtime/Managing/Object/SpawnParentType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Object/SpawnParentType.cs.meta rename to Assets/FishNet/Runtime/Managing/Object/SpawnParentType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Observing.meta b/Assets/FishNet/Runtime/Managing/Observing.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Observing.meta rename to Assets/FishNet/Runtime/Managing/Observing.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Observing/Editor.meta b/Assets/FishNet/Runtime/Managing/Observing/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Observing/Editor.meta rename to Assets/FishNet/Runtime/Managing/Observing/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Observing/Editor/ObserverManagerEditor.cs b/Assets/FishNet/Runtime/Managing/Observing/Editor/ObserverManagerEditor.cs similarity index 81% rename from Assets/Packages/FishNet/Runtime/Managing/Observing/Editor/ObserverManagerEditor.cs rename to Assets/FishNet/Runtime/Managing/Observing/Editor/ObserverManagerEditor.cs index a7f03f9..b358e60 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Observing/Editor/ObserverManagerEditor.cs +++ b/Assets/FishNet/Runtime/Managing/Observing/Editor/ObserverManagerEditor.cs @@ -14,6 +14,7 @@ public class ObserverManagerEditor : Editor private SerializedProperty _enableNetworkLod; private SerializedProperty _levelOfDetailDistances; private SerializedProperty _updateHostVisibility; + private SerializedProperty _maximumTimedObserversDuration; private SerializedProperty _defaultConditions; protected virtual void OnEnable() @@ -21,6 +22,7 @@ protected virtual void OnEnable() _enableNetworkLod = serializedObject.FindProperty(nameof(_enableNetworkLod)); _levelOfDetailDistances = serializedObject.FindProperty(nameof(_levelOfDetailDistances)); _updateHostVisibility = serializedObject.FindProperty(nameof(_updateHostVisibility)); + _maximumTimedObserversDuration = serializedObject.FindProperty(nameof(_maximumTimedObserversDuration)); _defaultConditions = serializedObject.FindProperty(nameof(_defaultConditions)); } @@ -46,6 +48,9 @@ public override void OnInspectorGUI() GameKitEditing.EnableGUIIfPlaying(); EditorGUILayout.PropertyField(_updateHostVisibility); + if (_maximumTimedObserversDuration.floatValue < 1d) + EditorGUILayout.HelpBox("Using low values may reduce server performance while under load.", MessageType.Warning); + EditorGUILayout.PropertyField(_maximumTimedObserversDuration); EditorGUILayout.PropertyField(_defaultConditions); EditorGUI.indentLevel--; diff --git a/Assets/Packages/FishNet/Runtime/Managing/Observing/Editor/ObserverManagerEditor.cs.meta b/Assets/FishNet/Runtime/Managing/Observing/Editor/ObserverManagerEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Observing/Editor/ObserverManagerEditor.cs.meta rename to Assets/FishNet/Runtime/Managing/Observing/Editor/ObserverManagerEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Observing/ObserverManager.cs b/Assets/FishNet/Runtime/Managing/Observing/ObserverManager.cs similarity index 77% rename from Assets/Packages/FishNet/Runtime/Managing/Observing/ObserverManager.cs rename to Assets/FishNet/Runtime/Managing/Observing/ObserverManager.cs index 8dfbb7b..b809e1d 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Observing/ObserverManager.cs +++ b/Assets/FishNet/Runtime/Managing/Observing/ObserverManager.cs @@ -50,19 +50,33 @@ public sealed class ObserverManager : MonoBehaviour /// private List _singleLevelOfDetailDistances = new List() { float.MaxValue }; /// - /// + /// True to update visibility for clientHost based on if they are an observer or not. /// + public bool UpdateHostVisibility + { + get => _updateHostVisibility; + private set => _updateHostVisibility = value; + } [Tooltip("True to update visibility for clientHost based on if they are an observer or not.")] [SerializeField] private bool _updateHostVisibility = true; /// - /// True to update visibility for clientHost based on if they are an observer or not. + /// Maximum duration the server will take to update timed observer conditions as server load increases. Lower values will result in timed conditions being checked quicker at the cost of performance.. /// - public bool UpdateHostVisibility + public float MaximumTimedObserversDuration { - get => _updateHostVisibility; - private set => _updateHostVisibility = value; + get => _maximumTimedObserversDuration; + private set => _maximumTimedObserversDuration = value; } + [Tooltip("Maximum duration the server will take to update timed observer conditions as server load increases. Lower values will result in timed conditions being checked quicker at the cost of performance.")] + [SerializeField] + [Range(0f, 20f)] + private float _maximumTimedObserversDuration = 10f; + /// + /// Sets the MaximumTimedObserversDuration value. + /// + /// New maximum duration to update timed observers over. + public void SetMaximumTimedObserversDuration(float value) => MaximumTimedObserversDuration = value; /// /// /// @@ -232,18 +246,7 @@ public static byte GetLevelOfDetailInterval(byte lodIndex) /// internal void CalculateLevelOfDetail(uint tick) { - //PROSTART - int count = GetLevelOfDetailDistances().Count; - for (int i = (count - 1); i > 0; i--) - { - uint interval = _levelOfDetailIntervals[i]; - if (tick % interval == 0) - { - LevelOfDetailIndex = (byte)i; - return; - } - } - //PROEND + //If here then index is 0 and interval is every tick. LevelOfDetailIndex = 0; } @@ -256,66 +259,7 @@ private void ValidateLevelOfDetails() #if !FISHNET_PRO _enableNetworkLod = false; #endif - //PROSTART - if (!_enableNetworkLod) - return; - - //No distances specified. - if (_levelOfDetailDistances == null || _levelOfDetailDistances.Count == 0) - { - if (_networkManager != null) - { - _networkManager.LogWarning("Level of detail distances contains no entries. NetworkLOD has been disabled."); - _enableNetworkLod = false; - } - return; - } - - //Make sure every distance is larger than the last. - float lastDistance = float.MinValue; - foreach (float dist in _levelOfDetailDistances) - { - if (dist <= 0f || dist <= lastDistance) - { - if (_networkManager != null) - { - _networkManager.LogError($"Level of detail distances must be greater than 0f, and each distance larger than the previous. NetworkLOD has been disabled."); - _enableNetworkLod = false; - } - return; - } - lastDistance = dist; - } - - int maxEntries = 8; - //Too many distances. - if (_levelOfDetailDistances.Count > maxEntries) - { - _networkManager?.LogWarning("There can be a maximum of 8 level of detail distances. Entries beyond this quantity have been discarded."); - while (_levelOfDetailDistances.Count > maxEntries) - _levelOfDetailDistances.RemoveAt(_levelOfDetailDistances.Count - 1); - } - - if (Application.isPlaying) - { - //Build intervals and sqr distances. - int count = _levelOfDetailDistances.Count; - _levelOfDetailIntervals = new uint[count]; - for (int i = (count - 1); i > 0; i--) - { - uint power = (uint)Mathf.Pow(2, i); - _levelOfDetailIntervals[i] = power; - - } - //Sqr - for (int i = 0; i < count; i++) - { - float dist = _levelOfDetailDistances[i]; - dist *= dist; - _levelOfDetailDistances[i] = dist; - } - } - //PROEND + } } diff --git a/Assets/Packages/FishNet/Runtime/Managing/Observing/ObserverManager.cs.meta b/Assets/FishNet/Runtime/Managing/Observing/ObserverManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Observing/ObserverManager.cs.meta rename to Assets/FishNet/Runtime/Managing/Observing/ObserverManager.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Prediction.meta b/Assets/FishNet/Runtime/Managing/Prediction.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Prediction.meta rename to Assets/FishNet/Runtime/Managing/Prediction.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Prediction/Editor.meta b/Assets/FishNet/Runtime/Managing/Prediction/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Prediction/Editor.meta rename to Assets/FishNet/Runtime/Managing/Prediction/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Prediction/Editor/PredictionManagerEditor.cs b/Assets/FishNet/Runtime/Managing/Prediction/Editor/PredictionManagerEditor.cs similarity index 86% rename from Assets/Packages/FishNet/Runtime/Managing/Prediction/Editor/PredictionManagerEditor.cs rename to Assets/FishNet/Runtime/Managing/Prediction/Editor/PredictionManagerEditor.cs index 5df1ae2..d4dba67 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Prediction/Editor/PredictionManagerEditor.cs +++ b/Assets/FishNet/Runtime/Managing/Prediction/Editor/PredictionManagerEditor.cs @@ -10,22 +10,22 @@ namespace FishNet.Managing.Predicting.Editing [CanEditMultipleObjects] public class PredictionManagerEditor : Editor { - private SerializedProperty _queuedInputs; + // private SerializedProperty _queuedInputs; private SerializedProperty _dropExcessiveReplicates; private SerializedProperty _maximumServerReplicates; private SerializedProperty _maximumConsumeCount; - private SerializedProperty _redundancyCount; + private SerializedProperty _interpolation; private SerializedProperty _allowPredictedSpawning; private SerializedProperty _reservedObjectIds; protected virtual void OnEnable() { - _queuedInputs = serializedObject.FindProperty(nameof(_queuedInputs)); + //_queuedInputs = serializedObject.FindProperty(nameof(_queuedInputs)); _dropExcessiveReplicates = serializedObject.FindProperty(nameof(_dropExcessiveReplicates)); _maximumServerReplicates = serializedObject.FindProperty(nameof(_maximumServerReplicates)); _maximumConsumeCount = serializedObject.FindProperty(nameof(_maximumConsumeCount)); - _redundancyCount = serializedObject.FindProperty(nameof(_redundancyCount)); + _interpolation = serializedObject.FindProperty(nameof(_interpolation)); _allowPredictedSpawning = serializedObject.FindProperty(nameof(_allowPredictedSpawning)); _reservedObjectIds = serializedObject.FindProperty(nameof(_reservedObjectIds)); } @@ -41,8 +41,8 @@ public override void OnInspectorGUI() EditorGUILayout.LabelField("Settings", EditorStyles.boldLabel); EditorGUI.indentLevel++; - EditorGUILayout.PropertyField(_queuedInputs); - EditorGUILayout.PropertyField(_redundancyCount); + //EditorGUILayout.PropertyField(_queuedInputs); + EditorGUILayout.PropertyField(_interpolation); EditorGUILayout.PropertyField(_allowPredictedSpawning); if (_allowPredictedSpawning.boolValue == true) @@ -64,7 +64,7 @@ public override void OnInspectorGUI() } else { -#if !PREDICTION_V2 +#if PREDICTION_1 EditorGUILayout.PropertyField(_maximumConsumeCount); #endif } diff --git a/Assets/Packages/FishNet/Runtime/Managing/Prediction/Editor/PredictionManagerEditor.cs.meta b/Assets/FishNet/Runtime/Managing/Prediction/Editor/PredictionManagerEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Prediction/Editor/PredictionManagerEditor.cs.meta rename to Assets/FishNet/Runtime/Managing/Prediction/Editor/PredictionManagerEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Prediction/PredictionManager.cs b/Assets/FishNet/Runtime/Managing/Prediction/PredictionManager.cs similarity index 57% rename from Assets/Packages/FishNet/Runtime/Managing/Prediction/PredictionManager.cs rename to Assets/FishNet/Runtime/Managing/Prediction/PredictionManager.cs index bbcd4be..459d386 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Prediction/PredictionManager.cs +++ b/Assets/FishNet/Runtime/Managing/Prediction/PredictionManager.cs @@ -1,21 +1,15 @@ -using FishNet.CodeGenerating; +#if !PREDICTION_1 using FishNet.Connection; -using FishNet.Documenting; using FishNet.Managing.Timing; using FishNet.Managing.Transporting; -using FishNet.Object; using FishNet.Serializing; -using FishNet.Serializing.Helping; using FishNet.Transporting; using FishNet.Utility.Performance; using GameKit.Dependencies.Utilities; using System; using System.Collections.Generic; -using System.Text; using UnityEngine; -using static FishNet.Managing.Predicting.PredictionManager; -using UnityScene = UnityEngine.SceneManagement.Scene; - +using UnityEngine.Serialization; namespace FishNet.Managing.Predicting { @@ -28,38 +22,23 @@ namespace FishNet.Managing.Predicting public sealed class PredictionManager : MonoBehaviour { #region Public. -#if !PREDICTION_V2 - /// - /// Called before performing a reconcile on NetworkBehaviour. - /// - public event Action OnPreReconcile; - /// - /// Called after performing a reconcile on a NetworkBehaviour. - /// - public event Action OnPostReconcile; -#else /// /// Called before performing a reconcile. Contains the client and server tick the reconcile is for. /// public event PreReconcileDel OnPreReconcile; + public delegate void PreReconcileDel(uint clientTick, uint serverTick); /// - /// Called after performing a reconcile. Contains the client and server tick the reconcile is for. + /// Called when performing a reconcile. + /// This is used internally to reconcile objects and does not gaurantee your subscriptions to this event will process before or after internal components. /// - public event Action OnPostReconcile; -#endif -#if !PREDICTION_V2 + public event ReconcileDel OnReconcile; + public delegate void ReconcileDel(uint clientTick, uint serverTick); /// - /// Called before physics is simulated when replaying a replicate method. - /// Contains the PhysicsScene and PhysicsScene2D which was simulated. - /// - public event Action OnPreReplicateReplay; - /// - /// Called after physics is simulated when replaying a replicate method. - /// Contains the PhysicsScene and PhysicsScene2D which was simulated. + /// Called after performing a reconcile. Contains the client and server tick the reconcile is for. /// - public event Action OnPostReplicateReplay; -#else + public event PostReconcileDel OnPostReconcile; + public delegate void PostReconcileDel(uint clientTick, uint serverTick); /// /// Called before Physics SyncTransforms are run after a reconcile. /// This will only invoke if physics are set to TimeManager, within the TimeManager inspector. @@ -79,8 +58,9 @@ public sealed class PredictionManager : MonoBehaviour public event PreReplicateReplayDel OnPreReplicateReplay; public delegate void PreReplicateReplayDel(uint clientTick, uint serverTick); /// - /// Called internally to replay inputs for a tick. + /// Called when replaying a replication. /// This is called before physics are simulated. + /// This is used internally to replay objects and does not gaurantee your subscriptions to this event will process before or after internal components. /// internal event ReplicateReplayDel OnReplicateReplay; public delegate void ReplicateReplayDel(uint clientTick, uint serverTick); @@ -89,8 +69,581 @@ public sealed class PredictionManager : MonoBehaviour /// public event PostReplicateReplayDel OnPostReplicateReplay; public delegate void PostReplicateReplayDel(uint clientTick, uint serverTick); + /// + /// True if client timing needs to be reduced. This is fine-tuning of the prediction system. + /// + internal bool ReduceClientTiming; + /// + /// True if prediction is currently reconciling. While reconciling run replicates will be replays. + /// + public bool IsReconciling { get; private set; } + /// + /// When not unset this is the current tick which local client is replaying authoraitive inputs on. + /// + public uint ClientReplayTick { get; private set; } = TimeManager.UNSET_TICK; + /// + /// When not unset this is the current tick which local client is replaying non-authoraitive inputs on. + /// + public uint ServerReplayTick { get; private set; } = TimeManager.UNSET_TICK; + /// + /// Local tick on the most recent performed reconcile. + /// + public uint ClientStateTick { get; private set; } = TimeManager.UNSET_TICK; + /// + /// Server tick on the most recent performed reconcile. + /// + public uint ServerStateTick { get; private set; } = TimeManager.UNSET_TICK; + #endregion + + #region Serialized. + ///// + ///// + ///// + //[Tooltip("Number of inputs to keep in queue for server and clients. " + + // "Higher values will increase the likeliness of continous user created data to arrive successfully. " + + // "Lower values will increase processing rate of received replicates. +" + + // "This value cannot be higher than MaximumServerReplicates.")] + //[Range(0, 15)] + //[SerializeField] + //private byte _queuedInputs = 1; + ///// + ///// Number of inputs to keep in queue for server and clients. + ///// Higher values will increase the likeliness of continous user created data to arrive successfully. + ///// Lower values will increase processing rate of received replicates. + ///// This value cannot be higher than MaximumServerReplicates. + ///// + ////TODO: this is 0 until the rework on it is completed. + //public byte QueuedInputs => 0;// _queuedInputs; + /// + /// + /// + [Tooltip("True to drop replicates from clients which are being received excessively. This can help with attacks but may cause client to temporarily desynchronize during connectivity issues. When false the server will hold at most up to 3 seconds worth of replicates, consuming multiple per tick to clear out the buffer quicker. This is good to ensure all inputs are executed but potentially could allow speed hacking.")] + [SerializeField] + private bool _dropExcessiveReplicates = true; + /// + /// True to drop replicates from clients which are being received excessively. This can help with attacks but may cause client to temporarily desynchronize during connectivity issues. + /// When false the server will hold at most up to 3 seconds worth of replicates, consuming multiple per tick to clear out the buffer quicker. This is good to ensure all inputs are executed but potentially could allow speed hacking. + /// + internal bool DropExcessiveReplicates => _dropExcessiveReplicates; + /// + /// + /// + [Tooltip("Maximum number of replicates a server can queue per object. Higher values will put more load on the server and add replicate latency for the client.")] + [SerializeField] + private byte _maximumServerReplicates = 15; + /// + /// Maximum number of replicates a server can queue per object. Higher values will put more load on the server and add replicate latency for the client. + /// + public byte GetMaximumServerReplicates() => _maximumServerReplicates; + /// + /// Sets the maximum number of replicates a server can queue per object. + /// + /// + public void SetMaximumServerReplicates(byte value) + { + _maximumServerReplicates = (byte)Mathf.Clamp(value, MINIMUM_REPLICATE_QUEUE_SIZE, MAXIMUM_REPLICATE_QUEUE_SIZE); + } + /// + /// Clients should store no more than 2 seconds worth of replicates. + /// + internal ushort MaximumClientReplicates => (ushort)(_networkManager.TimeManager.TickRate * 5); + /// + /// + /// + [Tooltip("How many states to try and hold in a buffer. Larger values add resillience against network issues at the cost of running states later.")] + [Range(MINIMUM_PAST_INPUTS, MAXIMUM_PAST_INPUTS)] + [FormerlySerializedAs("_redundancyCount")] //Remove on V5. + [SerializeField] + private byte _interpolation = 2; + /// + /// How many states to try and hold in a buffer. Larger values add resillience against network issues at the cost of running states later. + /// + internal byte Interpolation => _interpolation; + /// + /// True to allow clients to use predicted spawning. While true, each NetworkObject prefab you wish to predicted spawn must be marked as to allow this feature. + /// + internal bool GetAllowPredictedSpawning() => _allowPredictedSpawning; + [Tooltip("True to allow clients to use predicted spawning and despawning. While true, each NetworkObject prefab you wish to predicted spawn must be marked as to allow this feature.")] + [SerializeField] + private bool _allowPredictedSpawning = false; + /// + /// + /// + [Tooltip("Maximum number of Ids to reserve on clients for predicted spawning. Higher values will allow clients to send more predicted spawns per second but may reduce availability of ObjectIds with high player counts.")] + [Range(1, 100)] + [SerializeField] + private byte _reservedObjectIds = 15; + /// + /// Maximum number of Ids to reserve on clients for predicted spawning. Higher values will allow clients to send more predicted spawns per second but may reduce availability of ObjectIds with high player counts. + /// + /// + internal byte GetReservedObjectIds() => _reservedObjectIds; + #endregion + + #region Private. + /// + /// Number of reconciles dropped due to high latency. + /// This is not necessarily needed but can save performance on machines struggling to keep up with simulations when combined with low frame rate. + /// + private byte _droppedReconcilesCount; + /// + /// Current reconcile state to use. + /// + //private StatePacket _reconcileState; + private Queue _reconcileStates = new Queue(); + /// + /// Look up to find states by their tick. + /// Key: client LocalTick on the state. + /// Value: StatePacket stored. + /// + private Dictionary _stateLookups = new Dictionary(); + /// + /// Last ordered tick read for a reconcile state. + /// + private uint _lastOrderedReadReconcileTick; + /// + /// NetworkManager used with this. + /// + private NetworkManager _networkManager; + #endregion + + #region Const. + /// + /// Minimum number of past inputs which can be sent. + /// + private const byte MINIMUM_PAST_INPUTS = 1; + /// + /// Maximum number of past inputs which can be sent. + /// + internal const byte MAXIMUM_PAST_INPUTS = 5; + /// + /// Minimum amount of replicate queue size. + /// + private const byte MINIMUM_REPLICATE_QUEUE_SIZE = (MINIMUM_PAST_INPUTS + 1); + /// + /// Maxmimum amount of replicate queue size. + /// + private const byte MAXIMUM_REPLICATE_QUEUE_SIZE = byte.MaxValue; + #endregion + + internal void InitializeOnce(NetworkManager manager) + { + _networkManager = manager; + ClampInterpolation(); + _networkManager.ClientManager.OnClientConnectionState += ClientManager_OnClientConnectionState; + } + + /// + /// Called after the local client connection state changes. + /// + private void ClientManager_OnClientConnectionState(ClientConnectionStateArgs obj) + { + _droppedReconcilesCount = 0; + _lastOrderedReadReconcileTick = 0; + } + + /// + /// Amount to reserve for the header of a state update. + /// + internal const int STATE_HEADER_RESERVE_LENGTH = (TransportManager.PACKETID_LENGTH + TransportManager.UNPACKED_TICK_LENGTH + TransportManager.UNPACKED_SIZE_LENGTH); + + /// + /// Clamps queued inputs to a valid value. + /// + private void ClampInterpolation() + { + ushort startingValue = _interpolation; + //Check for setting if dropping. + if (_dropExcessiveReplicates && _interpolation > _maximumServerReplicates) + _interpolation = (byte)(_maximumServerReplicates - 1); + + //If changed. + if (_interpolation != startingValue) + _networkManager.Log($"Interpolation has been set to {_interpolation}."); + } + + internal class StatePacket : IResettable + { + public struct IncomingData + { + public ArraySegment Data; + public Channel Channel; + + public IncomingData(ArraySegment data, Channel channel) + { + Data = data; + Channel = channel; + } + } + public List Datas; + public uint ClientTick; + public uint ServerTick; + + public void Update(ArraySegment data, uint clientTick, uint serverTick, Channel channel) + { + AddData(data, channel); + ServerTick = serverTick; + ClientTick = clientTick; + } + + public void AddData(ArraySegment data, Channel channel) + { + Datas.Add(new IncomingData(data, channel)); + } + + public void ResetState() + { + for (int i = 0; i < Datas.Count; i++) + ByteArrayPool.Store(Datas[i].Data.Array); + + CollectionCaches.StoreAndDefault(ref Datas); + } + + public void InitializeState() + { + Datas = CollectionCaches.RetrieveList(); + } + } + + /// + /// Reconciles to received states. + /// + internal void ReconcileToStates() + { + if (!_networkManager.IsClientStarted) + return; + //No states. + if (_reconcileStates.Count == 0) + return; + + TimeManager tm = _networkManager.TimeManager; + uint localTick = tm.LocalTick; + uint estimatedLastRemoteTick = tm.LastPacketTick.Value(); + + /* When there is an excessive amount of states try to consume + * some.This only happens when the client gets really far behind + * and has to catch up, such as a latency increase then drop. + * Limit the number of states consumed per tick so the clients + * computer doesn't catch fire. */ + int iterations = 0; + + while (_reconcileStates.Count > 0) + { + iterations++; + /* Typically there should only be 'interpolation' amount in queue. + * If there's more than interpolation (+1 for buffer) then begin to + * consume multiple. */ + int maxIterations = (_reconcileStates.Count > (Interpolation + 1)) ? 2 : 1; + //At most 2 iterations. + if (iterations > maxIterations) + return; + + StatePacket sp = null; + if (!ConditionsMet(_reconcileStates.Peek())) + return; + else + sp = _reconcileStates.Dequeue(); + + //Condition met. See if the next one matches condition, if so drop current. + //Returns if a state has it's conditions met. + bool ConditionsMet(StatePacket spChecked) + { + if (spChecked == null) + return false; + + return ((spChecked != null) && (spChecked.ServerTick <= (estimatedLastRemoteTick - Interpolation)) && spChecked.ClientTick < (localTick - Interpolation)); + } + + bool dropReconcile = false; + uint clientTick = sp.ClientTick; + uint serverTick = sp.ServerTick; + + /* If client has a low frame rate + * then limit the number of reconciles to prevent further performance loss. */ + if (_networkManager.TimeManager.LowFrameRate) + { + /* Limit 3 drops a second. DropValue will be roughly the same + * as every 330ms. */ + int reconcileValue = Mathf.Max(1, (_networkManager.TimeManager.TickRate / 3)); + //If cannot drop then reset dropcount. + if (_droppedReconcilesCount >= reconcileValue) + { + _droppedReconcilesCount = 0; + } + //If can drop... + else + { + dropReconcile = true; + _droppedReconcilesCount++; + } + } + //} + //No reason to believe client is struggling, allow reconcile. + else + { + _droppedReconcilesCount = 0; + } + + if (!dropReconcile) + { + IsReconciling = true; + + ClientStateTick = clientTick; + /* This is the tick which the reconcile is for. + * Since reconciles are performed after replicate, if + * the replicate was on tick 100 then this reconcile is the state + * on tick 100, after the replicate is performed. */ + ServerStateTick = serverTick; + + //Have the reader get processed. + foreach (StatePacket.IncomingData item in sp.Datas) + { + PooledReader reader = ReaderPool.Retrieve(item.Data, _networkManager, Reader.DataSource.Server); + _networkManager.ClientManager.ParseReader(reader, item.Channel); + ReaderPool.Store(reader); + } + + bool timeManagerPhysics = (tm.PhysicsMode == PhysicsMode.TimeManager); + float tickDelta = (float)tm.TickDelta; + + OnPreReconcile?.Invoke(ClientStateTick, ServerStateTick); + OnReconcile?.Invoke(ClientStateTick, ServerStateTick); + + if (timeManagerPhysics) + { + OnPrePhysicsTransformSync?.Invoke(ClientStateTick, ServerStateTick); + Physics.SyncTransforms(); + Physics2D.SyncTransforms(); + OnPostPhysicsTransformSync?.Invoke(ClientStateTick, ServerStateTick); + } + /* Set first replicate to be the 1 tick + * after reconcile. This is because reconcile calcs + * should be performed after replicate has run. + * In result object will reconcile to data AFTER + * the replicate tick, and then run remaining replicates as replay. + * + * Replay up to localtick, excluding localtick. There will + * be no input for localtick since reconcile runs before + * OnTick. */ + ClientReplayTick = ClientStateTick; + ServerReplayTick = ServerStateTick; + + /* Only replay up to this tick excluding queuedInputs. + * This will prevent the client from replaying into + * it's authorative/owned inputs which have not run + * yet. + * + * An additional value is subtracted to prevent + * client from running 1 local tick into the future + * since the OnTick has not run yet. */ + while (ClientReplayTick < localTick) + { + OnPreReplicateReplay?.Invoke(ClientReplayTick, ServerReplayTick); + OnReplicateReplay?.Invoke(ClientReplayTick, ServerReplayTick); + if (timeManagerPhysics) + { + Physics.Simulate(tickDelta); + Physics2D.Simulate(tickDelta); + } + OnPostReplicateReplay?.Invoke(ClientReplayTick, ServerReplayTick); + ClientReplayTick++; + ServerReplayTick++; + } + + OnPostReconcile?.Invoke(ClientStateTick, ServerStateTick); + + ClientStateTick = TimeManager.UNSET_TICK; + ServerStateTick = TimeManager.UNSET_TICK; + ClientReplayTick = TimeManager.UNSET_TICK; + ServerReplayTick = TimeManager.UNSET_TICK; + IsReconciling = false; + } + + DisposeOfStatePacket(sp); + } + } + /// + /// Sends written states for clients. + /// + internal void SendStateUpdate() + { + TransportManager tm = _networkManager.TransportManager; + foreach (NetworkConnection nc in _networkManager.ServerManager.Clients.Values) + { + uint lastReplicateTick; + //If client has performed a replicate. + if (!nc.ReplicateTick.IsUnset) + { + lastReplicateTick = nc.ReplicateTick.Value(); + ///* If it's been longer than queued inputs since + // * server has received a replicate then + // * use estimated value. Otherwise use LastRemoteTick. */ + //if (nc.ReplicateTick.LocalTickDifference(_networkManager.TimeManager) > QueuedInputs) + // lastReplicateTick = nc.ReplicateTick.Value(); + //else + // lastReplicateTick = nc.ReplicateTick.LastRemoteTick; + } + /* If not then use what is estimated to be the clients + * current tick along with desired prediction queue count. + * This should be just about the same as if the client used replicate, + * but even if it's not it doesn't matter because the client + * isn't replicating himself, just reconciling and replaying other objects. */ + else + { + //lastReplicateTick = (nc.PacketTick.Value() + Interpolation - 1); + lastReplicateTick = (nc.PacketTick.Value() - 1); + } + + foreach (PooledWriter writer in nc.PredictionStateWriters) + { + /* Packet is sent as follows... + * PacketId. + * LastReplicateTick of receiver. + * Length of packet. + * Data. */ + ArraySegment segment = writer.GetArraySegment(); + writer.Position = 0; + writer.WritePacketId(PacketId.StateUpdate); + writer.WriteTickUnpacked(lastReplicateTick); + /* Send the full length of the writer excluding + * the reserve count of the header. The header reserve + * count will always be the same so that can be parsed + * off immediately upon receiving. */ + int dataLength = (segment.Count - STATE_HEADER_RESERVE_LENGTH); + //Write length. + writer.WriteInt32(dataLength, AutoPackType.Unpacked); + //Channel is defaulted to unreliable. + Channel channel = Channel.Unreliable; + //If a single state exceeds MTU it must be sent on reliable. This is extremely unlikely. + _networkManager.TransportManager.CheckSetReliableChannel(segment.Count, ref channel); + tm.SendToClient((byte)channel, segment, nc, true); + } + + nc.StorePredictionStateWriters(); + } + } + + + /// + /// Parses a received state update. + /// + internal void ParseStateUpdate(PooledReader reader, Channel channel) + { + uint lastRemoteTick = _networkManager.TimeManager.LastPacketTick.LastRemoteTick; + //If server or state is older than another received state. + if (_networkManager.IsServerStarted || (lastRemoteTick < _lastOrderedReadReconcileTick)) + { + /* If the server is receiving a state update it can + * simply discard the data since the server will never + * need to reset states. This can occur on the clientHost + * side. */ + reader.ReadTickUnpacked(); + int length = reader.ReadInt32(AutoPackType.Unpacked); + reader.Skip(length); + } + else + { + _lastOrderedReadReconcileTick = lastRemoteTick; + + /* There should never really be more than queuedInputs so set + * a limit a little beyond to prevent reconciles from building up. + * This is more of a last result if something went terribly + * wrong with the network. */ + int maxAllowedStates = Mathf.Max(Interpolation * 4, 4); + while (_reconcileStates.Count > maxAllowedStates) + { + StatePacket oldSp = _reconcileStates.Dequeue(); + DisposeOfStatePacket(oldSp); + } + //LocalTick of this client the state is for. + uint clientTick = reader.ReadTickUnpacked(); + //Length of packet. + int length = reader.ReadInt32(AutoPackType.Unpacked); + //Read data into array. + byte[] arr = ByteArrayPool.Retrieve(length); + reader.ReadBytes(ref arr, length); + //Make segment and store into states. + ArraySegment segment = new ArraySegment(arr, 0, length); + + /* See if an entry was already added for the clientTick. If so then + * add onto the datas. Otherwise add a new state packet. */ + if (_stateLookups.TryGetValue(clientTick, out StatePacket sp1)) + { + sp1.AddData(segment, channel); + } + else + { + StatePacket sp2 = ResettableObjectCaches.Retrieve(); + sp2.Update(segment, clientTick, lastRemoteTick, channel); + _stateLookups[clientTick] = sp2; + _reconcileStates.Enqueue(sp2); + } + } + } + + /// + /// Disposes of and cleans up everything related to a StatePacket. + /// + private void DisposeOfStatePacket(StatePacket sp) + { + uint clientTick = sp.ClientTick; + _stateLookups.Remove(clientTick); + ResettableObjectCaches.Store(sp); + } + +#if UNITY_EDITOR + private void OnValidate() + { + ClampInterpolation(); + } + #endif -#if !PREDICTION_V2 + } + +} + +#else + +using FishNet.CodeGenerating; +using FishNet.Documenting; +using FishNet.Object; +using FishNet.Serializing.Helping; +using FishNet.Transporting; +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityScene = UnityEngine.SceneManagement.Scene; + + +namespace FishNet.Managing.Predicting +{ + + /// + /// Additional options for managing the observer system. + /// + [DisallowMultipleComponent] + [AddComponentMenu("FishNet/Manager/PredictionManager")] + public sealed class PredictionManager : MonoBehaviour + { +#region Public. + /// + /// Called before performing a reconcile on NetworkBehaviour. + /// + public event Action OnPreReconcile; + /// + /// Called after performing a reconcile on a NetworkBehaviour. + /// + public event Action OnPostReconcile; + /// + /// Called before physics is simulated when replaying a replicate method. + /// Contains the PhysicsScene and PhysicsScene2D which was simulated. + /// + public event Action OnPreReplicateReplay; + /// + /// Called after physics is simulated when replaying a replicate method. + /// Contains the PhysicsScene and PhysicsScene2D which was simulated. + /// + public event Action OnPostReplicateReplay; /// /// Called before the server sends a reconcile. /// @@ -121,34 +674,9 @@ public sealed class PredictionManager : MonoBehaviour /// /// public bool IsReplaying(UnityScene scene) => _replayingScenes.Contains(scene); -#else - /// - /// True if prediction is currently reconciling. While reconciling run replicates will be replays. - /// - public bool IsReconciling { get; private set; } - /// - /// When not unset this is the current tick which local client is replaying authoraitive inputs on. - /// - public uint ClientReplayTick { get; private set; } = TimeManager.UNSET_TICK; - /// - /// When not unset this is the current tick which local client is replaying non-authoraitive inputs on. - /// - public uint ServerReplayTick { get; private set; } = TimeManager.UNSET_TICK; - /// - /// Local tick on the most recent performed reconcile. - /// - public uint ClientStateTick { get; private set; } = TimeManager.UNSET_TICK; - /// - /// Server tick on the most recent performed reconcile. - /// - public uint ServerStateTick { get; private set; } = TimeManager.UNSET_TICK; -#endif -#if !PREDICTION_V2 +#endregion -#endif - #endregion - - #region Serialized. +#region Serialized. /// /// /// @@ -159,22 +687,12 @@ public sealed class PredictionManager : MonoBehaviour [Range(0, 15)] [SerializeField] private byte _queuedInputs = 1; -#if PREDICTION_V2 - /// - /// Number of inputs to keep in queue for server and clients. - /// Higher values will increase the likeliness of continous user created data to arrive successfully. - /// Lower values will increase processing rate of received replicates. - /// This value cannot be higher than MaximumServerReplicates. - /// - public byte QueuedInputs => _queuedInputs; -#else /// /// Number of inputs to keep in queue should the server miss receiving an input update from the client. /// Higher values will increase the likeliness of the server always having input from the client while lower values will allow the client input to run on the server faster. /// This value cannot be higher than MaximumServerReplicates. /// public ushort QueuedInputs => (ushort)(_queuedInputs + 1); -#endif /// /// /// @@ -204,7 +722,6 @@ public void SetMaximumServerReplicates(byte value) { _maximumServerReplicates = (byte)Mathf.Clamp(value, MINIMUM_REPLICATE_QUEUE_SIZE, MAXIMUM_REPLICATE_QUEUE_SIZE); } -#if !PREDICTION_V2 /// /// /// @@ -215,7 +732,6 @@ public void SetMaximumServerReplicates(byte value) /// Maximum number of excessive replicates which can be consumed per tick. Consumption count will scale up to this value automatically. /// internal byte MaximumReplicateConsumeCount => _maximumConsumeCount; -#endif /// /// Clients should store no more than 2 seconds worth of replicates. /// @@ -250,10 +766,9 @@ public void SetMaximumServerReplicates(byte value) /// /// internal byte GetReservedObjectIds() => _reservedObjectIds; - #endregion +#endregion - #region Private. -#if !PREDICTION_V2 +#region Private. /// /// Number of active predicted rigidbodies. /// @@ -268,29 +783,13 @@ public void SetMaximumServerReplicates(byte value) /// Scenes which are currently replaying prediction. /// private HashSet _replayingScenes = new HashSet(new SceneHandleEqualityComparer()); -#else - /// - /// Number of reconciles dropped due to high latency. - /// This is not necessarily needed but can save performance on machines struggling to keep up with simulations when combined with low frame rate. - /// - private byte _droppedReconcilesCount; - /// - /// Current reconcile state to use. - /// - //private StatePacket _reconcileState; - private Queue _reconcileStates = new Queue(); - /// - /// Last ordered tick read for a reconcile state. - /// - private uint _lastOrderedReadReconcileTick; -#endif /// /// NetworkManager used with this. /// private NetworkManager _networkManager; - #endregion +#endregion - #region Const. +#region Const. /// /// Minimum number of past inputs which can be sent. /// @@ -307,9 +806,8 @@ public void SetMaximumServerReplicates(byte value) /// Maxmimum amount of replicate queue size. /// private const byte MAXIMUM_REPLICATE_QUEUE_SIZE = byte.MaxValue; - #endregion +#endregion -#if !PREDICTION_V2 private void OnEnable() { UnityEngine.SceneManagement.SceneManager.sceneUnloaded += SceneManager_sceneUnloaded; @@ -325,18 +823,7 @@ internal void InitializeOnce(NetworkManager manager) _networkManager = manager; _networkManager.ClientManager.OnClientConnectionState += ClientManager_OnClientConnectionState; } -#endif - -#if PREDICTION_V2 - internal void InitializeOnce(NetworkManager manager) - { - _networkManager = manager; - ClampQueuedInputs(); - _networkManager.ClientManager.OnClientConnectionState += ClientManager_OnClientConnectionState; - } -#endif -#if !PREDICTION_V2 /// /// Called after the local client connection state changes. /// @@ -345,17 +832,6 @@ private void ClientManager_OnClientConnectionState(ClientConnectionStateArgs obj if (obj.ConnectionState != LocalConnectionState.Started) _replayingScenes.Clear(); } -#else - /// - /// Called after the local client connection state changes. - /// - private void ClientManager_OnClientConnectionState(ClientConnectionStateArgs obj) - { - _droppedReconcilesCount = 0; - - } -#endif - /// /// Called before and after server sends a reconcile. @@ -363,15 +839,12 @@ private void ClientManager_OnClientConnectionState(ClientConnectionStateArgs obj /// True if before the reconcile is sent. internal void InvokeServerReconcile(NetworkBehaviour caller, bool before) { -#if !PREDICTION_V2 if (before) OnPreServerReconcile?.Invoke(caller); else OnPostServerReconcile?.Invoke(caller); -#endif } -#if !PREDICTION_V2 /// /// Increases Rigidbodies count by 1. /// @@ -419,18 +892,16 @@ public void RemoveRigidbodyCount(UnityEngine.Component c) /// Internal use. /// [APIExclude] - [MakePublic] //To internal. + [MakePublic] internal void InvokeOnReconcile(NetworkBehaviour nb, bool before) { - nb.IsReconciling = before; + nb.IsBehaviourReconciling = before; if (before) OnPreReconcile?.Invoke(nb); else OnPostReconcile?.Invoke(nb); } -#endif -#if !PREDICTION_V2 /// /// Invokes OnReplicateReplay. /// Internal use. @@ -458,309 +929,9 @@ private void SceneManager_sceneUnloaded(UnityScene s) { _replayingScenes.Remove(s); } -#endif - -#if PREDICTION_V2 - /// - /// Amount to reserve for the header of a state update. - /// 2 PacketId. - /// 4 Last replicate tick run for connection. - /// 4 Length unpacked. - /// - internal const int STATE_HEADER_RESERVE_COUNT = 10; - - /// - /// Clamps queued inputs to a valid value. - /// - private void ClampQueuedInputs() - { - ushort startingValue = _queuedInputs; - //Check for setting if dropping. - if (_dropExcessiveReplicates && _queuedInputs > _maximumServerReplicates) - _queuedInputs = (byte)(_maximumServerReplicates - 1); - - //If changed. - if (_queuedInputs != startingValue) - _networkManager.Log($"QueuedInputs has been set to {_queuedInputs}."); - } - - public struct StatePacket - { - public ArraySegment Data; - public uint ClientTick; - public uint ServerTick; - public bool IsValid => (Data.Array != null); - - public StatePacket(ArraySegment data, uint clientTick, uint serverTick) - { - Data = data; - ServerTick = serverTick; - ClientTick = clientTick; - } - - public void ResetState() - { - if (!IsValid) - return; - - ByteArrayPool.Store(Data.Array); - Data = default; - } - } - - /// - /// Reconciles to received states. - /// - internal void ReconcileToStates() - { - if (!_networkManager.IsClientStarted) - return; - //No states. - if (_reconcileStates.Count == 0) - return; - - uint estimatedLastRemoteTick = _networkManager.TimeManager.LastPacketTick.Value(); - //NOTESSTART - /* Don't run a reconcile unless it's possible for ticks queued - * that tick to be run already. Otherwise you are not replaying inputs - * at all, just snapping to corrections. This means states which arrive late or out of order - * will be ignored since they're before the reconcile, which means important actions - * could have gone missed. - * - * A system which synchronized all current states rather than what's only needed to correct - * the inputs would likely solve this. */ - //NOTESEND - if (_reconcileStates.Peek().ClientTick >= (_networkManager.TimeManager.LocalTick - QueuedInputs - 2)) - return; - - uint localTick = _networkManager.TimeManager.LocalTick; - StatePacket sp = _reconcileStates.Dequeue(); - PooledReader reader = ReaderPool.Retrieve(sp.Data, _networkManager, Reader.DataSource.Server); - - uint clientTick = sp.ClientTick; - uint serverTick = sp.ServerTick; - - bool dropReconcile = false; - double timePassed = _networkManager.TimeManager.TicksToTime(localTick - clientTick); - /* If client has a massive ping or is suffering from a low frame rate - * then limit the number of reconciles to prevent further performance loss. */ - if (timePassed > 1.5d || _networkManager.TimeManager.LowFrameRate) - { - /* Limit 3 drops a second. DropValue will be roughly the same - * as every 330ms. */ - int reconcileValue = Mathf.Max(1, (_networkManager.TimeManager.TickRate / 3)); - //If cannot drop then reset dropcount. - if (_droppedReconcilesCount >= reconcileValue) - { - _droppedReconcilesCount = 0; - } - //If can drop... - else - { - dropReconcile = true; - _droppedReconcilesCount++; - } - } - //No reason to believe client is struggling, allow reconcile. - else - { - _droppedReconcilesCount = 0; - } - - if (!dropReconcile) - { - IsReconciling = true; - - ClientStateTick = clientTick; - /* This is the tick which the reconcile is for. - * Since reconciles are performed after replicate, if - * the replicate was on tick 100 then this reconcile is the state - * on tick 100, after the replicate is performed. */ - ServerStateTick = serverTick; - - //Have the reader get processed. - _networkManager.ClientManager.ParseReader(reader, Channel.Reliable); - - TimeManager tm = _networkManager.TimeManager; - bool timeManagerPhysics = (tm.PhysicsMode == PhysicsMode.TimeManager); - float tickDelta = (float)tm.TickDelta; - - OnPreReconcile?.Invoke(ClientStateTick, ServerStateTick); - - if (timeManagerPhysics) - { - OnPrePhysicsTransformSync?.Invoke(ClientStateTick, ServerStateTick); - Physics.SyncTransforms(); - Physics2D.SyncTransforms(); - OnPostPhysicsTransformSync?.Invoke(ClientStateTick, ServerStateTick); - } - int replays = 0; - //Replays. - /* Set first replicate to be the 1 tick - * after reconcile. This is because reconcile calcs - * should be performed after replicate has run. - * In result object will reconcile to data AFTER - * the replicate tick, and then run remaining replicates as replay. - * - * Replay up to localtick, excluding localtick. There will - * be no input for localtick since reconcile runs before - * OnTick. */ - ClientReplayTick = ClientStateTick; - ServerReplayTick = ServerStateTick; - /* Only replay up to this tick excluding queuedInputs. - * This will prevent the client from replaying into - * it's authorative/owned inputs which have not run - * yet. - * - * An additional value is subtracted to prevent - * client from running 1 local tick into the future - * since the OnTick has not run yet. */ - while (ClientReplayTick < (localTick - QueuedInputs - 1)) - { - OnPreReplicateReplay?.Invoke(ClientReplayTick, ServerReplayTick); - OnReplicateReplay?.Invoke(ClientReplayTick, ServerReplayTick); - if (timeManagerPhysics) - { - Physics.Simulate(tickDelta); - Physics2D.Simulate(tickDelta); - } - OnPostReplicateReplay?.Invoke(ClientReplayTick, ServerReplayTick); - replays++; - ClientReplayTick++; - ServerReplayTick++; - } - - OnPostReconcile?.Invoke(ClientStateTick, ServerStateTick); - - ClientStateTick = TimeManager.UNSET_TICK; - ServerStateTick = TimeManager.UNSET_TICK; - ClientReplayTick = TimeManager.UNSET_TICK; - ServerReplayTick = TimeManager.UNSET_TICK; - IsReconciling = false; - } - //Intentionally left blank. - else - { - } - - sp.ResetState(); - ReaderPool.Store(reader); - } - /// - /// Sends written states for clients. - /// - internal void SendStateUpdate() - { - TransportManager tm = _networkManager.TransportManager; - foreach (NetworkConnection nc in _networkManager.ServerManager.Clients.Values) - { - uint lastReplicateTick; - //If client has performed a replicate. - if (!nc.ReplicateTick.IsUnset) - { - /* If it's been longer than queued inputs since - * server has received a replicate then - * use estimated value. Otherwise use LastRemoteTick. */ - if (nc.ReplicateTick.LocalTickDifference(_networkManager.TimeManager) > QueuedInputs) - lastReplicateTick = nc.ReplicateTick.Value(); - else - lastReplicateTick = nc.ReplicateTick.LastRemoteTick; - } - /* If not then use what is estimated to be the clients - * current tick along with desired prediction queue count. - * This should be just about the same as if the client used replicate, - * but even if it's not it doesn't matter because the client - * isn't replicating himself, just reconciling and replaying other objects. */ - else - { - lastReplicateTick = (nc.PacketTick.Value() + QueuedInputs); - } - - foreach (PooledWriter writer in nc.PredictionStateWriters) - { - /* Packet is sent as follows... - * PacketId. - * LastReplicateTick of receiver. - * Length of packet. - * Data. */ - ArraySegment segment = writer.GetArraySegment(); - writer.Position = 0; - writer.WritePacketId(PacketId.StateUpdate); - writer.WriteTickUnpacked(lastReplicateTick); - /* Send the full length of the writer excluding - * the reserve count of the header. The header reserve - * count will always be the same so that can be parsed - * off immediately upon receiving. */ - int dataLength = (segment.Count - STATE_HEADER_RESERVE_COUNT); - //Write length. - writer.WriteInt32(dataLength, AutoPackType.Unpacked); - //Channel is defaulted to unreliable. - Channel channel = Channel.Unreliable; - //If a single state exceeds MTU it must be sent on reliable. This is extremely unlikely. - _networkManager.TransportManager.CheckSetReliableChannel(segment.Count, ref channel); - tm.SendToClient((byte)channel, segment, nc, true); - } - - nc.StorePredictionStateWriters(); - } - } - - - /// - /// Parses a received state update. - /// - internal void ParseStateUpdate(PooledReader reader) - { - uint lastRemoteTick = _networkManager.TimeManager.LastPacketTick.LastRemoteTick; - //If server or state is older than another received state. - if (_networkManager.IsServerStarted || (lastRemoteTick < _lastOrderedReadReconcileTick)) - { - /* If the server is receiving a state update it can - * simply discard the data since the server will never - * need to reset states. This can occur on the clientHost - * side. */ - reader.ReadTickUnpacked(); - int length = reader.ReadInt32(AutoPackType.Unpacked); - reader.Skip(length); - } - else - { - _lastOrderedReadReconcileTick = lastRemoteTick; - - /* There should never really be more than queuedInputs so set - * a limit a little beyond to prevent reconciles from building up. - * This is more of a last result if something went terribly - * wrong with the network. */ - int maxAllowedStates = Mathf.Max(QueuedInputs * 4, 4); - while (_reconcileStates.Count > maxAllowedStates) - { - StatePacket sp = _reconcileStates.Dequeue(); - sp.ResetState(); - } - - //LocalTick of this client the state is for. - uint clientTick = reader.ReadTickUnpacked(); - //Length of packet. - int length = reader.ReadInt32(AutoPackType.Unpacked); - //Read data into array. - byte[] arr = ByteArrayPool.Retrieve(length); - reader.ReadBytes(ref arr, length); - //Make segment and store into states. - ArraySegment segment = new ArraySegment(arr, 0, length); - _reconcileStates.Enqueue(new StatePacket(segment, clientTick, lastRemoteTick)); - } - } - -#endif -#if PREDICTION_V2 -#if UNITY_EDITOR - private void OnValidate() - { - ClampQueuedInputs(); - } -#endif -#endif } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Managing/Prediction/PredictionManager.cs.meta b/Assets/FishNet/Runtime/Managing/Prediction/PredictionManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Prediction/PredictionManager.cs.meta rename to Assets/FishNet/Runtime/Managing/Prediction/PredictionManager.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/RemoteTimeoutType.cs b/Assets/FishNet/Runtime/Managing/RemoteTimeoutType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/RemoteTimeoutType.cs rename to Assets/FishNet/Runtime/Managing/RemoteTimeoutType.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/RemoteTimeoutType.cs.meta b/Assets/FishNet/Runtime/Managing/RemoteTimeoutType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/RemoteTimeoutType.cs.meta rename to Assets/FishNet/Runtime/Managing/RemoteTimeoutType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened.meta b/Assets/FishNet/Runtime/Managing/Scened.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened.meta rename to Assets/FishNet/Runtime/Managing/Scened.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/Broadcast.meta b/Assets/FishNet/Runtime/Managing/Scened/Broadcast.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/Broadcast.meta rename to Assets/FishNet/Runtime/Managing/Scened/Broadcast.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/Broadcast/SceneBroadcasts.cs b/Assets/FishNet/Runtime/Managing/Scened/Broadcast/SceneBroadcasts.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/Broadcast/SceneBroadcasts.cs rename to Assets/FishNet/Runtime/Managing/Scened/Broadcast/SceneBroadcasts.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/Broadcast/SceneBroadcasts.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/Broadcast/SceneBroadcasts.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/Broadcast/SceneBroadcasts.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/Broadcast/SceneBroadcasts.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/DefaultSceneProcessor.cs b/Assets/FishNet/Runtime/Managing/Scened/DefaultSceneProcessor.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/DefaultSceneProcessor.cs rename to Assets/FishNet/Runtime/Managing/Scened/DefaultSceneProcessor.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/DefaultSceneProcessor.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/DefaultSceneProcessor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/DefaultSceneProcessor.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/DefaultSceneProcessor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/Events.meta b/Assets/FishNet/Runtime/Managing/Scened/Events.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/Events.meta rename to Assets/FishNet/Runtime/Managing/Scened/Events.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/Events/ClientPresenceChangeEventArgs.cs b/Assets/FishNet/Runtime/Managing/Scened/Events/ClientPresenceChangeEventArgs.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/Events/ClientPresenceChangeEventArgs.cs rename to Assets/FishNet/Runtime/Managing/Scened/Events/ClientPresenceChangeEventArgs.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/Events/ClientPresenceChangeEventArgs.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/Events/ClientPresenceChangeEventArgs.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/Events/ClientPresenceChangeEventArgs.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/Events/ClientPresenceChangeEventArgs.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/Events/LoadSceneEventArgs.cs b/Assets/FishNet/Runtime/Managing/Scened/Events/LoadSceneEventArgs.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/Events/LoadSceneEventArgs.cs rename to Assets/FishNet/Runtime/Managing/Scened/Events/LoadSceneEventArgs.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/Events/LoadSceneEventArgs.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/Events/LoadSceneEventArgs.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/Events/LoadSceneEventArgs.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/Events/LoadSceneEventArgs.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/Events/UnloadSceneEventArgs.cs b/Assets/FishNet/Runtime/Managing/Scened/Events/UnloadSceneEventArgs.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/Events/UnloadSceneEventArgs.cs rename to Assets/FishNet/Runtime/Managing/Scened/Events/UnloadSceneEventArgs.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/Events/UnloadSceneEventArgs.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/Events/UnloadSceneEventArgs.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/Events/UnloadSceneEventArgs.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/Events/UnloadSceneEventArgs.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas.meta b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas.meta rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadOptions.cs b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadOptions.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadOptions.cs rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadOptions.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadOptions.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadOptions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadOptions.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadOptions.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadParams.cs b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadParams.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadParams.cs rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadParams.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadParams.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadParams.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadParams.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadParams.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadQueueData.cs b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadQueueData.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadQueueData.cs rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadQueueData.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadQueueData.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadQueueData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadQueueData.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/LoadQueueData.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/PreferredActiveScenes.cs b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/PreferredActiveScenes.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/PreferredActiveScenes.cs rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/PreferredActiveScenes.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/PreferredActiveScenes.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/PreferredActiveScenes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/PreferredActiveScenes.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/PreferredActiveScenes.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/ReplaceOption.cs b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/ReplaceOption.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/ReplaceOption.cs rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/ReplaceOption.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/ReplaceOption.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/ReplaceOption.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/ReplaceOption.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/ReplaceOption.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneLoadData.cs b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneLoadData.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneLoadData.cs rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneLoadData.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneLoadData.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneLoadData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneLoadData.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneLoadData.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneScopeTypes.cs b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneScopeTypes.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneScopeTypes.cs rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneScopeTypes.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneScopeTypes.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneScopeTypes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneScopeTypes.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneScopeTypes.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneUnloadData.cs b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneUnloadData.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneUnloadData.cs rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneUnloadData.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneUnloadData.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneUnloadData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneUnloadData.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/SceneUnloadData.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadOptions.cs b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadOptions.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadOptions.cs rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadOptions.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadOptions.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadOptions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadOptions.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadOptions.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadParams.cs b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadParams.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadParams.cs rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadParams.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadParams.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadParams.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadParams.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadParams.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadQueueData.cs b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadQueueData.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadQueueData.cs rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadQueueData.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadQueueData.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadQueueData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadQueueData.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/LoadUnloadDatas/UnloadQueueData.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/SceneLookupData.cs b/Assets/FishNet/Runtime/Managing/Scened/SceneLookupData.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/SceneLookupData.cs rename to Assets/FishNet/Runtime/Managing/Scened/SceneLookupData.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/SceneLookupData.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/SceneLookupData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/SceneLookupData.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/SceneLookupData.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/SceneManager.cs b/Assets/FishNet/Runtime/Managing/Scened/SceneManager.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/SceneManager.cs rename to Assets/FishNet/Runtime/Managing/Scened/SceneManager.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/SceneManager.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/SceneManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/SceneManager.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/SceneManager.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/SceneProcessorBase.cs b/Assets/FishNet/Runtime/Managing/Scened/SceneProcessorBase.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/SceneProcessorBase.cs rename to Assets/FishNet/Runtime/Managing/Scened/SceneProcessorBase.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/SceneProcessorBase.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/SceneProcessorBase.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/SceneProcessorBase.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/SceneProcessorBase.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/SceneSpawner.cs b/Assets/FishNet/Runtime/Managing/Scened/SceneSpawner.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/SceneSpawner.cs rename to Assets/FishNet/Runtime/Managing/Scened/SceneSpawner.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/SceneSpawner.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/SceneSpawner.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/SceneSpawner.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/SceneSpawner.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/UnloadedScene.cs b/Assets/FishNet/Runtime/Managing/Scened/UnloadedScene.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/UnloadedScene.cs rename to Assets/FishNet/Runtime/Managing/Scened/UnloadedScene.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Scened/UnloadedScene.cs.meta b/Assets/FishNet/Runtime/Managing/Scened/UnloadedScene.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Scened/UnloadedScene.cs.meta rename to Assets/FishNet/Runtime/Managing/Scened/UnloadedScene.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server.meta b/Assets/FishNet/Runtime/Managing/Server.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server.meta rename to Assets/FishNet/Runtime/Managing/Server.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/ClientConnectionBroadcast.cs b/Assets/FishNet/Runtime/Managing/Server/ClientConnectionBroadcast.cs similarity index 80% rename from Assets/Packages/FishNet/Runtime/Managing/Server/ClientConnectionBroadcast.cs rename to Assets/FishNet/Runtime/Managing/Server/ClientConnectionBroadcast.cs index 49a0178..53bac05 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Server/ClientConnectionBroadcast.cs +++ b/Assets/FishNet/Runtime/Managing/Server/ClientConnectionBroadcast.cs @@ -1,4 +1,5 @@ using FishNet.Broadcast; +using FishNet.CodeGenerating; using FishNet.Serializing; using FishNet.Utility.Performance; using GameKit.Dependencies.Utilities; @@ -12,19 +13,21 @@ public struct ClientConnectionChangeBroadcast : IBroadcast public int Id; } + [UseGlobalCustomSerializer] public struct ConnectedClientsBroadcast : IBroadcast { public List Values; } + internal static class ConnectedClientsBroadcastSerializers { - public static void WriteConnectedClientsBroadcast(this PooledWriter writer, ConnectedClientsBroadcast value) + public static void WriteConnectedClientsBroadcast(this Writer writer, ConnectedClientsBroadcast value) { writer.WriteList(value.Values); } - public static ConnectedClientsBroadcast ReadConnectedClientsBroadcast(this PooledReader reader) + public static ConnectedClientsBroadcast ReadConnectedClientsBroadcast(this Reader reader) { List cache = CollectionCaches.RetrieveList(); reader.ReadList(ref cache); diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/ClientConnectionBroadcast.cs.meta b/Assets/FishNet/Runtime/Managing/Server/ClientConnectionBroadcast.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/ClientConnectionBroadcast.cs.meta rename to Assets/FishNet/Runtime/Managing/Server/ClientConnectionBroadcast.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/Editor.meta b/Assets/FishNet/Runtime/Managing/Server/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/Editor.meta rename to Assets/FishNet/Runtime/Managing/Server/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/Editor/ServerManagerEditor.cs b/Assets/FishNet/Runtime/Managing/Server/Editor/ServerManagerEditor.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/Editor/ServerManagerEditor.cs rename to Assets/FishNet/Runtime/Managing/Server/Editor/ServerManagerEditor.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/Editor/ServerManagerEditor.cs.meta b/Assets/FishNet/Runtime/Managing/Server/Editor/ServerManagerEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/Editor/ServerManagerEditor.cs.meta rename to Assets/FishNet/Runtime/Managing/Server/Editor/ServerManagerEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/KickReasons.cs b/Assets/FishNet/Runtime/Managing/Server/KickReasons.cs similarity index 98% rename from Assets/Packages/FishNet/Runtime/Managing/Server/KickReasons.cs rename to Assets/FishNet/Runtime/Managing/Server/KickReasons.cs index c3ef544..69050c8 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Server/KickReasons.cs +++ b/Assets/FishNet/Runtime/Managing/Server/KickReasons.cs @@ -31,8 +31,6 @@ public enum KickReason : short /// Client is behaving unusually, such as providing multiple invalid states. This may not be an attack but there is no way to know with certainty. /// UnusualActivity = 6, - - LoggedOut = 7 } } \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/KickReasons.cs.meta b/Assets/FishNet/Runtime/Managing/Server/KickReasons.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/KickReasons.cs.meta rename to Assets/FishNet/Runtime/Managing/Server/KickReasons.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/Object.meta b/Assets/FishNet/Runtime/Managing/Server/Object.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/Object.meta rename to Assets/FishNet/Runtime/Managing/Server/Object.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.Observers.cs b/Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.Observers.cs similarity index 98% rename from Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.Observers.cs rename to Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.Observers.cs index d11c097..564c7d4 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.Observers.cs +++ b/Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.Observers.cs @@ -64,13 +64,14 @@ private void UpdateTimedObservers() /* Try to iterate all timed observers every half a second. * This value will increase as there's more observers or timed conditions. */ - double timeMultiplier = 1d + (float)((base.NetworkManager.ServerManager.Clients.Count * 0.005d) + (_timedNetworkObservers.Count * 0.0005d)); - double completionTime = (0.5d * timeMultiplier); + float timeMultiplier = 1f + (float)((base.NetworkManager.ServerManager.Clients.Count * 0.005f) + (_timedNetworkObservers.Count * 0.0005f)); + //Check cap this way for readability. + float completionTime = Mathf.Min((0.5f * timeMultiplier), base.NetworkManager.ObserverManager.MaximumTimedObserversDuration); uint completionTicks = base.NetworkManager.TimeManager.TimeToTicks(completionTime, TickRounding.RoundUp); /* Iterations will be the number of objects * to iterate to be have completed all objects by * the end of completionTicks. */ - int iterations = Mathf.CeilToInt((float)networkObserversCount / (float)completionTicks); + int iterations = Mathf.CeilToInt((float)networkObserversCount / completionTicks); if (iterations > _timedNetworkObservers.Count) iterations = _timedNetworkObservers.Count; diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.Observers.cs.meta b/Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.Observers.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.Observers.cs.meta rename to Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.Observers.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.Parsing.cs b/Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.Parsing.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.Parsing.cs rename to Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.Parsing.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.Parsing.cs.meta b/Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.Parsing.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.Parsing.cs.meta rename to Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.Parsing.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.cs b/Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.cs rename to Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.cs.meta b/Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/Object/ServerObjects.cs.meta rename to Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.Broadcast.cs b/Assets/FishNet/Runtime/Managing/Server/ServerManager.Broadcast.cs similarity index 97% rename from Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.Broadcast.cs rename to Assets/FishNet/Runtime/Managing/Server/ServerManager.Broadcast.cs index 3fa4cc7..efa4ee1 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.Broadcast.cs +++ b/Assets/FishNet/Runtime/Managing/Server/ServerManager.Broadcast.cs @@ -42,7 +42,7 @@ public void RegisterBroadcast(Action handler, return; } - ushort key = BroadcastHelper.GetKey(); + ushort key = BroadcastExtensions.GetKey(); //Create new IBroadcastHandler if needed. BroadcastHandlerBase bhs; if (!_broadcastHandlers.TryGetValueIL2CPP(key, out bhs)) @@ -61,7 +61,7 @@ public void RegisterBroadcast(Action handler, /// Method to unregister. public void UnregisterBroadcast(Action handler) where T : struct, IBroadcast { - ushort key = BroadcastHelper.GetKey(); + ushort key = BroadcastExtensions.GetKey(); if (_broadcastHandlers.TryGetValueIL2CPP(key, out BroadcastHandlerBase bhs)) bhs.UnregisterHandler(handler); } @@ -112,7 +112,7 @@ public void Broadcast(NetworkConnection connection, T message, bool requireAu } PooledWriter writer = WriterPool.Retrieve(); - Broadcasts.WriteBroadcast(NetworkManager, writer, message, ref channel); + BroadcastsSerializers.WriteBroadcast(NetworkManager, writer, message, ref channel); ArraySegment segment = writer.GetArraySegment(); NetworkManager.TransportManager.SendToClient((byte)channel, segment, connection); writer.Store(); @@ -137,7 +137,7 @@ public void Broadcast(HashSet connections, T message, bool bool failedAuthentication = false; PooledWriter writer = WriterPool.Retrieve(); - Broadcasts.WriteBroadcast(NetworkManager, writer, message, ref channel); + BroadcastsSerializers.WriteBroadcast(NetworkManager, writer, message, ref channel); ArraySegment segment = writer.GetArraySegment(); foreach (NetworkConnection conn in connections) @@ -326,7 +326,7 @@ public void Broadcast(T message, bool requireAuthenticated = true, Channel ch bool failedAuthentication = false; PooledWriter writer = WriterPool.Retrieve(); - Broadcasts.WriteBroadcast(NetworkManager, writer, message, ref channel); + BroadcastsSerializers.WriteBroadcast(NetworkManager, writer, message, ref channel); ArraySegment segment = writer.GetArraySegment(); foreach (NetworkConnection conn in Clients.Values) diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.Broadcast.cs.meta b/Assets/FishNet/Runtime/Managing/Server/ServerManager.Broadcast.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.Broadcast.cs.meta rename to Assets/FishNet/Runtime/Managing/Server/ServerManager.Broadcast.cs.meta diff --git a/Assets/FishNet/Runtime/Managing/Server/ServerManager.LOD.cs b/Assets/FishNet/Runtime/Managing/Server/ServerManager.LOD.cs new file mode 100644 index 0000000..67de65c --- /dev/null +++ b/Assets/FishNet/Runtime/Managing/Server/ServerManager.LOD.cs @@ -0,0 +1,38 @@ +using FishNet.Connection; +using FishNet.Managing.Logging; +using FishNet.Object; +using FishNet.Serializing; +using GameKit.Dependencies.Utilities; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using UnityEngine; + +namespace FishNet.Managing.Server +{ + public sealed partial class ServerManager : MonoBehaviour + { + #region Private. + /// + /// Cached expected level of detail value. + /// + private uint _cachedLevelOfDetailInterval; + /// + /// Cached value of UseLod. + /// + private bool _cachedUseLod; + #endregion + + /// + /// Parses a received network LOD update. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void ParseNetworkLODUpdate(PooledReader reader, NetworkConnection conn) + { + + } + + + } + + +} diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.LOD.cs.meta b/Assets/FishNet/Runtime/Managing/Server/ServerManager.LOD.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.LOD.cs.meta rename to Assets/FishNet/Runtime/Managing/Server/ServerManager.LOD.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.QOL.cs b/Assets/FishNet/Runtime/Managing/Server/ServerManager.QOL.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.QOL.cs rename to Assets/FishNet/Runtime/Managing/Server/ServerManager.QOL.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.QOL.cs.meta b/Assets/FishNet/Runtime/Managing/Server/ServerManager.QOL.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.QOL.cs.meta rename to Assets/FishNet/Runtime/Managing/Server/ServerManager.QOL.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.RpcLinks.cs b/Assets/FishNet/Runtime/Managing/Server/ServerManager.RpcLinks.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.RpcLinks.cs rename to Assets/FishNet/Runtime/Managing/Server/ServerManager.RpcLinks.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.RpcLinks.cs.meta b/Assets/FishNet/Runtime/Managing/Server/ServerManager.RpcLinks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.RpcLinks.cs.meta rename to Assets/FishNet/Runtime/Managing/Server/ServerManager.RpcLinks.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.cs b/Assets/FishNet/Runtime/Managing/Server/ServerManager.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.cs rename to Assets/FishNet/Runtime/Managing/Server/ServerManager.cs index 1fa6b10..1a77efb 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.cs +++ b/Assets/FishNet/Runtime/Managing/Server/ServerManager.cs @@ -512,10 +512,9 @@ private void Transport_OnRemoteConnectionState(RemoteConnectionStateArgs args) { //Sanity check to make sure transports are following proper types/ranges. int id = args.ConnectionId; - int maxIdValue = short.MaxValue; - if (id < 0 || id > maxIdValue) + if (id < 0 || id > NetworkConnection.MAXIMUM_CLIENTID_VALUE) { - Kick(args.ConnectionId, KickReason.UnexpectedProblem, LoggingType.Error, $"The transport you are using supplied an invalid connection Id of {id}. Connection Id values must range between 0 and {maxIdValue}. The client has been disconnected."); + Kick(args.ConnectionId, KickReason.UnexpectedProblem, LoggingType.Error, $"The transport you are using supplied an invalid connection Id of {id}. Connection Id values must range between 0 and {NetworkConnection.MAXIMUM_CLIENTID_VALUE}. The client has been disconnected."); return; } //Valid Id. @@ -621,7 +620,7 @@ private void ParseReceived(ServerReceivedDataArgs args) segment = args.Data; NetworkManager.StatisticsManager.NetworkTraffic.LocalServerReceivedData((ulong)segment.Count); - if (segment.Count <= TransportManager.TICK_BYTES) + if (segment.Count <= TransportManager.UNPACKED_TICK_LENGTH) return; //FishNet internally splits packets so nothing should ever arrive over MTU. diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.cs.meta b/Assets/FishNet/Runtime/Managing/Server/ServerManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.cs.meta rename to Assets/FishNet/Runtime/Managing/Server/ServerManager.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Statistic.meta b/Assets/FishNet/Runtime/Managing/Statistic.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Statistic.meta rename to Assets/FishNet/Runtime/Managing/Statistic.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Statistic/NetworkTrafficArgs.cs b/Assets/FishNet/Runtime/Managing/Statistic/NetworkTrafficArgs.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Statistic/NetworkTrafficArgs.cs rename to Assets/FishNet/Runtime/Managing/Statistic/NetworkTrafficArgs.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Statistic/NetworkTrafficArgs.cs.meta b/Assets/FishNet/Runtime/Managing/Statistic/NetworkTrafficArgs.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Statistic/NetworkTrafficArgs.cs.meta rename to Assets/FishNet/Runtime/Managing/Statistic/NetworkTrafficArgs.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Statistic/NetworkTrafficStatistics.cs b/Assets/FishNet/Runtime/Managing/Statistic/NetworkTrafficStatistics.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Statistic/NetworkTrafficStatistics.cs rename to Assets/FishNet/Runtime/Managing/Statistic/NetworkTrafficStatistics.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Statistic/NetworkTrafficStatistics.cs.meta b/Assets/FishNet/Runtime/Managing/Statistic/NetworkTrafficStatistics.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Statistic/NetworkTrafficStatistics.cs.meta rename to Assets/FishNet/Runtime/Managing/Statistic/NetworkTrafficStatistics.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Statistic/StatisticsManager.cs b/Assets/FishNet/Runtime/Managing/Statistic/StatisticsManager.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Statistic/StatisticsManager.cs rename to Assets/FishNet/Runtime/Managing/Statistic/StatisticsManager.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Statistic/StatisticsManager.cs.meta b/Assets/FishNet/Runtime/Managing/Statistic/StatisticsManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Statistic/StatisticsManager.cs.meta rename to Assets/FishNet/Runtime/Managing/Statistic/StatisticsManager.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing.meta b/Assets/FishNet/Runtime/Managing/Timing.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing.meta rename to Assets/FishNet/Runtime/Managing/Timing.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/Editor.meta b/Assets/FishNet/Runtime/Managing/Timing/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/Editor.meta rename to Assets/FishNet/Runtime/Managing/Timing/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/Editor/TimeManagerEditor.cs b/Assets/FishNet/Runtime/Managing/Timing/Editor/TimeManagerEditor.cs similarity index 88% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/Editor/TimeManagerEditor.cs rename to Assets/FishNet/Runtime/Managing/Timing/Editor/TimeManagerEditor.cs index a23e7ef..28e3263 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Timing/Editor/TimeManagerEditor.cs +++ b/Assets/FishNet/Runtime/Managing/Timing/Editor/TimeManagerEditor.cs @@ -60,9 +60,11 @@ public override void OnInspectorGUI() //Physics. EditorGUILayout.LabelField("Physics", EditorStyles.boldLabel); EditorGUI.indentLevel++; + if (_physicsMode.intValue == (int)FishNet.Managing.Timing.PhysicsMode.TimeManager) + EditorGUILayout.HelpBox($"Time.fixedDeltaTime will be overriden with TimeManager.TickDelta ({(1f / (float)_tickRate.intValue).ToString("0.###")})", MessageType.Info); + else + EditorGUILayout.HelpBox("If you are using physics interactions be sure to change the PhysicsMode to TimeManager and implement physics within the TimeManager tick events. NetworkTransform may also jitter when not using PhysicsMode.TimeManager.", MessageType.Warning); EditorGUILayout.PropertyField(_physicsMode); - if (_physicsMode.intValue != (int)FishNet.Managing.Timing.PhysicsMode.TimeManager) - EditorGUILayout.HelpBox("If you are using physics interactions be sure to change the PhysicsMode to TimeManager and implement physics within the TimeManager tick events.", MessageType.None); EditorGUI.indentLevel--; ////Prediction. diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/Editor/TimeManagerEditor.cs.meta b/Assets/FishNet/Runtime/Managing/Timing/Editor/TimeManagerEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/Editor/TimeManagerEditor.cs.meta rename to Assets/FishNet/Runtime/Managing/Timing/Editor/TimeManagerEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/MovingAverage.cs b/Assets/FishNet/Runtime/Managing/Timing/MovingAverage.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/MovingAverage.cs rename to Assets/FishNet/Runtime/Managing/Timing/MovingAverage.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/MovingAverage.cs.meta b/Assets/FishNet/Runtime/Managing/Timing/MovingAverage.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/MovingAverage.cs.meta rename to Assets/FishNet/Runtime/Managing/Timing/MovingAverage.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/PhysicsMode.cs b/Assets/FishNet/Runtime/Managing/Timing/PhysicsMode.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/PhysicsMode.cs rename to Assets/FishNet/Runtime/Managing/Timing/PhysicsMode.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/PhysicsMode.cs.meta b/Assets/FishNet/Runtime/Managing/Timing/PhysicsMode.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/PhysicsMode.cs.meta rename to Assets/FishNet/Runtime/Managing/Timing/PhysicsMode.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/PreciseTick.cs b/Assets/FishNet/Runtime/Managing/Timing/PreciseTick.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/PreciseTick.cs rename to Assets/FishNet/Runtime/Managing/Timing/PreciseTick.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/PreciseTick.cs.meta b/Assets/FishNet/Runtime/Managing/Timing/PreciseTick.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/PreciseTick.cs.meta rename to Assets/FishNet/Runtime/Managing/Timing/PreciseTick.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/TickRounding.cs b/Assets/FishNet/Runtime/Managing/Timing/TickRounding.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/TickRounding.cs rename to Assets/FishNet/Runtime/Managing/Timing/TickRounding.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/TickRounding.cs.meta b/Assets/FishNet/Runtime/Managing/Timing/TickRounding.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/TickRounding.cs.meta rename to Assets/FishNet/Runtime/Managing/Timing/TickRounding.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/TickType.cs b/Assets/FishNet/Runtime/Managing/Timing/TickType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/TickType.cs rename to Assets/FishNet/Runtime/Managing/Timing/TickType.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/TickType.cs.meta b/Assets/FishNet/Runtime/Managing/Timing/TickType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/TickType.cs.meta rename to Assets/FishNet/Runtime/Managing/Timing/TickType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/TimeManager.cs b/Assets/FishNet/Runtime/Managing/Timing/TimeManager.cs similarity index 94% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/TimeManager.cs rename to Assets/FishNet/Runtime/Managing/Timing/TimeManager.cs index b3dd4ab..860bb10 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Timing/TimeManager.cs +++ b/Assets/FishNet/Runtime/Managing/Timing/TimeManager.cs @@ -9,6 +9,7 @@ using FishNet.Utility.Extension; using GameKit.Dependencies.Utilities; using System; +using System.Collections.Generic; using System.Runtime.CompilerServices; using UnityEngine; using SystemStopwatch = System.Diagnostics.Stopwatch; @@ -210,14 +211,14 @@ public bool GetTickDifference(uint currentServerTick, uint currentLocalTick, out /// [Tooltip("While true clients may drop local ticks if their devices are unable to maintain the tick rate. This could result in a temporary desynchronization but will prevent the client falling further behind on ticks by repeatedly running the logic cycle multiple times per frame.")] [SerializeField] - private bool _allowTickDropping; + private bool _allowTickDropping = true; /// /// Maximum number of ticks which may occur in a single frame before remainder are dropped for the frame. /// [Tooltip("Maximum number of ticks which may occur in a single frame before remainder are dropped for the frame.")] [Range(1, 25)] [SerializeField] - private byte _maximumFrameTicks = 2; + private byte _maximumFrameTicks = 3; /// /// /// @@ -538,8 +539,8 @@ private void InitializePhysicsMode(PhysicsMode mode) //Preserve user tick rate. PlayerPrefs.SetFloat(SAVED_FIXED_TIME_TEXT, Time.fixedDeltaTime); //Let the player know. - if (Time.fixedDeltaTime != (float)TickDelta) - Debug.LogWarning("Time.fixedDeltaTime is being overriden with TimeManager.TickDelta"); + //if (Time.fixedDeltaTime != (float)TickDelta) + // Debug.LogWarning("Time.fixedDeltaTime is being overriden with TimeManager.TickDelta"); #endif Time.fixedDeltaTime = (float)TickDelta; /* Only check this if network manager @@ -668,13 +669,18 @@ private void IncreaseTick() bool isClient = NetworkManager.IsClientStarted; bool isServer = NetworkManager.IsServerStarted; - double tickDelta = TickDelta; - double timePerSimulation = (isServer) ? tickDelta : _adjustedTickDelta; + double timePerSimulation = (isServer) ? TickDelta : _adjustedTickDelta; if (timePerSimulation == 0d) { Debug.LogWarning($"Simulation delta cannot be 0. Network timing will not continue."); return; } + ////If client needs to slow down then increase delta very slightly. + //if (!isServer && NetworkManager.PredictionManager.ReduceClientTiming) + //{ + // Debug.LogWarning($"Slowing down."); + // timePerSimulation *= 1.05f; + //} double time = Time.unscaledDeltaTime; @@ -686,7 +692,7 @@ private void IncreaseTick() if (ticksCount > 1) _lastMultipleTicksTime = Time.unscaledDeltaTime; - if (_allowTickDropping && !NetworkManager.IsServerStarted) + if (_allowTickDropping) { //If ticks require dropping. Set exactly to maximum ticks. if (ticksCount > _maximumFrameTicks) @@ -713,7 +719,7 @@ private void IncreaseTick() if (frameTicked) { -#if PREDICTION_V2 +#if !PREDICTION_1 //Tell predicted objecs to reconcile before OnTick. NetworkManager.PredictionManager.ReconcileToStates(); #endif @@ -729,7 +735,7 @@ private void IncreaseTick() } OnPostTick?.Invoke(); -#if PREDICTION_V2 +#if !PREDICTION_1 //After post tick send states. NetworkManager.PredictionManager.SendStateUpdate(); #endif @@ -1068,6 +1074,19 @@ private void TryIterateData(bool incoming) #region Timing adjusting. + /// + /// Changes the adjustedTickDelta, increasing or decreasing it. + /// + /// Amount to multiply expected change by. This can be used to make larger or smaller changes. + internal void ChangeAdjustedTickDelta(bool speedUp, double additionalMultiplier = 1d) + { + double share = (TickDelta * 0.01d) * additionalMultiplier; + if (speedUp) + _adjustedTickDelta -= share; + else + _adjustedTickDelta += share; + } + /// /// Sends a TimingUpdate packet to clients. /// @@ -1078,12 +1097,16 @@ private void SendTimingAdjustment() { //Now send using a packetId. PooledWriter writer = WriterPool.Retrieve(); - writer.WritePacketId(PacketId.TimingUpdate); foreach (NetworkConnection item in NetworkManager.ServerManager.Clients.Values) { if (!item.IsAuthenticated) continue; + + writer.WritePacketId(PacketId.TimingUpdate); + writer.WriteTickUnpacked(item.PacketTick.Value()); item.SendToClient((byte)Channel.Unreliable, writer.GetArraySegment()); + writer.Reset(); + } writer.Store(); @@ -1094,12 +1117,17 @@ private void SendTimingAdjustment() /// Called on client when server sends a timing update. /// /// - internal void ParseTimingUpdate() + internal void ParseTimingUpdate(Reader reader) { + uint clientTick = reader.ReadTickUnpacked(); //Don't adjust timing on server. if (NetworkManager.IsServerStarted) return; - + /* This should never be possible since the server is sending a tick back + * that the client previously sent. In other words, the value returned should + * always be in the past. */ + if (LocalTick < clientTick) + return; /* Use the last ordered remote tick rather than * lastPacketTick. This will help with out of order * packets where the timing update sent before @@ -1108,42 +1136,26 @@ internal void ParseTimingUpdate() * ticks really passed rather than the difference * between the out of order/late packet. */ uint lastPacketTick = LastPacketTick.RemoteTick; - //If difference could not be updated then something went wrong. Most likely an old timing update. - if (!_timing.GetTickDifference(lastPacketTick, LocalTick, out long tickDifference)) - return; - + //Set Tick based on difference between localTick and clientTick, added onto lastPacketTick. + uint prevTick = Tick; + uint nextTick = (LocalTick - clientTick) + lastPacketTick; + long difference = ((long)nextTick - (long)prevTick); + Tick = nextTick; + //Maximum difference allowed before resetting values. const int maximumDifference = 4; - - TryRecalculateTick(); - - //Pefect! - if (tickDifference == 0) - { } //Difference is extreme, reset to default timings. Client probably had an issue. - else if (Mathf.Abs(tickDifference) > maximumDifference) + if (Mathf.Abs(difference) > maximumDifference) { _adjustedTickDelta = TickDelta; } //Otherwise adjust the delta marginally. - else - { - //Apply 1% of TickDelta as an adjustment. - double share = (TickDelta * 0.01d); - long tdSign = MathF.Sign(tickDifference); - //Only adjust by 1 tick per update. - double adjustment = (share * tdSign); - _adjustedTickDelta -= adjustment; - } - - //Recalculates Tick value if it exceeds maximum difference. - void TryRecalculateTick() + else if (difference != 0) { - uint rttTicks = TimeToTicks((RoundTripTime / 2) / 1000f); - uint newValue = lastPacketTick + rttTicks; - long difference = (long)Mathf.Abs((long)Tick - (long)newValue); - if (difference > maximumDifference) - Tick = newValue; + /* A negative tickDifference indicates the client is + * moving too fast, while positive indicates too slow. */ + bool speedUp = (difference > 0); + ChangeAdjustedTickDelta(speedUp); } } #endregion diff --git a/Assets/Packages/FishNet/Runtime/Managing/Timing/TimeManager.cs.meta b/Assets/FishNet/Runtime/Managing/Timing/TimeManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Timing/TimeManager.cs.meta rename to Assets/FishNet/Runtime/Managing/Timing/TimeManager.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Transporting.meta b/Assets/FishNet/Runtime/Managing/Transporting.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Transporting.meta rename to Assets/FishNet/Runtime/Managing/Transporting.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Transporting/IntermediateLayer.cs b/Assets/FishNet/Runtime/Managing/Transporting/IntermediateLayer.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Transporting/IntermediateLayer.cs rename to Assets/FishNet/Runtime/Managing/Transporting/IntermediateLayer.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Transporting/IntermediateLayer.cs.meta b/Assets/FishNet/Runtime/Managing/Transporting/IntermediateLayer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Transporting/IntermediateLayer.cs.meta rename to Assets/FishNet/Runtime/Managing/Transporting/IntermediateLayer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Transporting/LatencySimulator.cs b/Assets/FishNet/Runtime/Managing/Transporting/LatencySimulator.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Transporting/LatencySimulator.cs rename to Assets/FishNet/Runtime/Managing/Transporting/LatencySimulator.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Transporting/LatencySimulator.cs.meta b/Assets/FishNet/Runtime/Managing/Transporting/LatencySimulator.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Transporting/LatencySimulator.cs.meta rename to Assets/FishNet/Runtime/Managing/Transporting/LatencySimulator.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Transporting/SplitReader.cs b/Assets/FishNet/Runtime/Managing/Transporting/SplitReader.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Transporting/SplitReader.cs rename to Assets/FishNet/Runtime/Managing/Transporting/SplitReader.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Transporting/SplitReader.cs.meta b/Assets/FishNet/Runtime/Managing/Transporting/SplitReader.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Transporting/SplitReader.cs.meta rename to Assets/FishNet/Runtime/Managing/Transporting/SplitReader.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Transporting/TransportManager.QOL.cs b/Assets/FishNet/Runtime/Managing/Transporting/TransportManager.QOL.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Transporting/TransportManager.QOL.cs rename to Assets/FishNet/Runtime/Managing/Transporting/TransportManager.QOL.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Transporting/TransportManager.QOL.cs.meta b/Assets/FishNet/Runtime/Managing/Transporting/TransportManager.QOL.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Transporting/TransportManager.QOL.cs.meta rename to Assets/FishNet/Runtime/Managing/Transporting/TransportManager.QOL.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Transporting/TransportManager.cs b/Assets/FishNet/Runtime/Managing/Transporting/TransportManager.cs similarity index 98% rename from Assets/Packages/FishNet/Runtime/Managing/Transporting/TransportManager.cs rename to Assets/FishNet/Runtime/Managing/Transporting/TransportManager.cs index a4adf4d..45387fd 100644 --- a/Assets/Packages/FishNet/Runtime/Managing/Transporting/TransportManager.cs +++ b/Assets/FishNet/Runtime/Managing/Transporting/TransportManager.cs @@ -128,27 +128,31 @@ public LatencySimulator LatencySimulator /// /// Number of bytes sent for PacketId. /// - public const byte PACKET_ID_BYTES = 2; + public const byte PACKETID_LENGTH = 2; /// /// Number of bytes sent for ObjectId. /// - public const byte OBJECT_ID_BYTES = 2; + public const byte OBJECT_ID_LENGTH = 2; /// /// Number of bytes sent for ComponentIndex. /// - public const byte COMPONENT_INDEX_BYTES = 1; + public const byte COMPONENT_INDEX_LENGTH = 1; /// /// Number of bytes sent for Tick. /// - public const byte TICK_BYTES = 4; + public const byte UNPACKED_TICK_LENGTH = 4; + /// + /// Number of bytes sent for an unpacked size, such as a collection or array size. + /// + public const byte UNPACKED_SIZE_LENGTH = 4; /// /// Number of bytes sent to indicate split count. /// - private const byte SPLIT_COUNT_BYTES = 4; + private const byte SPLIT_COUNT_LENGTH = 4; /// /// Number of bytes required for split data. /// //todo: This shouldn't have to include TickBytes but there is a parse error if it's not included. Figure out why. - public const byte SPLIT_INDICATOR_SIZE = (TICK_BYTES + PACKET_ID_BYTES + SPLIT_COUNT_BYTES); + public const byte SPLIT_INDICATOR_LENGTH = (UNPACKED_TICK_LENGTH + PACKETID_LENGTH + SPLIT_COUNT_LENGTH); /// /// Number of channels supported. /// @@ -621,7 +625,7 @@ internal void CheckSetReliableChannel(int dataLength, ref Channel channel) /// private int GetRequiredMessageCount(byte channelId, int segmentSize, out int maxMessageSize) { - maxMessageSize = GetLowestMTU(channelId) - SPLIT_INDICATOR_SIZE; + maxMessageSize = GetLowestMTU(channelId) - SPLIT_INDICATOR_LENGTH; return Mathf.CeilToInt((float)segmentSize / maxMessageSize); } diff --git a/Assets/Packages/FishNet/Runtime/Managing/Transporting/TransportManager.cs.meta b/Assets/FishNet/Runtime/Managing/Transporting/TransportManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Transporting/TransportManager.cs.meta rename to Assets/FishNet/Runtime/Managing/Transporting/TransportManager.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Utility.meta b/Assets/FishNet/Runtime/Managing/Utility.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Utility.meta rename to Assets/FishNet/Runtime/Managing/Utility.meta diff --git a/Assets/Packages/FishNet/Runtime/Managing/Utility/Utility.cs b/Assets/FishNet/Runtime/Managing/Utility/Utility.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Utility/Utility.cs rename to Assets/FishNet/Runtime/Managing/Utility/Utility.cs diff --git a/Assets/Packages/FishNet/Runtime/Managing/Utility/Utility.cs.meta b/Assets/FishNet/Runtime/Managing/Utility/Utility.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Managing/Utility/Utility.cs.meta rename to Assets/FishNet/Runtime/Managing/Utility/Utility.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object.meta b/Assets/FishNet/Runtime/Object.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object.meta rename to Assets/FishNet/Runtime/Object.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Attributes.cs b/Assets/FishNet/Runtime/Object/Attributes.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Attributes.cs rename to Assets/FishNet/Runtime/Object/Attributes.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Attributes.cs.meta b/Assets/FishNet/Runtime/Object/Attributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Attributes.cs.meta rename to Assets/FishNet/Runtime/Object/Attributes.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/ChangedTransformProperties.cs b/Assets/FishNet/Runtime/Object/ChangedTransformProperties.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/ChangedTransformProperties.cs rename to Assets/FishNet/Runtime/Object/ChangedTransformProperties.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/ChangedTransformProperties.cs.meta b/Assets/FishNet/Runtime/Object/ChangedTransformProperties.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/ChangedTransformProperties.cs.meta rename to Assets/FishNet/Runtime/Object/ChangedTransformProperties.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Delegates.cs b/Assets/FishNet/Runtime/Object/Delegates.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Delegates.cs rename to Assets/FishNet/Runtime/Object/Delegates.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Delegates.cs.meta b/Assets/FishNet/Runtime/Object/Delegates.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Delegates.cs.meta rename to Assets/FishNet/Runtime/Object/Delegates.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/DespawnType.cs b/Assets/FishNet/Runtime/Object/DespawnType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/DespawnType.cs rename to Assets/FishNet/Runtime/Object/DespawnType.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/DespawnType.cs.meta b/Assets/FishNet/Runtime/Object/DespawnType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/DespawnType.cs.meta rename to Assets/FishNet/Runtime/Object/DespawnType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Editor.meta b/Assets/FishNet/Runtime/Object/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Editor.meta rename to Assets/FishNet/Runtime/Object/Editor.meta diff --git a/Assets/LeanTween/Editor.meta b/Assets/FishNet/Runtime/Object/Editor/Editor.meta similarity index 100% rename from Assets/LeanTween/Editor.meta rename to Assets/FishNet/Runtime/Object/Editor/Editor.meta diff --git a/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs b/Assets/FishNet/Runtime/Object/Editor/Editor/LeanTweenDocumentationEditor.cs similarity index 100% rename from Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs rename to Assets/FishNet/Runtime/Object/Editor/Editor/LeanTweenDocumentationEditor.cs diff --git a/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs.meta b/Assets/FishNet/Runtime/Object/Editor/Editor/LeanTweenDocumentationEditor.cs.meta similarity index 100% rename from Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs.meta rename to Assets/FishNet/Runtime/Object/Editor/Editor/LeanTweenDocumentationEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Editor/NetworkObjectEditor.cs b/Assets/FishNet/Runtime/Object/Editor/NetworkObjectEditor.cs similarity index 80% rename from Assets/Packages/FishNet/Runtime/Object/Editor/NetworkObjectEditor.cs rename to Assets/FishNet/Runtime/Object/Editor/NetworkObjectEditor.cs index c2756c6..98d763f 100644 --- a/Assets/Packages/FishNet/Runtime/Object/Editor/NetworkObjectEditor.cs +++ b/Assets/FishNet/Runtime/Object/Editor/NetworkObjectEditor.cs @@ -1,11 +1,6 @@ #if UNITY_EDITOR -#if PREDICTION_V2 -using FishNet.Editing; -using FishNet.Object; -using FishNet.Object.Prediction; -using System.Collections.Generic; +#if !PREDICTION_1 using UnityEditor; -using UnityEditor.Animations; using UnityEngine; namespace FishNet.Object.Editing @@ -22,12 +17,14 @@ public class NetworkObjectEditor : Editor private SerializedProperty _defaultDespawnType; private SerializedProperty _enablePrediction; + private SerializedProperty _enableStateForwarding; + private SerializedProperty _networkTransform; private SerializedProperty _predictionType; private SerializedProperty _graphicalObject; private SerializedProperty _ownerInterpolation; private SerializedProperty _enableTeleport; private SerializedProperty _teleportThreshold; - private SerializedProperty _enableStateForwarding; + protected virtual void OnEnable() @@ -39,11 +36,13 @@ protected virtual void OnEnable() _defaultDespawnType = serializedObject.FindProperty(nameof(_defaultDespawnType)); _enablePrediction = serializedObject.FindProperty(nameof(_enablePrediction)); + _enableStateForwarding = serializedObject.FindProperty(nameof(_enableStateForwarding)); + _networkTransform = serializedObject.FindProperty(nameof(_networkTransform)); _predictionType = serializedObject.FindProperty(nameof(_predictionType)); _graphicalObject = serializedObject.FindProperty(nameof(_graphicalObject)); _enableTeleport = serializedObject.FindProperty(nameof(_enableTeleport)); _teleportThreshold = serializedObject.FindProperty(nameof(_teleportThreshold)); - _enableStateForwarding = serializedObject.FindProperty(nameof(_enableStateForwarding)); + _ownerInterpolation = serializedObject.FindProperty(nameof(_ownerInterpolation)); } @@ -56,22 +55,32 @@ public override void OnInspectorGUI() GUI.enabled = false; EditorGUILayout.ObjectField("Script:", MonoScript.FromMonoBehaviour(nob), typeof(NetworkObject), false); GUI.enabled = true; + + EditorGUILayout.LabelField("Settings", EditorStyles.boldLabel); + EditorGUI.indentLevel++; EditorGUILayout.PropertyField(_isNetworked); EditorGUILayout.PropertyField(_isSpawnable); EditorGUILayout.PropertyField(_isGlobal); EditorGUILayout.PropertyField(_initializeOrder); EditorGUILayout.PropertyField(_defaultDespawnType); + EditorGUI.indentLevel--; + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Prediction", EditorStyles.boldLabel); + EditorGUI.indentLevel++; EditorGUILayout.PropertyField(_enablePrediction); if (_enablePrediction.boolValue == true) { EditorGUI.indentLevel++; EditorGUILayout.PropertyField(_predictionType); - GUI.enabled = false; EditorGUILayout.PropertyField(_enableStateForwarding); - GUI.enabled = true; - //EditorGUILayout.LabelField("Owner", EditorStyles.boldLabel); - EditorGUILayout.PropertyField(_graphicalObject); + if (_enableStateForwarding.boolValue == false) + { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(_networkTransform); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(_graphicalObject); EditorGUI.indentLevel++; EditorGUILayout.PropertyField(_ownerInterpolation, new GUIContent("Interpolation")); EditorGUILayout.PropertyField(_enableTeleport); @@ -85,7 +94,7 @@ public override void OnInspectorGUI() EditorGUI.indentLevel--; EditorGUI.indentLevel--; } - EditorGUILayout.Space(); + EditorGUI.indentLevel--; serializedObject.ApplyModifiedProperties(); diff --git a/Assets/Packages/FishNet/Runtime/Object/Editor/NetworkObjectEditor.cs.meta b/Assets/FishNet/Runtime/Object/Editor/NetworkObjectEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Editor/NetworkObjectEditor.cs.meta rename to Assets/FishNet/Runtime/Object/Editor/NetworkObjectEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/EmptyNetworkBehaviour.cs b/Assets/FishNet/Runtime/Object/EmptyNetworkBehaviour.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/EmptyNetworkBehaviour.cs rename to Assets/FishNet/Runtime/Object/EmptyNetworkBehaviour.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/EmptyNetworkBehaviour.cs.meta b/Assets/FishNet/Runtime/Object/EmptyNetworkBehaviour.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/EmptyNetworkBehaviour.cs.meta rename to Assets/FishNet/Runtime/Object/EmptyNetworkBehaviour.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Helping.meta b/Assets/FishNet/Runtime/Object/Helping.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Helping.meta rename to Assets/FishNet/Runtime/Object/Helping.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Helping/RpcLink.cs b/Assets/FishNet/Runtime/Object/Helping/RpcLink.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Helping/RpcLink.cs rename to Assets/FishNet/Runtime/Object/Helping/RpcLink.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Helping/RpcLink.cs.meta b/Assets/FishNet/Runtime/Object/Helping/RpcLink.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Helping/RpcLink.cs.meta rename to Assets/FishNet/Runtime/Object/Helping/RpcLink.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Helping/RpcType.cs b/Assets/FishNet/Runtime/Object/Helping/RpcType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Helping/RpcType.cs rename to Assets/FishNet/Runtime/Object/Helping/RpcType.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Helping/RpcType.cs.meta b/Assets/FishNet/Runtime/Object/Helping/RpcType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Helping/RpcType.cs.meta rename to Assets/FishNet/Runtime/Object/Helping/RpcType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Helping/StaticShortcuts.cs b/Assets/FishNet/Runtime/Object/Helping/StaticShortcuts.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Helping/StaticShortcuts.cs rename to Assets/FishNet/Runtime/Object/Helping/StaticShortcuts.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Helping/StaticShortcuts.cs.meta b/Assets/FishNet/Runtime/Object/Helping/StaticShortcuts.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Helping/StaticShortcuts.cs.meta rename to Assets/FishNet/Runtime/Object/Helping/StaticShortcuts.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Callbacks.cs b/Assets/FishNet/Runtime/Object/NetworkBehaviour.Callbacks.cs similarity index 94% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Callbacks.cs rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.Callbacks.cs index c03b41b..61a40de 100644 --- a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Callbacks.cs +++ b/Assets/FishNet/Runtime/Object/NetworkBehaviour.Callbacks.cs @@ -144,7 +144,7 @@ public virtual void OnStopServer() { } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal void OnOwnershipServer_Internal(NetworkConnection prevOwner) { -#if PREDICTION_V2 +#if !PREDICTION_1 ResetPredictionTicks(); #endif CallClearReplicateCache(true); @@ -192,6 +192,7 @@ internal void OnStopClient_Internal() /// public virtual void OnStopClient() { } +#if !PREDICTION_1 [MethodImpl(MethodImplOptions.AggressiveInlining)] internal void OnOwnershipClient_Internal(NetworkConnection prevOwner) @@ -200,8 +201,20 @@ internal void OnOwnershipClient_Internal(NetworkConnection prevOwner) if (IsOwner || prevOwner == LocalConnection) CallClearReplicateCache(false); + _lastReadReconcileTick = 0; OnOwnershipClient(prevOwner); } +#else + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal void OnOwnershipClient_Internal(NetworkConnection prevOwner) + { + //If losing or gaining ownership then clear replicate cache. + if (IsOwner || prevOwner == LocalConnection) + CallClearReplicateCache(false); + + OnOwnershipClient(prevOwner); + } +#endif /// /// Called on the client after gaining or losing ownership. /// @@ -213,7 +226,7 @@ public virtual void OnOwnershipClient(NetworkConnection prevOwner) { } /// private void CallClearReplicateCache(bool asServer) { -#if !PREDICTION_V2 +#if PREDICTION_1 ClearReplicateCache_Virtual(asServer); #else ClearReplicateCache(); diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Callbacks.cs.meta b/Assets/FishNet/Runtime/Object/NetworkBehaviour.Callbacks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Callbacks.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.Callbacks.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Logging.cs b/Assets/FishNet/Runtime/Object/NetworkBehaviour.Logging.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Logging.cs rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.Logging.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Logging.cs.meta b/Assets/FishNet/Runtime/Object/NetworkBehaviour.Logging.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Logging.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.Logging.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Prediction.cs b/Assets/FishNet/Runtime/Object/NetworkBehaviour.Prediction.cs similarity index 75% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Prediction.cs rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.Prediction.cs index 5547011..eae8ebc 100644 --- a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Prediction.cs +++ b/Assets/FishNet/Runtime/Object/NetworkBehaviour.Prediction.cs @@ -1,4 +1,5 @@ -using FishNet.CodeGenerating; +#if !PREDICTION_1 +using FishNet.CodeGenerating; using FishNet.Connection; using FishNet.Documenting; using FishNet.Managing; @@ -18,13 +19,11 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using UnityEngine; -using UnityScene = UnityEngine.SceneManagement.Scene; [assembly: InternalsVisibleTo(UtilityConstants.CODEGEN_ASSEMBLY_NAME)] namespace FishNet.Object { -#if PREDICTION_V2 /* This class is placed in this file while it is in development. * When everything is locked in the class will be integrated properly. */ internal static class ReplicateTickFinder @@ -157,63 +156,23 @@ int FindIndexBruteForce(out DataPlacementResult result) } } -#endif public abstract partial class NetworkBehaviour : MonoBehaviour { #region Public. -#if PREDICTION_V2 - /// - /// True if this Networkbehaviour implements prediction methods. - /// - [APIExclude] - [MakePublic] - protected internal bool UsesPrediction; -#endif - /// - /// True if the client has cached reconcile - /// - internal bool ClientHasReconcileData; -#if !PREDICTION_V2 - /// - /// Gets the last tick this NetworkBehaviour reconciled with. - /// - public uint GetLastReconcileTick() => _lastReconcileTick; - /// - /// Sets the last tick this NetworkBehaviour reconciled with. - /// - internal void SetLastReconcileTick(uint value, bool updateGlobals = true) - { - _lastReconcileTick = value; - if (updateGlobals) - PredictionManager.LastReconcileTick = value; - } - /// - /// - /// - private uint _lastReplicateTick; - /// - /// Gets the last tick this NetworkBehaviour replicated with. - /// - public uint GetLastReplicateTick() => _lastReplicateTick; - /// - /// Sets the last tick this NetworkBehaviour replicated with. - /// For internal use only. - /// - private void SetLastReplicateTick(uint value, bool updateGlobals = true) - { - _lastReplicateTick = value; - if (updateGlobals) - { - Owner.LocalReplicateTick = TimeManager.LocalTick; - PredictionManager.LastReplicateTick = value; - } - } -#endif - /// - /// True if this object is reconciling. Value will be false if there is no data to reconcile to, even if the PredictionManager IsReconciling. - /// - public bool IsReconciling { get; internal set; } + // /// + // /// True if this Networkbehaviour implements prediction methods. + // /// + // [APIExclude] + // [MakePublic] + // protected internal bool UsesPrediction; + /// + /// True if this NetworkBehaviour is reconciling. + /// If this NetworkBehaviour does not implemnent prediction methods this value will always be false. + /// Value will be false if there is no data to reconcile to, even if the PredictionManager IsReconciling. + /// Data may be missing if it were intentionally not sent, or due to packet loss. + /// + public bool IsBehaviourReconciling { get; internal set; } #endregion #region Private. @@ -226,30 +185,6 @@ private void SetLastReplicateTick(uint value, bool updateGlobals = true) /// private readonly Dictionary _reconcileRpcDelegates = new Dictionary(); /// - /// True if initialized compnents for prediction. - /// - private bool _predictionInitialized; - /// - /// Rigidbody found on this object. This is used for prediction. - /// - private Rigidbody _predictionRigidbody; - /// - /// Rigidbody2D found on this object. This is used for prediction. - /// - private Rigidbody2D _predictionRigidbody2d; - /// - /// Last position for TransformMayChange. - /// - private Vector3 _lastMayChangePosition; - /// - /// Last rotation for TransformMayChange. - /// - private Quaternion _lastMayChangeRotation; - /// - /// Last scale for TransformMayChange. - /// - private Vector3 _lastMayChangeScale; - /// /// Number of resends which may occur. This could be for client resending replicates to the server or the server resending reconciles to the client. /// private int _remainingResends; @@ -257,20 +192,10 @@ private void SetLastReplicateTick(uint value, bool updateGlobals = true) /// Last replicate tick read from remote. This can be the server reading a client or the other way around. /// private uint _lastReplicateReadRemoteTick; -#if !PREDICTION_V2 - /// - /// Last sent replicate by owning client or server to non-owners. - /// - private uint _lastSentReplicateTick; - /// - /// Last enqueued replicate tick on the server. - /// - private uint _lastReceivedReplicateTick; /// - /// Last tick of a reconcile received from the server. + /// Tick when replicates should begun to run. This is set and used when inputs are just received and need to queue to create a buffer. /// - private uint _lastReceivedReconcileTick; -#else + private uint _replicateStartTick = TimeManager.UNSET_TICK; /// /// Last tick iterated during a replicate replay. /// @@ -283,13 +208,6 @@ private void SetLastReplicateTick(uint value, bool updateGlobals = true) /// Last tick read for a replicate. /// private uint _lastReadReplicateTick; -#endif -#if !PREDICTION_V2 - /// - /// Last tick a reconcile occured. - /// - private uint _lastReconcileTick; -#endif #endregion /// @@ -317,28 +235,6 @@ internal void RegisterReconcileRpc(uint hash, ReconcileRpcDelegate del) _reconcileRpcDelegates[hash] = del; } -#if !PREDICTION_V2 - /// - /// Called when a replicate is received. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal void OnReplicateRpc(uint? methodHash, PooledReader reader, NetworkConnection sendingClient, Channel channel) - { - if (methodHash == null) - methodHash = ReadRpcHash(reader); - - if (sendingClient == null) - { - _networkObjectCache.NetworkManager.LogError($"NetworkConnection is null. Replicate {methodHash.Value} on {gameObject.name}, behaviour {GetType().Name} will not complete. Remainder of packet may become corrupt."); - return; - } - - if (_replicateRpcDelegates.TryGetValueIL2CPP(methodHash.Value, out ReplicateRpcDelegate del)) - del.Invoke(reader, sendingClient, channel); - else - _networkObjectCache.NetworkManager.LogWarning($"Replicate not found for hash {methodHash.Value} on {gameObject.name}, behaviour {GetType().Name}. Remainder of packet may become corrupt."); - } -#else /// /// Called when a replicate is received. /// @@ -353,7 +249,6 @@ internal void OnReplicateRpc(uint? methodHash, PooledReader reader, NetworkConne else _networkObjectCache.NetworkManager.LogWarning($"Replicate not found for hash {methodHash.Value} on {gameObject.name}, behaviour {GetType().Name}. Remainder of packet may become corrupt."); } -#endif /// /// Called when a reconcile is received. /// @@ -369,33 +264,6 @@ internal void OnReconcileRpc(uint? methodHash, PooledReader reader, Channel chan _networkObjectCache.NetworkManager.LogWarning($"Reconcile not found for hash {methodHash.Value}. Remainder of packet may become corrupt."); } -#if !PREDICTION_V2 - /// - /// Clears cached replicates. This can be useful to call on server and client after teleporting. - /// - /// True to reset values for server, false to reset values for client. - public void ClearReplicateCache(bool asServer) - { - ResetLastPredictionTicks(); - ClearReplicateCache_Virtual(asServer); - } - /// - /// Clears cached replicates for server and client. This can be useful to call on server and client after teleporting. - /// - public void ClearReplicateCache() - { - ResetLastPredictionTicks(); - ClearReplicateCache_Virtual(true); - ClearReplicateCache_Virtual(false); - } - /// - /// Clears cached replicates. - /// For internal use only. - /// - /// - [MakePublic] - internal virtual void ClearReplicateCache_Virtual(bool asServer) { } -#else /// /// Resets cached ticks used by prediction, such as last read and replicate tick. /// This is generally used when the ticks will be different then what was previously used; eg: when ownership changes. @@ -428,117 +296,7 @@ protected internal void ClearReplicateCache_Internal(BasicQueue replicates replicatesHistory[i].Dispose(); replicatesHistory.Clear(); } -#endif -#if !PREDICTION_V2 - /// - /// Resets last predirection tick values. - /// - private void ResetLastPredictionTicks() - { - _lastSentReplicateTick = 0; - _lastReceivedReplicateTick = 0; - _lastReceivedReconcileTick = 0; - SetLastReconcileTick(0, false); - SetLastReplicateTick(0, false); - } -#endif - -#if !PREDICTION_V2 - /// - /// Writes number of past inputs from buffer to writer and sends it to the server. - /// Internal use. - /// - private void Owner_SendReplicateRpc(uint hash, List replicates, Channel channel) where T : IReplicateData - { - if (!IsSpawnedWithWarning()) - return; - - int bufferCount = replicates.Count; - int lastBufferIndex = (bufferCount - 1); - //Nothing to send; should never be possible. - if (lastBufferIndex < 0) - return; - - //Number of past inputs to send. - int pastInputs = Mathf.Min(PredictionManager.RedundancyCount, bufferCount); - /* Where to start writing from. When passed - * into the writer values from this offset - * and forward will be written. */ - int offset = bufferCount - pastInputs; - if (offset < 0) - offset = 0; - - uint lastReplicateTick = _lastSentReplicateTick; - if (lastReplicateTick > 0) - { - uint diff = TimeManager.LocalTick - GetLastReplicateTick(); - offset += (int)diff - 1; - if (offset >= replicates.Count) - return; - } - - _lastSentReplicateTick = TimeManager.LocalTick; - - //Write history to methodWriter. - PooledWriter methodWriter = WriterPool.Retrieve(WriterPool.LENGTH_BRACKET); - methodWriter.WriteReplicate(replicates, offset); - PooledWriter writer; - //if (_rpcLinks.TryGetValueIL2CPP(hash, out RpcLinkType link)) - //writer = CreateLinkedRpc(link, methodWriter, Channel.Unreliable); - //else //todo add support for -> server rpc links. - - _transportManagerCache.CheckSetReliableChannel(methodWriter.Length + MAXIMUM_RPC_HEADER_SIZE, ref channel); - writer = CreateRpc(hash, methodWriter, PacketId.Replicate, channel); - NetworkManager.TransportManager.SendToServer((byte)channel, writer.GetArraySegment(), false); - - /* If being sent as reliable then clear buffer - * since we know it will get there. - * Also reset remaining resends. */ - if (channel == Channel.Reliable) - { - replicates.Clear(); - _remainingResends = 0; - } - - methodWriter.StoreLength(); - writer.StoreLength(); - } -#endif - - -#if !PREDICTION_V2 - /// - /// Sends a RPC to target. - /// Internal use. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void Server_SendReconcileRpc(uint hash, T reconcileData, Channel channel) - { - if (!IsSpawned) - return; - if (!Owner.IsActive) - return; - PooledWriter methodWriter = WriterPool.Retrieve(); - methodWriter.WriteUInt32(GetLastReplicateTick()); - methodWriter.Write(reconcileData); - - PooledWriter writer; -#if UNITY_EDITOR || DEVELOPMENT_BUILD - if (NetworkManager.DebugManager.ReconcileRpcLinks && _rpcLinks.TryGetValueIL2CPP(hash, out RpcLinkType link)) -#else - if (_rpcLinks.TryGetValueIL2CPP(hash, out RpcLinkType link)) -#endif - writer = CreateLinkedRpc(link, methodWriter, channel); - else - writer = CreateRpc(hash, methodWriter, PacketId.Reconcile, channel); - - _networkObjectCache.NetworkManager.TransportManager.SendToClient((byte)channel, writer.GetArraySegment(), Owner); - - methodWriter.Store(); - writer.Store(); - } -#else /// /// Sends a RPC to target. /// Internal use. @@ -551,6 +309,11 @@ protected internal void Server_SendReconcileRpc(uint hash, T reconcileData, C if (!IsSpawned) return; + //No owner and no state forwarding, nothing to do. + bool stateForwarding = _networkObjectCache.EnableStateForwarding; + if (!Owner.IsValid && !stateForwarding) + return; + PooledWriter methodWriter = WriterPool.Retrieve(); /* Tick does not need to be written because it will always * be the localTick of the server. For the clients, this will @@ -570,58 +333,1041 @@ protected internal void Server_SendReconcileRpc(uint hash, T reconcileData, C else writer = CreateRpc(hash, methodWriter, PacketId.Reconcile, channel); - foreach (NetworkConnection nc in Observers) - nc.WriteState(writer); - + //If state forwarding is not enabled then only send to owner. + if (!stateForwarding) + { + Owner.WriteState(writer); + } + //State forwarding, send to all. + else + { + foreach (NetworkConnection nc in Observers) + nc.WriteState(writer); + } methodWriter.Store(); writer.Store(); } -#endif -#if !PREDICTION_V2 - /// - /// Returns if there is a chance the transform may change after the tick. - /// - /// - protected internal bool PredictedTransformMayChange() + + // /// + // /// Returns if there is a chance the transform may change after the tick. + // /// + // /// + // protected internal bool PredictedTransformMayChange() + // { + // if (TimeManager.PhysicsMode == PhysicsMode.Disabled) + // return false; + + // if (!_predictionInitialized) + // { + // _predictionInitialized = true; + // _predictionRigidbody = GetComponentInParent(); + // _predictionRigidbody2d = GetComponentInParent(); + // } + + // /* Use distance when checking if changed because rigidbodies can twitch + //* or move an extremely small amount. These small moves are not worth + //* resending over because they often fix themselves each frame. */ + // float changeDistance = 0.000004f; + + // bool positionChanged = (transform.position - _lastMayChangePosition).sqrMagnitude > changeDistance; + // bool rotationChanged = (transform.rotation.eulerAngles - _lastMayChangeRotation.eulerAngles).sqrMagnitude > changeDistance; + // bool scaleChanged = (transform.localScale - _lastMayChangeScale).sqrMagnitude > changeDistance; + // bool transformChanged = (positionChanged || rotationChanged || scaleChanged); + // /* Returns true if transform.hasChanged, or if either + //* of the rigidbodies have velocity. */ + // bool changed = ( + // transformChanged || + // (_predictionRigidbody != null && (_predictionRigidbody.velocity != Vector3.zero || _predictionRigidbody.angularVelocity != Vector3.zero)) || + // (_predictionRigidbody2d != null && (_predictionRigidbody2d.velocity != Vector2.zero || _predictionRigidbody2d.angularVelocity != 0f)) + // ); + + // //If transform changed update last values. + // if (transformChanged) + // { + // _lastMayChangePosition = transform.position; + // _lastMayChangeRotation = transform.rotation; + // _lastMayChangeScale = transform.localScale; + // } + + // return changed; + // } + + + /// + /// Called internally when an input from localTick should be replayed. + /// + internal virtual void Replicate_Replay_Start(uint replayTick) { } + /// + /// Replays inputs from replicates. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + protected internal void Replicate_Replay(uint replayTick, ReplicateUserLogicDelegate del, List replicatesHistory, Channel channel) where T : IReplicateData + { + //Reconcile data was not received so cannot replay. + if (!IsBehaviourReconciling) + return; + + if (_networkObjectCache.IsOwner) + Replicate_Replay_Authoritative(replayTick, del, replicatesHistory, channel); + else + Replicate_Replay_NonAuthoritative(replayTick, del, replicatesHistory, channel); + } + /// + /// Replays an input for authoritative entity. + /// + protected internal void Replicate_Replay_Authoritative(uint replayTick, ReplicateUserLogicDelegate del, List replicatesHistory, Channel channel) where T : IReplicateData + { + ReplicateTickFinder.DataPlacementResult findResult; + int replicateIndex = ReplicateTickFinder.GetReplicateHistoryIndex(replayTick, replicatesHistory, out findResult); + + T data; + ReplicateState state; + //If found then the replicate has been received by the server. + if (findResult == ReplicateTickFinder.DataPlacementResult.Exact) + { + data = replicatesHistory[replicateIndex]; + state = ReplicateState.ReplayedCreated; + + del.Invoke(data, state, channel); + _lastReplicatedTick = data.GetTick(); + _networkObjectCache.LastUnorderedReplicateTick = data.GetTick(); + } + } + /// + /// Replays an input for non authoritative entity. + /// + protected internal void Replicate_Replay_NonAuthoritative(uint replayTick, ReplicateUserLogicDelegate del, List replicatesHistory, Channel channel) where T : IReplicateData + { + //NOTESSTART + /* Only replay the first available data after a reconcile then run the rest + * as default future. This is so there is a consistency of which inputs are run + * as created and which are future, using the ones that were not run as a buffer. */ + //NOTESEND + T data; + ReplicateState state; + //If the first replay. + if (replayTick == (_networkObjectCache.PredictionManager.ServerStateTick + 1)) + { + ReplicateTickFinder.DataPlacementResult findResult; + int replicateIndex = ReplicateTickFinder.GetReplicateHistoryIndex(replayTick, replicatesHistory, out findResult); + //If not found then something went wrong. + if (findResult == ReplicateTickFinder.DataPlacementResult.Exact) + { + data = replicatesHistory[replicateIndex]; + state = ReplicateState.ReplayedCreated; + } + else + { + SetDataToDefault(); + } + } + //Not the first replay tick. + else + { + SetDataToDefault(); + } + + + void SetDataToDefault() + { + data = default; + data.SetTick(replayTick); + state = ReplicateState.ReplayedFuture; + } + + del.Invoke(data, state, channel); + if (_lastReplicatedTick < data.GetTick()) + _lastReplicatedTick = data.GetTick(); + _networkObjectCache.LastUnorderedReplicateTick = data.GetTick(); + } + + /// + /// Gets the next replicate in perform when server or non-owning client. + /// + /// + [MakePublic] + [APIExclude] + protected internal void Replicate_NonAuthoritative(ReplicateUserLogicDelegate del, BasicQueue replicatesQueue, List replicatesHistory, Channel channel) where T : IReplicateData + { + bool ownerlessAndServer = (!Owner.IsValid && IsServerStarted); + if (IsOwner || ownerlessAndServer) + return; + + TimeManager tm = _networkObjectCache.TimeManager; + uint localTick = tm.LocalTick; + //Server is not initialized. + if (!_networkObjectCache.IsServerInitialized) + { + uint tick; + if (replicatesHistory.Count > 0) + { + tick = replicatesHistory[^1].GetTick() + 1; + } + else + { + if (_lastReplicatedTick != TimeManager.UNSET_TICK) + tick = _lastReplicatedTick++; + else + tick = _networkObjectCache.TimeManager.LastPacketTick.Value(); + } + + T data = default(T); + data.SetTick(tick); + ReplicateData(data, ReplicateState.CurrentFuture); + } + //If here then server is initialized. + else + { + int count = replicatesQueue.Count; + /* If count is 0 then data must be set default + * and as predicted. */ + if (count == 0) + { + uint tick = (_lastReplicatedTick + 1); + T data = default(T); + data.SetTick(tick); + ReplicateData(data, ReplicateState.CurrentFuture); + } + //Not predicted, is user created. + else + { + //Check to unset start tick, which essentially voids it resulting in inputs being run immediately. + if (localTick >= _replicateStartTick) + _replicateStartTick = TimeManager.UNSET_TICK; + /* As said above, if start tick is unset then replicates + * can run. When still set that means the start condition has + * not been met yet. */ + if (_replicateStartTick == TimeManager.UNSET_TICK) + { + ReplicateData(replicatesQueue.Dequeue(), ReplicateState.CurrentCreated); + count--; + + PredictionManager pm = PredictionManager; + bool consumeExcess = (!pm.DropExcessiveReplicates || IsClientOnlyStarted); + //Allow 1 over expected before consuming. + int leaveInBuffer = 1; + //Only consume if the queue count is over leaveInBuffer. + if (consumeExcess && count > leaveInBuffer) + { + byte maximumAllowedConsumes = 1; + int maximumPossibleConsumes = (count - leaveInBuffer); + int consumeAmount = Mathf.Min(maximumAllowedConsumes, maximumPossibleConsumes); + + for (int i = 0; i < consumeAmount; i++) + ReplicateData(replicatesQueue.Dequeue(), ReplicateState.CurrentCreated); + } + } + } + } + + void ReplicateData(T data, ReplicateState state) + { + uint dataTick = data.GetTick(); + _lastReplicatedTick = dataTick; + if (state == ReplicateState.CurrentCreated) + _networkObjectCache.SetReplicateTick(dataTick, true); + //Add to history. + replicatesHistory.Add(data); + del.Invoke(data, state, channel); + } + + } + + /// + /// Returns if a replicates data changed and updates resends as well data tick. + /// + /// True to enqueue data for replaying. + /// True if data has changed.. + [MakePublic] //internal + [APIExclude] + protected internal void Replicate_Authoritative(ReplicateUserLogicDelegate del, uint methodHash, BasicQueue replicatesQueue, List replicatesHistory, T data, Channel channel) where T : IReplicateData + { + bool ownerlessAndServer = (!Owner.IsValid && IsServerStarted); + if (!IsOwner && !ownerlessAndServer) + return; + + Func isDefaultDel = PublicPropertyComparer.IsDefault; + if (isDefaultDel == null) + { + NetworkManager.LogError($"ReplicateComparers not found for type {typeof(T).FullName}"); + return; + } + + PredictionManager pm = NetworkManager.PredictionManager; + uint localTick = TimeManager.LocalTick; + + data.SetTick(localTick); + replicatesHistory.Add(data); + //Check to reset resends. + bool isDefault = isDefaultDel.Invoke(data); + bool mayChange = false;// PredictedTransformMayChange(); + bool resetResends = (mayChange || !isDefault); + /* If remaining resends is more than 0 then that means + * redundancy is still in effect. When redundancy is not + * in effect then histories to send can be 1 for this iteration. */ + int pastInputs = (_remainingResends > 0) ? PredictionManager.Interpolation : 1; + //pastInputs = PredictionManager.RedundancyCount; + if (resetResends) + _remainingResends = pm.Interpolation; + + bool sendData = (_remainingResends > 0); + if (sendData) + { + int replicatesHistoryCount = replicatesHistory.Count; + /* Remove the number of replicates which are over maximum. + * + * The clientHost object must keep redundancy count + * to send past inputs to others. + * + * Otherwise use maximum client replicates which will be a variable + * rate depending on tick rate. The value returned is several seconds + * worth of owner inputs to be able to replay during a reconcile. + * + * Server does not reconcile os it only needs enough for redundancy. + */ + int maxCount = (IsServerStarted) ? pm.Interpolation : pm.MaximumClientReplicates; + //Number to remove which is over max count. + int removeCount = (replicatesHistoryCount - maxCount); + //If there are any to remove. + if (removeCount > 0) + { + //Dispose first. + for (int i = 0; i < removeCount; i++) + replicatesHistory[i].Dispose(); + + //Then remove range. + replicatesHistory.RemoveRange(0, removeCount); + } + + /* If not server then send to server. + * If server then send to clients. */ + bool toServer = !IsServerStarted; + Replicate_SendAuthoritative(toServer, methodHash, pastInputs, replicatesHistory, localTick, channel); + _remainingResends--; + } + + //Update last replicate tick. + _networkObjectCache.SetReplicateTick(data.GetTick(), true); + //Owner always replicates with new data. + del.Invoke(data, ReplicateState.CurrentCreated, channel); + //TODO: dispose replicate datas from history on replays. + } + + /// + /// Sends a Replicate to server or clients. + /// + private void Replicate_SendAuthoritative(bool toServer, uint hash, int pastInputs, List replicatesHistory, uint queuedTick, Channel channel) where T : IReplicateData + { + /* Do not use IsSpawnedWithWarning because the server + * will still call this a tick or two as clientHost when + * an owner disconnects. This comes from calling Replicate(default) + * for the server-side processing in NetworkBehaviours. */ + if (!IsSpawned) + return; + + int historyCount = replicatesHistory.Count; + //Nothing to send; should never be possible. + if (historyCount <= 0) + return; + + //Number of past inputs to send. + if (historyCount < pastInputs) + pastInputs = historyCount; + /* Where to start writing from. When passed + * into the writer values from this offset + * and forward will be written. + * Always write up to past inputs. */ + int offset = (historyCount - pastInputs); + + //Write history to methodWriter. + PooledWriter methodWriter = WriterPool.Retrieve(WriterPool.LENGTH_BRACKET); + /* If going to clients from the server then + * write the queueTick. */ + if (!toServer) + methodWriter.WriteTickUnpacked(queuedTick); + methodWriter.WriteReplicate(replicatesHistory, offset, TimeManager.LocalTick); + + _transportManagerCache.CheckSetReliableChannel(methodWriter.Length + MAXIMUM_RPC_HEADER_SIZE, ref channel); + PooledWriter writer = CreateRpc(hash, methodWriter, PacketId.Replicate, channel); + + /* toServer will never be true if clientHost. + * When clientHost and here replicates will + * always just send to clients, while + * excluding clientHost. */ + if (toServer) + { + NetworkManager.TransportManager.SendToServer((byte)channel, writer.GetArraySegment(), false); + } + else + { + /* If going to clients from server, then only send + * if state forwarding is enabled. */ + if (_networkObjectCache.EnableStateForwarding) + { + //Exclude owner and if clientHost, also localClient. + _networkConnectionCache.Clear(); + _networkConnectionCache.Add(Owner); + if (IsClientStarted) + _networkConnectionCache.Add(ClientManager.Connection); + + NetworkManager.TransportManager.SendToClients((byte)channel, writer.GetArraySegment(), Observers, _networkConnectionCache, false); + } + } + + /* If sending as reliable there is no reason + * to perform resends, so clear remaining resends. */ + if (channel == Channel.Reliable) + _remainingResends = 0; + + methodWriter.StoreLength(); + writer.StoreLength(); + } + + /// + /// Reads a replicate the client. + /// + /// Data from the reader which only applies to the replicate. + [MakePublic] + internal void Replicate_Reader(uint hash, PooledReader reader, NetworkConnection sender, ref T[] arrBuffer, BasicQueue replicatesQueue, List replicatesHistory, Channel channel) where T : IReplicateData + { + /* This will never be received on owner, except in the condition + * the server is the owner and also a client. In such condition + * the method is exited after data is parsed. */ + PredictionManager pm = _networkObjectCache.PredictionManager; + TimeManager tm = _networkObjectCache.TimeManager; + bool fromServer = (reader.Source == Reader.DataSource.Server); + + uint tick; + /* If coming from the server then read the tick. Server sends tick + * if authority or if relaying from another client. The tick which + * arrives will be the tick the replicate will run on the server. */ + if (fromServer) + tick = reader.ReadTickUnpacked(); + /* When coming from a client it will always be owner. + * Client sends out replicates soon as they are run. + * It's safe to use the LastRemoteTick from the client + * in addition to QueuedInputs. */ + else + tick = (tm.LastPacketTick.LastRemoteTick); + + int receivedReplicatesCount = reader.ReadReplicate(ref arrBuffer, tick); + + //If received on clientHost simply ignore after parsing data. + if (fromServer && IsHostStarted) + return; + + /* Replicate rpc readers relay to this method and + * do not have an owner check in the generated code. + * Only server needs to check for owners. Clients + * should accept the servers data regardless. + * + * If coming from a client and that client is not owner then exit. */ + if (!fromServer && !OwnerMatches(sender)) + return; + //Early exit if old data. + if (TimeManager.LastPacketTick.LastRemoteTick < _lastReplicateReadRemoteTick) + return; + _lastReplicateReadRemoteTick = TimeManager.LastPacketTick.LastRemoteTick; + + //If from a client that is not clientHost do some safety checks. + if (!fromServer && !Owner.IsLocalClient) + { + if (receivedReplicatesCount > pm.Interpolation) + { + sender.Kick(reader, KickReason.ExploitAttempt, LoggingType.Common, $"Connection {sender.ToString()} sent too many past replicates. Connection will be kicked immediately."); + return; + } + } + + Replicate_EnqueueReceivedReplicate(receivedReplicatesCount, arrBuffer, replicatesQueue, replicatesHistory, channel); + Replicate_SendNonAuthoritative(hash, replicatesQueue, channel); + } + + /// + /// Sends data from a reader which only contains the replicate packet. + /// + /// Tick of the last replicate entry. + [MakePublic] + internal void Replicate_SendNonAuthoritative(uint hash, BasicQueue replicatesQueue, Channel channel) where T : IReplicateData + { + if (!IsServerStarted) + return; + if (!_networkObjectCache.EnableStateForwarding) + return; + + int queueCount = replicatesQueue.Count; + //Limit history count to max of queued amount, or queued inputs, whichever is lesser. + int historyCount = (int)Mathf.Min(_networkObjectCache.PredictionManager.Interpolation, queueCount); + //None to send. + if (historyCount == 0) + return; + + //If the only observer is the owner then there is no need to write. + int observersCount = Observers.Count; + //Quick exit for no observers other than owner. + if (observersCount == 0 || (Owner.IsValid && observersCount == 1)) + return; + + PooledWriter methodWriter = WriterPool.Retrieve(WriterPool.LENGTH_BRACKET); + + uint localTick = _networkObjectCache.TimeManager.LocalTick; + /* Write when the last entry will run. + * + * Typically the last entry will run on localTick + (queueCount - 1). + * 1 is subtracted from queueCount because in most cases the first entry + * is going to run same tick. + * An exception is when the replicateStartTick is set, then there is going + * to be a delayed based on start tick difference. */ + uint runTickOflastEntry = localTick + ((uint)queueCount - 1); + //If start tick is set then add on the delay. + if (_replicateStartTick != TimeManager.UNSET_TICK) + runTickOflastEntry += (_replicateStartTick - TimeManager.LocalTick); + //Write the run tick now. + methodWriter.WriteTickUnpacked(runTickOflastEntry); + //Write the replicates. + methodWriter.WriteReplicate(replicatesQueue, historyCount, runTickOflastEntry); + + PooledWriter writer = CreateRpc(hash, methodWriter, PacketId.Replicate, channel); + + //Exclude owner and if clientHost, also localClient. + _networkConnectionCache.Clear(); + if (Owner.IsValid) + _networkConnectionCache.Add(Owner); + if (IsClientStarted && !Owner.IsLocalClient) + _networkConnectionCache.Add(ClientManager.Connection); + NetworkManager.TransportManager.SendToClients((byte)channel, writer.GetArraySegment(), Observers, _networkConnectionCache, false); + + methodWriter.StoreLength(); + writer.StoreLength(); + } + + /// + /// Handles a received replicate packet. + /// + private void Replicate_EnqueueReceivedReplicate(int receivedReplicatesCount, T[] arrBuffer, BasicQueue replicatesQueue, List replicatesHistory, Channel channel) where T : IReplicateData + { + int startQueueCount = replicatesQueue.Count; + /* Owner never gets this for their own object so + * this can be processed under the assumption data is only + * handled on unowned objects. */ + PredictionManager pm = PredictionManager; + //Maximum number of replicates allowed to be queued at once. + int maximmumReplicates = (IsServerStarted) ? pm.GetMaximumServerReplicates() : pm.MaximumClientReplicates; + for (int i = 0; i < receivedReplicatesCount; i++) + { + T entry = arrBuffer[i]; + uint tick = entry.GetTick(); + + //Skip if old data. + if (tick <= _lastReadReplicateTick) + { + entry.Dispose(); + continue; + } + _lastReadReplicateTick = tick; + //Cannot queue anymore, discard oldest. + if (replicatesQueue.Count >= maximmumReplicates) + { + T data = replicatesQueue.Dequeue(); + data.Dispose(); + } + + /* Check if replicate is already in history. + * This can occur when the replicate method has a predicted + * state for the tick, but a user created replicate comes + * through afterwards. + * + * Only perform this check if not the server, since server + * does not reconcile it will never use replicatesHistory. + * The server also does not predict replicates in the same way + * a client does. When an owner sends a replicate to the server + * the server only uses the owner tick to check if it's an old replicate. + * But when running the replicate, the server applies it's local tick and + * sends that to spectators. This ensures that replicates received by a client + * with an unstable connection are not skipped. */ + //Add automatically if server. + if (_networkObjectCache.IsServerStarted) + { + replicatesQueue.Enqueue(entry); + } + //Run checks to replace data if not server. + else + { + /* See if replicate tick is in history. Keep in mind + * this is the localTick from the server, not the localTick of + * the client which is having their replicate relayed. */ + ReplicateTickFinder.DataPlacementResult findResult; + int index = ReplicateTickFinder.GetReplicateHistoryIndex(tick, replicatesHistory, out findResult); + /* Exact entry found. This is the most likely + * scenario. Client would have already run the tick + * in the future, and it's now being replaced with + * the proper data. */ + if (findResult == ReplicateTickFinder.DataPlacementResult.Exact) + { + T prevEntry = replicatesHistory[index]; + prevEntry.Dispose(); + replicatesHistory[index] = entry; + } + else if (findResult == ReplicateTickFinder.DataPlacementResult.InsertMiddle) + { + replicatesHistory.Insert(index, entry); + } + else if (findResult == ReplicateTickFinder.DataPlacementResult.InsertEnd) + { + replicatesHistory.Add(entry); + } + /* Insert beginning should not happen unless the data is REALLY old. + * This would mean the network was in an unplayable state. Discard the + * data. */ + if (findResult == ReplicateTickFinder.DataPlacementResult.InsertBeginning) + { + entry.Dispose(); + } + } + } + + /* If entries are being added after nothing then + * start the queued inputs delay. Only the server needs + * to do this since clients implement the queue delay + * by holding reconcile x ticks rather than not running received + * x ticks. */ + if (_networkObjectCache.IsServerInitialized && startQueueCount == 0 && replicatesQueue.Count > 0) + //_replicateStartTick = (_networkObjectCache.TimeManager.LocalTick + pm.Interpolation); + _replicateStartTick = (_networkObjectCache.TimeManager.LocalTick); + } + + + /// + /// Override this method to create your reconcile data, and call your reconcile method. + /// + public virtual void CreateReconcile() { } + + /// + /// Sends a reconcile to clients. + /// + public void Reconcile_Server(uint methodHash, T data, Channel channel) where T : IReconcileData + { + if (!IsServerStarted) + return; + + //Tick does not need to be set for reconciles since they come in as state updates, which have the tick included globally. + Server_SendReconcileRpc(methodHash, data, channel); + } + + /// + /// This is called when the networkbehaviour should perform a reconcile. + /// Codegen overrides this calling Reconcile_Client with the needed data. + /// + internal virtual void Reconcile_Client_Start() { } + /// + /// Processes a reconcile for client. + /// + [APIExclude] + [MakePublic] + protected internal void Reconcile_Client(ReconcileUserLogicDelegate reconcileDel, List replicatesHistory, T data) where T : IReconcileData where T2 : IReplicateData + { + //No data to reconcile to. + if (!IsBehaviourReconciling) + return; + + if (replicatesHistory.Count > 0) + { + /* Remove replicates up to reconcile. Since the reconcile + * is the state after a replicate for it's tick we no longer + * need any replicates prior. */ + //Find the closest entry which can be removed. + int removalCount = 0; + uint dataTick = data.GetTick(); + //A few quick tests. + if (replicatesHistory.Count > 0) + { + /* If the last entry in history is less or equal + * to datatick then all histories need to be removed + * as reconcile is beyond them. */ + if (replicatesHistory[^1].GetTick() <= dataTick) + { + removalCount = replicatesHistory.Count; + } + //Somewhere in between. Find what to remove up to. + else + { + for (int i = 0; i < replicatesHistory.Count; i++) + { + uint entryTick = replicatesHistory[i].GetTick(); + /* Soon as an entry beyond dataTick is + * found remove up to that entry. */ + if (entryTick > dataTick) + { + removalCount = i; + break; + } + } + } + } + + for (int i = 0; i < removalCount; i++) + replicatesHistory[i].Dispose(); + replicatesHistory.RemoveRange(0, removalCount); + } + //Call reconcile user logic. + reconcileDel?.Invoke(data, Channel.Reliable); + } + + internal void Reconcile_Client_End() + { + IsBehaviourReconciling = false; + } + + /// + /// Reads a reconcile for the client. + /// + public void Reconcile_Reader(PooledReader reader, ref T data, Channel channel) where T : IReconcileData + { + T newData = reader.Read(); + uint tick = (IsOwner) ? PredictionManager.ClientStateTick : PredictionManager.ServerStateTick; + //Do not process if an old state. + if (tick < _lastReadReconcileTick) + return; + + data = newData; + data.SetTick(tick); + + IsBehaviourReconciling = true; + //Also set on NetworkObject since at least one behaviour is reconciling. + _networkObjectCache.IsObjectReconciling = true; + _lastReadReconcileTick = tick; + } + + } +} + +#else + +using FishNet.CodeGenerating; +using FishNet.Connection; +using FishNet.Managing; +using FishNet.Managing.Logging; +using FishNet.Managing.Predicting; +using FishNet.Managing.Server; +using FishNet.Managing.Timing; +using FishNet.Object.Prediction; +using FishNet.Object.Prediction.Delegating; +using FishNet.Serializing; +using FishNet.Serializing.Helping; +using FishNet.Transporting; +using FishNet.Utility; +using FishNet.Utility.Performance; +using GameKit.Dependencies.Utilities; +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using UnityEngine; +using UnityScene = UnityEngine.SceneManagement.Scene; + +[assembly: InternalsVisibleTo(UtilityConstants.CODEGEN_ASSEMBLY_NAME)] +namespace FishNet.Object +{ + + public abstract partial class NetworkBehaviour : MonoBehaviour + { +#region Public. + /// + /// Gets the last tick this NetworkBehaviour reconciled with. + /// + public uint GetLastReconcileTick() => _lastReconcileTick; + /// + /// Sets the last tick this NetworkBehaviour reconciled with. + /// + internal void SetLastReconcileTick(uint value, bool updateGlobals = true) + { + _lastReconcileTick = value; + if (updateGlobals) + PredictionManager.LastReconcileTick = value; + } + /// + /// + /// + private uint _lastReplicateTick; + /// + /// Gets the last tick this NetworkBehaviour replicated with. + /// + public uint GetLastReplicateTick() => _lastReplicateTick; + /// + /// Sets the last tick this NetworkBehaviour replicated with. + /// For internal use only. + /// + private void SetLastReplicateTick(uint value, bool updateGlobals = true) + { + _lastReplicateTick = value; + if (updateGlobals) + { + Owner.LocalReplicateTick = TimeManager.LocalTick; + PredictionManager.LastReplicateTick = value; + } + } + /// + /// True if this NetworkBehaviour has reconcile data. + /// + public bool ClientHasReconcileData { get; internal set; } + /// + /// True if this NetworkBehaviour is currently reconciling. + /// + public bool IsBehaviourReconciling { get; internal set; } +#endregion + +#region Private. + /// + /// Registered Replicate methods. + /// + private readonly Dictionary _replicateRpcDelegates = new Dictionary(); + /// + /// Registered Reconcile methods. + /// + private readonly Dictionary _reconcileRpcDelegates = new Dictionary(); + /// + /// True if initialized compnents for prediction. + /// + private bool _predictionInitialized; + /// + /// Rigidbody found on this object. This is used for prediction. + /// + private Rigidbody _predictionRigidbody; + /// + /// Rigidbody2D found on this object. This is used for prediction. + /// + private Rigidbody2D _predictionRigidbody2d; + /// + /// Last position for TransformMayChange. + /// + private Vector3 _lastMayChangePosition; + /// + /// Last rotation for TransformMayChange. + /// + private Quaternion _lastMayChangeRotation; + /// + /// Last scale for TransformMayChange. + /// + private Vector3 _lastMayChangeScale; + /// + /// Number of resends which may occur. This could be for client resending replicates to the server or the server resending reconciles to the client. + /// + private int _remainingResends; + /// + /// Last replicate tick read from remote. This can be the server reading a client or the other way around. + /// + private uint _lastReplicateReadRemoteTick; + /// + /// Last sent replicate by owning client or server to non-owners. + /// + private uint _lastSentReplicateTick; + /// + /// Last enqueued replicate tick on the server. + /// + private uint _lastReceivedReplicateTick; + /// + /// Last tick of a reconcile received from the server. + /// + private uint _lastReceivedReconcileTick; + /// + /// Last tick a reconcile occured. + /// + private uint _lastReconcileTick; +#endregion + + /// + /// Registers a RPC method. + /// Internal use. + /// + /// + /// + [MakePublic] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal void RegisterReplicateRpc(uint hash, ReplicateRpcDelegate del) { - if (TimeManager.PhysicsMode == PhysicsMode.Disabled) - return false; + _replicateRpcDelegates[hash] = del; + } + /// + /// Registers a RPC method. + /// Internal use. + /// + /// + /// + [MakePublic] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal void RegisterReconcileRpc(uint hash, ReconcileRpcDelegate del) + { + _reconcileRpcDelegates[hash] = del; + } - if (!_predictionInitialized) + /// + /// Called when a replicate is received. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal void OnReplicateRpc(uint? methodHash, PooledReader reader, NetworkConnection sendingClient, Channel channel) + { + if (methodHash == null) + methodHash = ReadRpcHash(reader); + + if (sendingClient == null) { - _predictionInitialized = true; - _predictionRigidbody = GetComponentInParent(); - _predictionRigidbody2d = GetComponentInParent(); + _networkObjectCache.NetworkManager.LogError($"NetworkConnection is null. Replicate {methodHash.Value} on {gameObject.name}, behaviour {GetType().Name} will not complete. Remainder of packet may become corrupt."); + return; } - /* Use distance when checking if changed because rigidbodies can twitch - * or move an extremely small amount. These small moves are not worth - * resending over because they often fix themselves each frame. */ - float changeDistance = 0.000004f; + if (_replicateRpcDelegates.TryGetValueIL2CPP(methodHash.Value, out ReplicateRpcDelegate del)) + del.Invoke(reader, sendingClient, channel); + else + _networkObjectCache.NetworkManager.LogWarning($"Replicate not found for hash {methodHash.Value} on {gameObject.name}, behaviour {GetType().Name}. Remainder of packet may become corrupt."); + } - bool positionChanged = (transform.position - _lastMayChangePosition).sqrMagnitude > changeDistance; - bool rotationChanged = (transform.rotation.eulerAngles - _lastMayChangeRotation.eulerAngles).sqrMagnitude > changeDistance; - bool scaleChanged = (transform.localScale - _lastMayChangeScale).sqrMagnitude > changeDistance; - bool transformChanged = (positionChanged || rotationChanged || scaleChanged); - /* Returns true if transform.hasChanged, or if either - * of the rigidbodies have velocity. */ - bool changed = ( - transformChanged || - (_predictionRigidbody != null && (_predictionRigidbody.velocity != Vector3.zero || _predictionRigidbody.angularVelocity != Vector3.zero)) || - (_predictionRigidbody2d != null && (_predictionRigidbody2d.velocity != Vector2.zero || _predictionRigidbody2d.angularVelocity != 0f)) - ); + /// + /// Called when a reconcile is received. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal void OnReconcileRpc(uint? methodHash, PooledReader reader, Channel channel) + { + if (methodHash == null) + methodHash = ReadRpcHash(reader); - //If transform changed update last values. - if (transformChanged) + if (_reconcileRpcDelegates.TryGetValueIL2CPP(methodHash.Value, out ReconcileRpcDelegate del)) + del.Invoke(reader, channel); + else + _networkObjectCache.NetworkManager.LogWarning($"Reconcile not found for hash {methodHash.Value}. Remainder of packet may become corrupt."); + } + + /// + /// Clears cached replicates. This can be useful to call on server and client after teleporting. + /// + /// True to reset values for server, false to reset values for client. + public void ClearReplicateCache(bool asServer) + { + ResetLastPredictionTicks(); + ClearReplicateCache_Virtual(asServer); + } + /// + /// Clears cached replicates for server and client. This can be useful to call on server and client after teleporting. + /// + public void ClearReplicateCache() + { + ResetLastPredictionTicks(); + ClearReplicateCache_Virtual(true); + ClearReplicateCache_Virtual(false); + } + /// + /// Clears cached replicates. + /// For internal use only. + /// + /// + [MakePublic] + internal virtual void ClearReplicateCache_Virtual(bool asServer) { } + + /// + /// Resets last predirection tick values. + /// + private void ResetLastPredictionTicks() + { + _lastSentReplicateTick = 0; + _lastReceivedReplicateTick = 0; + _lastReceivedReconcileTick = 0; + SetLastReconcileTick(0, false); + SetLastReplicateTick(0, false); + } + + + /// + /// Writes number of past inputs from buffer to writer and sends it to the server. + /// Internal use. + /// + private void Owner_SendReplicateRpc(uint hash, List replicates, Channel channel) where T : IReplicateData + { + if (!IsSpawnedWithWarning()) + return; + + int bufferCount = replicates.Count; + int lastBufferIndex = (bufferCount - 1); + //Nothing to send; should never be possible. + if (lastBufferIndex < 0) + return; + + //Number of past inputs to send. + int pastInputs = Mathf.Min(PredictionManager.RedundancyCount, bufferCount); + /* Where to start writing from. When passed + * into the writer values from this offset + * and forward will be written. */ + int offset = bufferCount - pastInputs; + if (offset < 0) + offset = 0; + + uint lastReplicateTick = _lastSentReplicateTick; + if (lastReplicateTick > 0) { - _lastMayChangePosition = transform.position; - _lastMayChangeRotation = transform.rotation; - _lastMayChangeScale = transform.localScale; + uint diff = TimeManager.LocalTick - GetLastReplicateTick(); + offset += (int)diff - 1; + if (offset >= replicates.Count) + return; } - return changed; + _lastSentReplicateTick = TimeManager.LocalTick; + + //Write history to methodWriter. + PooledWriter methodWriter = WriterPool.Retrieve(WriterPool.LENGTH_BRACKET); + methodWriter.WriteReplicate(replicates, offset); + PooledWriter writer; + //if (_rpcLinks.TryGetValueIL2CPP(hash, out RpcLinkType link)) + //writer = CreateLinkedRpc(link, methodWriter, Channel.Unreliable); + //else //todo add support for -> server rpc links. + + _transportManagerCache.CheckSetReliableChannel(methodWriter.Length + MAXIMUM_RPC_HEADER_SIZE, ref channel); + writer = CreateRpc(hash, methodWriter, PacketId.Replicate, channel); + NetworkManager.TransportManager.SendToServer((byte)channel, writer.GetArraySegment(), false); + + /* If being sent as reliable then clear buffer + * since we know it will get there. + * Also reset remaining resends. */ + if (channel == Channel.Reliable) + { + replicates.Clear(); + _remainingResends = 0; + } + + methodWriter.StoreLength(); + writer.StoreLength(); + } + + + /// + /// Sends a RPC to target. + /// Internal use. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void Server_SendReconcileRpc(uint hash, T reconcileData, Channel channel) + { + if (!IsSpawned) + return; + if (!Owner.IsActive) + return; + + PooledWriter methodWriter = WriterPool.Retrieve(); + methodWriter.WriteUInt32(GetLastReplicateTick()); + methodWriter.Write(reconcileData); + + PooledWriter writer; +#if UNITY_EDITOR || DEVELOPMENT_BUILD + if (NetworkManager.DebugManager.ReconcileRpcLinks && _rpcLinks.TryGetValueIL2CPP(hash, out RpcLinkType link)) +#else + if (_rpcLinks.TryGetValueIL2CPP(hash, out RpcLinkType link)) +#endif + writer = CreateLinkedRpc(link, methodWriter, channel); + else + writer = CreateRpc(hash, methodWriter, PacketId.Reconcile, channel); + + _networkObjectCache.NetworkManager.TransportManager.SendToClient((byte)channel, writer.GetArraySegment(), Owner); + + methodWriter.Store(); + writer.Store(); } -#else + + /// /// Returns if there is a chance the transform may change after the tick. /// @@ -665,9 +1411,7 @@ protected internal bool PredictedTransformMayChange() return changed; } -#endif -#if !PREDICTION_V2 /// /// Checks conditions for a replicate. /// @@ -710,99 +1454,7 @@ internal bool Replicate_ExitEarly_A(bool asServer, bool replaying, bool allowSer //Checks pass. return false; } -#endif - - -#if PREDICTION_V2 - /// - /// Called internally when an input from localTick should be replayed. - /// - internal virtual void Replicate_Replay_Start(uint replayTick) { } - /// - /// Replays inputs from replicates. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected internal void Replicate_Replay(uint replayTick, ReplicateUserLogicDelegate del, List replicatesHistory, Channel channel) where T : IReplicateData - { - //Reconcile data was not received so cannot replay. - if (!ClientHasReconcileData) - { - /* If rbPauser exists then pause. This is done here - * instead of in the OnPreReconcile event for NetworkObject - * because each NB can have different replicate logic - * and have different states. Ideally everything would - * get its data together at the same time but things - * don't always work out that way. */ - _networkObjectCache.RigidbodyPauser?.Pause(); - return; - } - - if (_networkObjectCache.IsOwner) - Replicate_Replay_Authoritative(replayTick, del, replicatesHistory, channel); - else - Replicate_Replay_NonAuthoritative(replayTick, del, replicatesHistory, channel); - } - /// - /// Replays an input for authoritative entity. - /// - protected internal void Replicate_Replay_Authoritative(uint replayTick, ReplicateUserLogicDelegate del, List replicatesHistory, Channel channel) where T : IReplicateData - { - //Do not replay local inputs which havent been run yet. - long maxReplayTick = (_networkObjectCache.TimeManager.LocalTick - PredictionManager.QueuedInputs); - if (replayTick >= maxReplayTick) - { - _networkObjectCache.NetworkManager.LogWarning($"Authoritative replay received beyond expected values. Replay tick is {replayTick}, max value is {maxReplayTick}"); - return; - } - - ReplicateTickFinder.DataPlacementResult findResult; - int replicateIndex = ReplicateTickFinder.GetReplicateHistoryIndex(replayTick, replicatesHistory, out findResult); - - T data; - ReplicateState state; - //If found then the replicate has been received by the server. - if (findResult == ReplicateTickFinder.DataPlacementResult.Exact) - { - data = replicatesHistory[replicateIndex]; - state = ReplicateState.ReplayedCreated; - - del.Invoke(data, state, channel); - _networkObjectCache.LastUnorderedReplicateTick = data.GetTick(); - } - } - /// - /// Replays an input for non authoritative entity. - /// - protected internal void Replicate_Replay_NonAuthoritative(uint replayTick, ReplicateUserLogicDelegate del, List replicatesHistory, Channel channel) where T : IReplicateData - { - ReplicateTickFinder.DataPlacementResult findResult; - int replicateIndex = ReplicateTickFinder.GetReplicateHistoryIndex(replayTick, replicatesHistory, out findResult); - - T data; - ReplicateState state; - //If found then the replicate has been received by the server. - if (findResult == ReplicateTickFinder.DataPlacementResult.Exact) - { - data = replicatesHistory[replicateIndex]; - state = ReplicateState.ReplayedCreated; - } - //If not not found then it's being run as predicted. - else - { - data = default; - data.SetTick(replayTick); - if (replicatesHistory.Count == 0 || replicatesHistory[replicatesHistory.Count - 1].GetTick() < replayTick) - state = ReplicateState.Future; - else - state = ReplicateState.ReplayedCreated; - } - - del.Invoke(data, state, channel); - _networkObjectCache.LastUnorderedReplicateTick = data.GetTick(); - } -#endif -#if !PREDICTION_V2 /// /// Gets the next replicate in perform when server or non-owning client. /// @@ -856,86 +1508,7 @@ void ReplicateData(T data) } } } -#else - /// - /// Tick when replicates should begun to run. This is set and used when inputs are just received and need to queue to create a buffer. - /// - private uint _replicateStartTick = TimeManager.UNSET_TICK; - /// - /// Gets the next replicate in perform when server or non-owning client. - /// - /// - [MakePublic] - [APIExclude] - protected internal void Replicate_NonAuthoritative(ReplicateUserLogicDelegate del, BasicQueue replicatesQueue, List replicatesHistory, Channel channel) where T : IReplicateData - { - bool ownerlessAndServer = (!Owner.IsValid && IsServerStarted); - if (IsOwner || ownerlessAndServer) - return; - - TimeManager tm = _networkObjectCache.TimeManager; - uint localTick = tm.LocalTick; - int count = replicatesQueue.Count; - /* If count is 0 then data must be set default - * and as predicted. */ - if (count == 0) - { - T data = default(T); - data.SetTick(Owner.ReplicateTick.Value()); - ReplicateData(data, true); - } - //Not predicted, is user created. - else - { - //Nested if statement cleans up at compile time; makes this a little easier to read. - if (localTick >= _replicateStartTick) - { - ReplicateData(replicatesQueue.Dequeue(), false); - count--; - - PredictionManager pm = PredictionManager; - bool consumeExcess = (!pm.DropExcessiveReplicates || IsClientOnlyStarted); - //Allow 1 over expected before consuming. - int leaveInBuffer = (1 + _networkObjectCache.PredictionManager.QueuedInputs); - //Only consume if the queue count is over leaveInBuffer. - if (consumeExcess && count > leaveInBuffer) - { - byte maximumAllowedConsumes = 1; - int maximumPossibleConsumes = (count - leaveInBuffer); - int consumeAmount = Mathf.Min(maximumAllowedConsumes, maximumPossibleConsumes); - - for (int i = 0; i < consumeAmount; i++) - ReplicateData(replicatesQueue.Dequeue(), false); - } - - _remainingResends = pm.RedundancyCount; - } - //There is a count in queue but not enough ticks have passed. - else - { - T data = default(T); - data.SetTick(Owner.ReplicateTick.Value()); - ReplicateData(data, true); - } - } - - void ReplicateData(T data, bool predicted) - { - _lastReplicatedTick = data.GetTick(); - uint dataTick = data.GetTick(); - if (!predicted) - _networkObjectCache.SetReplicateTick(dataTick, true); - //Add to history. - replicatesHistory.Add(data); - //Invoke replicate method. - ReplicateState state = (predicted) ? ReplicateState.CurrentPredicted : ReplicateState.CurrentCreated; - del.Invoke(data, state, channel); - } - - } -#endif -#if !PREDICTION_V2 /// /// Returns if a replicates data changed and updates resends as well data tick. /// @@ -1019,162 +1592,16 @@ internal void Replicate_Owner(ReplicateUserLogicDelegate del, uint methodH if (_remainingResends > 0) { _remainingResends--; - Owner_SendReplicateRpc(methodHash, replicates, channel); - //Update last replicate tick. - SetLastReplicateTick(TimeManager.LocalTick); - } - } - - del.Invoke(data, false, channel, false); - } -#else - /// - /// Returns if a replicates data changed and updates resends as well data tick. - /// - /// True to enqueue data for replaying. - /// True if data has changed.. - [MakePublic] //internal - [APIExclude] - protected internal void Replicate_Authoritative(ReplicateUserLogicDelegate del, uint methodHash, BasicQueue replicatesQueue, List replicatesHistory, T data, Channel channel) where T : IReplicateData - { - bool ownerlessAndServer = (!Owner.IsValid && IsServerStarted); - if (!IsOwner && !ownerlessAndServer) - return; - - Func isDefaultDel = PublicPropertyComparer.IsDefault; - if (isDefaultDel == null) - { - NetworkManager.LogError($"ReplicateComparers not found for type {typeof(T).FullName}"); - return; - } - - PredictionManager pm = NetworkManager.PredictionManager; - ushort queuedInputs = pm.QueuedInputs; - uint localTick = TimeManager.LocalTick; - - data.SetTick(localTick); - replicatesQueue.Enqueue(data); - replicatesHistory.Add(data); - //Check to reset resends. - bool isDefault = isDefaultDel.Invoke(data); - bool mayChange = PredictedTransformMayChange(); - bool resetResends = (mayChange || !isDefault); - if (resetResends) - _remainingResends = Mathf.Max(pm.QueuedInputs, pm.RedundancyCount); - - bool sendData = (_remainingResends > 0); - if (sendData) - { - int replicatesHistoryCount = replicatesHistory.Count; - /* Remove the number of replicates which are over maximum. - * - * The clientHost object must keep redundancy count - * to send past inputs to others. - * - * Otherwise use maximum client replicates which will be a variable - * rate depending on tick rate. The value returned is several seconds - * worth of owner inputs to be able to replay during a reconcile. - * - * Server does not reconcile os it only needs enough for redundancy. - */ - int maxCount = (IsServerStarted) ? pm.RedundancyCount : pm.MaximumClientReplicates; - maxCount += queuedInputs; - //Number to remove which is over max count. - int removeCount = (replicatesHistoryCount - maxCount); - //If there are any to remove. - if (removeCount > 0) - { - //Dispose first. - for (int i = 0; i < removeCount; i++) - replicatesHistory[i].Dispose(); - - //Then remove range. - replicatesHistory.RemoveRange(0, removeCount); - } - - /* If not server then send to server. - * If server then send to clients. */ - bool toServer = !IsServerStarted; - SendReplicateRpc(toServer, methodHash, replicatesHistory, localTick + pm.QueuedInputs, channel); - _remainingResends--; - } - - uint adjustedLocalTick = (localTick - _networkObjectCache.PredictionManager.QueuedInputs); - if (adjustedLocalTick >= replicatesQueue.Peek().GetTick()) - { - T qData = replicatesQueue.Dequeue(); - //Update last replicate tick. - _networkObjectCache.SetReplicateTick(qData.GetTick(), true); - //Owner always replicates with new data. - del.Invoke(qData, ReplicateState.CurrentCreated, channel); - qData.Dispose(); - } - } -#endif - -#if PREDICTION_V2 - /// - /// Sends a Replicate to server or clients. - /// - private void SendReplicateRpc(bool toServer, uint hash, List replicatesHistory, uint queuedTick, Channel channel) where T : IReplicateData - { - if (!IsSpawnedWithWarning()) - return; - - int historyCount = replicatesHistory.Count; - //Nothing to send; should never be possible. - if (historyCount <= 0) - return; - - //Number of past inputs to send. - int pastInputs = Mathf.Min(PredictionManager.RedundancyCount, historyCount); - /* Where to start writing from. When passed - * into the writer values from this offset - * and forward will be written. - * Always write up to past inputs. */ - int offset = (historyCount - pastInputs); - - //Write history to methodWriter. - PooledWriter methodWriter = WriterPool.Retrieve(WriterPool.LENGTH_BRACKET); - /* If going to clients from the server then - * write the queueTick. */ - if (!toServer) - methodWriter.WriteTickUnpacked(queuedTick); - methodWriter.WriteReplicate(replicatesHistory, offset, TimeManager.LocalTick); - - _transportManagerCache.CheckSetReliableChannel(methodWriter.Length + MAXIMUM_RPC_HEADER_SIZE, ref channel); - PooledWriter writer = CreateRpc(hash, methodWriter, PacketId.Replicate, channel); - - /* toServer will never be true if clientHost. - * When clientHost and here replicates will - * always just send to clients, while - * excluding clientHost. */ - if (toServer) - { - NetworkManager.TransportManager.SendToServer((byte)channel, writer.GetArraySegment(), false); - } - else - { - //Exclude owner and if clientHost, also localClient. - _networkConnectionCache.Clear(); - _networkConnectionCache.Add(Owner); - if (IsClientStarted) - _networkConnectionCache.Add(ClientManager.Connection); - - NetworkManager.TransportManager.SendToClients((byte)channel, writer.GetArraySegment(), Observers, _networkConnectionCache, false); + Owner_SendReplicateRpc(methodHash, replicates, channel); + //Update last replicate tick. + SetLastReplicateTick(TimeManager.LocalTick); + } } - /* If sending as reliable there is no reason - * to perform resends, so clear remaining resends. */ - if (channel == Channel.Reliable) - _remainingResends = 0; - - methodWriter.StoreLength(); - writer.StoreLength(); + del.Invoke(data, false, channel, false); } -#endif -#if !PREDICTION_V2 + /// /// Reads a replicate the client. /// @@ -1200,129 +1627,7 @@ internal void Replicate_Reader(PooledReader reader, NetworkConnection sender, Replicate_HandleReceivedReplicate(receivedReplicatesCount, arrBuffer, replicates, channel); } -#else - /// - /// Reads a replicate the client. - /// - /// Data from the reader which only applies to the replicate. - [MakePublic] - internal void Replicate_Reader(uint hash, PooledReader reader, NetworkConnection sender, ref T[] arrBuffer, BasicQueue replicatesQueue, List replicatesHistory, Channel channel) where T : IReplicateData - { - /* This will never be received on owner, except in the condition - * the server is the owner and also a client. In such condition - * the method is exited after data is parsed. */ - PredictionManager pm = _networkObjectCache.PredictionManager; - TimeManager tm = _networkObjectCache.TimeManager; - //Reader position before anything is read. - int startingQueueCount = replicatesQueue.Count; - bool fromServer = (reader.Source == Reader.DataSource.Server); - - uint tick; - /* If coming from the server then read the tick. Server sends tick - * if authority or if relaying from another client. The tick which - * arrives will be the tick the replicate will run on the server. */ - if (fromServer) - tick = reader.ReadTickUnpacked(); - /* When coming from a client it will always be owner. - * Client sends out replicates soon as they are run. - * It's safe to use the LastRemoteTick from the client - * in addition to QueuedInputs. */ - else - tick = (tm.LastPacketTick.LastRemoteTick); - - int receivedReplicatesCount = reader.ReadReplicate(ref arrBuffer, tick); - - //If received on clientHost simply ignore after parsing data. - if (fromServer && IsHostStarted) - return; - - /* Replicate rpc readers relay to this method and - * do not have an owner check in the generated code. - * Only server needs to check for owners. Clients - * should accept the servers data regardless. - * - * If coming from a client and that client is not owner then exit. */ - if (!fromServer && !OwnerMatches(sender)) - return; - //Early exit if old data. - if (TimeManager.LastPacketTick.LastRemoteTick < _lastReplicateReadRemoteTick) - return; - _lastReplicateReadRemoteTick = TimeManager.LastPacketTick.LastRemoteTick; - - //If from a client that is not clientHost do some safety checks. - if (!fromServer && !Owner.IsLocalClient) - { - if (receivedReplicatesCount > pm.RedundancyCount) - { - sender.Kick(reader, KickReason.ExploitAttempt, LoggingType.Common, $"Connection {sender.ToString()} sent too many past replicates. Connection will be kicked immediately."); - return; - } - } - - Replicate_EnqueueReceivedReplicate(startingQueueCount, receivedReplicatesCount, arrBuffer, replicatesQueue, replicatesHistory, channel); - Replicate_SendQueuedToSpectators(hash, replicatesQueue, startingQueueCount, channel); - } -#endif - -#if PREDICTION_V2 - - - /// - /// Sends data from a reader which only contains the replicate packet. - /// - /// Tick of the last replicate entry. - [MakePublic] - internal void Replicate_SendQueuedToSpectators(uint hash, BasicQueue replicatesQueue, int startingQueueCount, Channel channel) where T : IReplicateData - { - if (!IsServerStarted) - return; - int queueCount = replicatesQueue.Count; - //Limit history count to max of queued amount, or queued inputs, whichever is lesser. - int historyCount = (int)Mathf.Min(_networkObjectCache.PredictionManager.RedundancyCount, queueCount); - //None to send. - if (historyCount == 0) - return; - - //If the only observer is the owner then there is no need to write. - int observersCount = Observers.Count; - //Quick exit for no observers other than owner. - if (observersCount == 0 || (Owner.IsValid && observersCount == 1)) - return; - - PooledWriter methodWriter = WriterPool.Retrieve(WriterPool.LENGTH_BRACKET); - /* Write when the last entry will run. - * - * Typically the last entry will run on localTick + (queueCount - 1). - * 1 is subtracted from queueCount because in most cases the first entry - * is going to run same tick. - * An exception is when the startingQueueCount is 0, then there is going to be a delay - * based on predictionManager.QueuedInput. */ - uint runTickOflastEntry = _networkObjectCache.TimeManager.LocalTick + ((uint)queueCount - 1); - //If the starting count is 0 then add on the required delay. - if (TimeManager.LocalTick < _replicateStartTick) - runTickOflastEntry += (_replicateStartTick - TimeManager.LocalTick); - //Write the run tick now. - methodWriter.WriteTickUnpacked(runTickOflastEntry); - //Write the replicates. - methodWriter.WriteReplicate(replicatesQueue, historyCount, runTickOflastEntry); - - PooledWriter writer = CreateRpc(hash, methodWriter, PacketId.Replicate, channel); - - //Exclude owner and if clientHost, also localClient. - _networkConnectionCache.Clear(); - if (Owner.IsValid) - _networkConnectionCache.Add(Owner); - if (IsClientStarted && !Owner.IsLocalClient) - _networkConnectionCache.Add(ClientManager.Connection); - NetworkManager.TransportManager.SendToClients((byte)channel, writer.GetArraySegment(), Observers, _networkConnectionCache, false); - - methodWriter.StoreLength(); - writer.StoreLength(); - } -#endif - -#if !PREDICTION_V2 private void Replicate_HandleReceivedReplicate(int receivedReplicatesCount, T[] arrBuffer, BasicQueue replicates, Channel channel) where T : IReplicateData { PredictionManager pm = PredictionManager; @@ -1346,90 +1651,7 @@ private void Replicate_HandleReceivedReplicate(int receivedReplicatesCount, T } } } -#else - /// - /// Handles a received replicate packet. - /// - private void Replicate_EnqueueReceivedReplicate(int startingQueueCount, int receivedReplicatesCount, T[] arrBuffer, BasicQueue replicatesQueue, List replicatesHistory, Channel channel) where T : IReplicateData - { - /* Owner never gets this for their own object so - * this can be processed under the assumption data is only - * handled on unowned objects. */ - PredictionManager pm = PredictionManager; - //Maximum number of replicates allowed to be queued at once. - int maximmumReplicates = (IsServerStarted) ? pm.GetMaximumServerReplicates() : pm.MaximumClientReplicates; - for (int i = 0; i < receivedReplicatesCount; i++) - { - uint tick = arrBuffer[i].GetTick(); - //Skip if old data. - if (tick <= _lastReadReplicateTick) - continue; - _lastReadReplicateTick = tick; - - T entry = arrBuffer[i]; - //Cannot queue anymore, discard oldest. - if (replicatesQueue.Count >= maximmumReplicates) - { - T data = replicatesQueue.Dequeue(); - data.Dispose(); - } - - /* Check if replicate is already in history. - * This can occur when the replicate method has a predicted - * state for the tick, but a user created replicate comes - * through afterwards. - * - * Only perform this check if not the server, since server - * does not reconcile it will never use replicatesHistory. - * The server also does not predict replicates in the same way - * a client does. When an owner sends a replicate to the server - * the server only uses the owner tick to check if it's an old replicate. - * But when running the replicate, the server applies it's local tick and - * sends that to spectators. This ensures that replicates received by a client - * with an unstable connection are not skipped. */ - //Add automatically if server. - if (_networkObjectCache.IsServerStarted) - { - replicatesQueue.Enqueue(entry); - } - //Run checks to replace data if not server. - else - { - /* If tick is beyond the last predicted it can be added to the queue. - * This will prevent user created from running on same ticks which were - * previously State.Predicted. Any user created datas will replace ReplayPredicted. */ - if (tick > _lastReplicatedTick) - { - replicatesQueue.Enqueue(entry); - } - else - { - /* See if replicate tick is in history. Keep in mind - * this is the localTick from the server, not the localTick of - * the client which is having their replicate relayed. */ - ReplicateTickFinder.DataPlacementResult findResult; - int index = ReplicateTickFinder.GetReplicateHistoryIndex(tick, replicatesHistory, out findResult); - - //Only replace, do not try to insert anything. - if (findResult == ReplicateTickFinder.DataPlacementResult.Exact) - { - T prevEntry = replicatesHistory[index]; - prevEntry.Dispose(); - replicatesHistory[index] = entry; - } - } - } - - } - - //If entries are just being added then start the delay. - if (startingQueueCount == 0 && replicatesQueue.Count > 0) - _replicateStartTick = (TimeManager.LocalTick + PredictionManager.QueuedInputs); - } - -#endif -#if !PREDICTION_V2 /// /// Checks conditions for a reconcile. /// @@ -1470,9 +1692,7 @@ internal bool Reconcile_ExitEarly_A(bool asServer, out Channel channel) //Checks pass. return false; } -#endif -#if !PREDICTION_V2 /// /// Updates lastReconcileTick as though running asServer. /// @@ -1497,25 +1717,7 @@ internal void Reconcile_Server(uint methodHash, T data, Channel channel) wher PredictionManager.InvokeServerReconcile(this, false); } -#else - /// - /// Sends a reconcile to clients. - /// - public void Reconcile_Server(uint methodHash, T data, Channel channel) where T : IReconcileData - { - if (!IsServerStarted) - return; - - //Tick does not need to be set for reconciles since they come in as state updates, which have the tick included globally. - //Use reliable during development. - channel = Channel.Reliable; - PredictionManager.InvokeServerReconcile(this, true); - Server_SendReconcileRpc(methodHash, data, channel); - PredictionManager.InvokeServerReconcile(this, false); - } -#endif -#if !PREDICTION_V2 /// /// Processes a reconcile for client. /// @@ -1591,73 +1793,7 @@ internal void Reconcile_Client(ReconcileUserLogicDelegate reconcileDel //Reconcile ended. PredictionManager.InvokeOnReconcile(this, false); } -#else - /// - /// This is called when the networkbehaviour should perform a reconcile. - /// Codegen overrides this calling Reconcile_Client with the needed data. - /// - internal virtual void Reconcile_Client_Start() { } - /// - /// Processes a reconcile for client. - /// - [APIExclude] - [MakePublic] - protected internal void Reconcile_Client(ReconcileUserLogicDelegate reconcileDel, List replicatesHistory, T data) where T : IReconcileData where T2 : IReplicateData - { - if (!ClientHasReconcileData) - return; - - IsReconciling = true; - - if (replicatesHistory.Count > 0) - { - /* Remove replicates up to reconcile. Since the reconcile - * is the state after a replicate for it's tick we no longer - * need any replicates prior. */ - ReplicateTickFinder.DataPlacementResult findResult; - int index = ReplicateTickFinder.GetReplicateHistoryIndex(data.GetTick(), replicatesHistory, out findResult); - //int index = ReplicateTickFinder.GetReplicateHistoryIndex(PredictionManager.StateServerTick, replicatesHistory, out findResult); - //Increase by 1 to remove the number up to and including index. - index++; - //When found exactly remove up to and including index. - if (findResult == ReplicateTickFinder.DataPlacementResult.Exact) - DisposeOfHistories(index); - /* If can be inserted into the middle then can remove up to the insert point. - * - * EG: if values were 5, 8, 10, 12 and tick was 9 the insert of 2 would be returned, - * to insert right before 10. In result 2(index of 1 + 1) entries would be removed leaving 10, 12, which - * is correct since these are ticks after the reconcile. */ - else if (findResult == ReplicateTickFinder.DataPlacementResult.InsertMiddle) - DisposeOfHistories(index); - //Reconcile is beyond history. Clear out history. - else if (findResult == ReplicateTickFinder.DataPlacementResult.InsertEnd) - DisposeOfHistories(replicatesHistory.Count); - - //Disposes of a number of replicatesHistory and removes them from the collection. - void DisposeOfHistories(int count) - { - for (int i = 0; i < count; i++) - replicatesHistory[i].Dispose(); - replicatesHistory.RemoveRange(0, count); - } - - /* InsertBeginning does not need to be handled because that means the reconcile - * tick is already lower than any of the replicate values. */ - } - //Call reconcile user logic. - reconcileDel?.Invoke(data, Channel.Reliable); - } -#endif - -#if PREDICTION_V2 - internal void Reconcile_Client_End() - { - ClientHasReconcileData = false; - IsReconciling = false; - } -#endif -#if !PREDICTION_V2 /// /// Reads a reconcile the client. /// @@ -1678,25 +1814,9 @@ public void Reconcile_Reader(PooledReader reader, ref T data, Channel channel ClientHasReconcileData = true; _lastReceivedReconcileTick = tick; } -#else - /// - /// Reads a reconcile for the client. - /// - public void Reconcile_Reader(PooledReader reader, ref T data, Channel channel) where T : IReconcileData - { - T newData = reader.Read(); - uint tick = (IsOwner) ? PredictionManager.ClientStateTick : PredictionManager.ServerStateTick; - //Do not process if an old state. - if (tick < _lastReadReconcileTick) - return; - data = newData; - data.SetTick(tick); + } +} - ClientHasReconcileData = true; - _lastReadReconcileTick = tick; - } -#endif - } -} \ No newline at end of file +#endif \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Prediction.cs.meta b/Assets/FishNet/Runtime/Object/NetworkBehaviour.Prediction.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.Prediction.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.Prediction.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.QOL.cs b/Assets/FishNet/Runtime/Object/NetworkBehaviour.QOL.cs similarity index 92% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.QOL.cs rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.QOL.cs index 89ba8be..b1b70d2 100644 --- a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.QOL.cs +++ b/Assets/FishNet/Runtime/Object/NetworkBehaviour.QOL.cs @@ -21,6 +21,7 @@ public abstract partial class NetworkBehaviour : MonoBehaviour { #region Public. #region Obsoletes + //Remove on v5 [Obsolete("Use IsClientOnlyInitialized. Note the difference between IsClientOnlyInitialized and IsClientOnlyStarted.")] public bool IsClientOnly => IsClientOnlyInitialized; [Obsolete("Use IsServerOnlyInitialized. Note the difference between IsServerOnlyInitialized and IsServerOnlyStarted.")] @@ -127,6 +128,12 @@ public abstract partial class NetworkBehaviour : MonoBehaviour /// To check if server or client has been initialized on this object use IsXYZInitialized. /// public bool IsNetworked => _networkObjectCache.IsNetworked; +#if !PREDICTION_1 + /// + /// True if a reconcile is occuring on the PredictionManager. Note the difference between this and IsBehaviourReconciling. + /// + public bool IsManagerReconciling => _networkObjectCache.IsManagerReconciling; +#endif /// /// Observers for this NetworkBehaviour. /// @@ -140,6 +147,16 @@ public abstract partial class NetworkBehaviour : MonoBehaviour [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "Start", "")] public bool IsOwner => _networkObjectCache.IsOwner; /// + /// True if IsOwner, or if IsServerInitialized with no Owner. + /// + [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "OnStartServer", "")] + [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "OnStartNetwork", " Use (base.Owner.IsLocalClient || (base.IsServerInitialized && !Owner.Isvalid) instead.")] + [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "Awake", "")] + [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "Start", "")] + public bool HasAuthority => (_networkObjectCache.IsOwner || (_networkObjectCache.IsServerInitialized && !_networkObjectCache.Owner.IsValid)); + [Obsolete("Use HasAuthority")] + public bool IsOwnerOrServer => HasAuthority; + /// /// Owner of this object. /// public NetworkConnection Owner diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.QOL.cs.meta b/Assets/FishNet/Runtime/Object/NetworkBehaviour.QOL.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.QOL.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.QOL.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.RPCLinks.cs b/Assets/FishNet/Runtime/Object/NetworkBehaviour.RPCLinks.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.RPCLinks.cs rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.RPCLinks.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.RPCLinks.cs.meta b/Assets/FishNet/Runtime/Object/NetworkBehaviour.RPCLinks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.RPCLinks.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.RPCLinks.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.RPCs.cs b/Assets/FishNet/Runtime/Object/NetworkBehaviour.RPCs.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.RPCs.cs rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.RPCs.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.RPCs.cs.meta b/Assets/FishNet/Runtime/Object/NetworkBehaviour.RPCs.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.RPCs.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.RPCs.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.SyncTypes.cs b/Assets/FishNet/Runtime/Object/NetworkBehaviour.SyncTypes.cs similarity index 97% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.SyncTypes.cs rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.SyncTypes.cs index 9febaaf..5806a37 100644 --- a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.SyncTypes.cs +++ b/Assets/FishNet/Runtime/Object/NetworkBehaviour.SyncTypes.cs @@ -324,9 +324,8 @@ internal bool WriteDirtySyncTypes(bool ignoreInterval = false, bool forceReliabl } } - /// - /// Resets all SyncTypes for this NetworkBehaviour. + /// Resets all SyncTypes for this NetworkBehaviour for server and client. /// internal void SyncTypes_ResetState() { @@ -335,6 +334,17 @@ internal void SyncTypes_ResetState() SyncTypeDirty = false; } + /// + /// Resets all SyncTypes for this NetworkBehaviour for server or client. + /// + internal void SyncTypes_ResetState(bool asServer) + { + foreach (SyncBase item in _syncTypes.Values) + item.ResetState(asServer); + + if (asServer) + SyncTypeDirty = false; + } /// /// Resets all SyncVar fields for the class to the values within their SyncVar class. diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.SyncTypes.cs.meta b/Assets/FishNet/Runtime/Object/NetworkBehaviour.SyncTypes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.SyncTypes.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.SyncTypes.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.cs b/Assets/FishNet/Runtime/Object/NetworkBehaviour.cs similarity index 97% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.cs rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.cs index 272b3bb..26c2a94 100644 --- a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.cs +++ b/Assets/FishNet/Runtime/Object/NetworkBehaviour.cs @@ -78,7 +78,7 @@ public override string ToString() -#if !PREDICTION_V2 +#if PREDICTION_1 /// /// Preinitializes this script for the network. /// @@ -123,7 +123,7 @@ internal void Preinitialize_Internal(NetworkObject nob, bool asServer) #endif internal void Deinitialize(bool asServer) { - + SyncTypes_ResetState(asServer); } /// @@ -176,10 +176,10 @@ protected virtual void OnValidate() /// /// Resets this NetworkBehaviour so that it may be added to an object pool. /// - public virtual void ResetState() + public virtual void ResetState(bool asServer) { - SyncTypes_ResetState(); -#if PREDICTION_V2 + SyncTypes_ResetState(asServer); +#if !PREDICTION_1 ResetPredictionTicks(); #endif ClearReplicateCache(); diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.cs.meta b/Assets/FishNet/Runtime/Object/NetworkBehaviour.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkBehaviour.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkBehaviour.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.Broadcast.cs b/Assets/FishNet/Runtime/Object/NetworkObject.Broadcast.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.Broadcast.cs rename to Assets/FishNet/Runtime/Object/NetworkObject.Broadcast.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.Broadcast.cs.meta b/Assets/FishNet/Runtime/Object/NetworkObject.Broadcast.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.Broadcast.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkObject.Broadcast.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.Callbacks.cs b/Assets/FishNet/Runtime/Object/NetworkObject.Callbacks.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.Callbacks.cs rename to Assets/FishNet/Runtime/Object/NetworkObject.Callbacks.cs index acfbc30..a036b43 100644 --- a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.Callbacks.cs +++ b/Assets/FishNet/Runtime/Object/NetworkObject.Callbacks.cs @@ -140,7 +140,7 @@ private void InvokeOwnershipChange(NetworkConnection prevOwner, bool asServer) { if (asServer) { -#if PREDICTION_V2 +#if !PREDICTION_1 ResetReplicateTick(); #endif for (int i = 0; i < NetworkBehaviours.Length; i++) diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.Callbacks.cs.meta b/Assets/FishNet/Runtime/Object/NetworkObject.Callbacks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.Callbacks.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkObject.Callbacks.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.Observers.cs b/Assets/FishNet/Runtime/Object/NetworkObject.Observers.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.Observers.cs rename to Assets/FishNet/Runtime/Object/NetworkObject.Observers.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.Observers.cs.meta b/Assets/FishNet/Runtime/Object/NetworkObject.Observers.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.Observers.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkObject.Observers.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.Prediction.cs b/Assets/FishNet/Runtime/Object/NetworkObject.Prediction.cs similarity index 57% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.Prediction.cs rename to Assets/FishNet/Runtime/Object/NetworkObject.Prediction.cs index edf2219..44a5a3c 100644 --- a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.Prediction.cs +++ b/Assets/FishNet/Runtime/Object/NetworkObject.Prediction.cs @@ -1,17 +1,19 @@ using FishNet.Component.Prediction; +using FishNet.Component.Transforming; using FishNet.Managing; using FishNet.Managing.Timing; using FishNet.Object.Prediction; +using GameKit.Dependencies.Utilities; using System.Collections.Generic; using UnityEngine; namespace FishNet.Object { -#if PREDICTION_V2 +#if !PREDICTION_1 public partial class NetworkObject : MonoBehaviour { #region Types. -#if PREDICTION_V2 +#if !PREDICTION_1 /// /// Type of prediction movement being used. /// @@ -26,6 +28,12 @@ internal enum PredictionType : byte #endregion #region Public. +#if !PREDICTION_1 + /// + /// True if a reconcile is occuring on any NetworkBehaviour that is on or nested of this NetworkObject. Runtime NetworkBehaviours are not included, such as if you child a NetworkObject to another at runtime. + /// + public bool IsObjectReconciling { get; internal set; } +#endif /// /// Last tick this object replicated. /// @@ -38,13 +46,14 @@ internal enum PredictionType : byte #region Internal. /// - /// Pauses rigidbodies for prediction. + /// Pauses and unpauses rigidbodies when they do not have data to reconcile to. /// - public RigidbodyPauser RigidbodyPauser { get; private set; } + public RigidbodyPauser RigidbodyPauser => _rigidbodyPauser; + private RigidbodyPauser _rigidbodyPauser; #endregion #region Serialized. -#if PREDICTION_V2 +#if !PREDICTION_1 /// /// True if this object uses prediciton methods. /// @@ -65,12 +74,33 @@ internal enum PredictionType : byte [SerializeField] private Transform _graphicalObject; /// + /// Gets the current graphical object for prediction. + /// + /// + public Transform GetGraphicalObject() => _graphicalObject; + /// + /// Sets a new graphical object for prediction. + /// + /// + public void SetGraphicalObject(Transform t) + { + _graphicalObject = t; + InitializeTickSmoother(); + } + /// /// True to forward replicate and reconcile states to all clients. This is ideal with games where you want all clients and server to run the same inputs. False to only use prediction on the owner, and synchronize to spectators using other means such as a NetworkTransform. /// + public bool EnableStateForwarding => (_enablePrediction && _enableStateForwarding); [Tooltip("True to forward replicate and reconcile states to all clients. This is ideal with games where you want all clients and server to run the same inputs. False to only use prediction on the owner, and synchronize to spectators using other means such as a NetworkTransform.")] [SerializeField] private bool _enableStateForwarding = true; /// + /// NetworkTransform to configure for prediction. Specifying this is optional. + /// + [Tooltip("NetworkTransform to configure for prediction. Specifying this is optional.")] + [SerializeField] + private NetworkTransform _networkTransform; + /// /// How many ticks to interpolate graphics on objects owned by the client. Typically low as 1 can be used to smooth over the frames between ticks. /// [Tooltip("How many ticks to interpolate graphics on objects owned by the client. Typically low as 1 can be used to smooth over the frames between ticks.")] @@ -97,19 +127,11 @@ internal enum PredictionType : byte /// /// Graphical smoother to use when using set for owner. /// - private PredictionTickSmoother _tickSmoother; + private AdaptiveLocalTransformTickSmoother _tickSmoother; /// /// NetworkBehaviours which use prediction. /// private List _predictionBehaviours = new List(); - ///// - ///// Tick when CollionStayed last called. This only has value if using prediction. - ///// - //private uint _collisionStayedTick; - ///// - ///// Local client objects this object is currently colliding with. - ///// - //private HashSet _localClientCollidedObjects = new HashSet(); #endregion private void Prediction_Update() @@ -120,21 +142,14 @@ private void Prediction_Update() _tickSmoother?.Update(); } - private void TimeManager_OnPreTick() - { - _tickSmoother?.OnPreTick(); - } - private void TimeManager_OnPostTick() - { - _tickSmoother?.OnPostTick(); - //TrySetCollisionExited(); - } - private void Prediction_Preinitialize(NetworkManager manager, bool asServer) { if (!_enablePrediction) return; + if (!_enableStateForwarding && _networkTransform != null) + _networkTransform.ConfigureForPrediction(_predictionType); + ReplicateTick.Initialize(manager.TimeManager); InitializeSmoothers(); @@ -142,13 +157,7 @@ private void Prediction_Preinitialize(NetworkManager manager, bool asServer) return; if (_predictionBehaviours.Count > 0) - { - manager.PredictionManager.OnPreReconcile += PredictionManager_OnPreReconcile; - manager.PredictionManager.OnReplicateReplay += PredictionManager_OnReplicateReplay; - manager.PredictionManager.OnPostReconcile += PredictionManager_OnPostReconcile; - manager.TimeManager.OnPreTick += TimeManager_OnPreTick; - manager.TimeManager.OnPostTick += TimeManager_OnPostTick; - } + ChangePredictionSubscriptions(true, manager); } private void Prediction_Deinitialize(bool asServer) @@ -160,13 +169,37 @@ private void Prediction_Deinitialize(bool asServer) /* Only the client needs to unsubscribe from these but * asServer may not invoke as false if the client is suddenly * dropping their connection. */ - if (_predictionBehaviours.Count > 0 && NetworkManager != null) + if (_predictionBehaviours.Count > 0) + ChangePredictionSubscriptions(false, NetworkManager); + } + + /// + /// Changes subscriptions to use callbacks for prediction. + /// + private void ChangePredictionSubscriptions(bool subscribe, NetworkManager manager) + { + if (manager == null) + return; + + if (subscribe) + { + manager.PredictionManager.OnPreReconcile += PredictionManager_OnPreReconcile; + manager.PredictionManager.OnReconcile += PredictionManager_OnReconcile; + manager.PredictionManager.OnReplicateReplay += PredictionManager_OnReplicateReplay; + manager.PredictionManager.OnPostReplicateReplay += PredictionManager_OnPostReplicateReplay; + manager.PredictionManager.OnPostReconcile += PredictionManager_OnPostReconcile; + manager.TimeManager.OnPreTick += TimeManager_OnPreTick; + manager.TimeManager.OnPostTick += TimeManager_OnPostTick; + } + else { - NetworkManager.PredictionManager.OnPreReconcile -= PredictionManager_OnPreReconcile; - NetworkManager.PredictionManager.OnReplicateReplay -= PredictionManager_OnReplicateReplay; - NetworkManager.PredictionManager.OnPostReconcile -= PredictionManager_OnPostReconcile; - NetworkManager.TimeManager.OnPreTick -= TimeManager_OnPreTick; - NetworkManager.TimeManager.OnPostTick -= TimeManager_OnPostTick; + manager.PredictionManager.OnPreReconcile -= PredictionManager_OnPreReconcile; + manager.PredictionManager.OnReconcile -= PredictionManager_OnReconcile; + manager.PredictionManager.OnReplicateReplay -= PredictionManager_OnReplicateReplay; + manager.PredictionManager.OnPostReplicateReplay -= PredictionManager_OnPostReplicateReplay; + manager.PredictionManager.OnPostReconcile -= PredictionManager_OnPostReconcile; + manager.TimeManager.OnPreTick -= TimeManager_OnPreTick; + manager.TimeManager.OnPostTick -= TimeManager_OnPostTick; } } @@ -180,35 +213,79 @@ private void InitializeSmoothers() bool usesRb2d = (_predictionType == PredictionType.Rigidbody2D); if (usesRb || usesRb2d) { - RigidbodyPauser = new RigidbodyPauser(); + _rigidbodyPauser = ResettableObjectCaches.Retrieve(); RigidbodyType rbType = (usesRb) ? RigidbodyType.Rigidbody : RigidbodyType.Rigidbody2D; - RigidbodyPauser.UpdateRigidbodies(transform, rbType, true); + _rigidbodyPauser.UpdateRigidbodies(transform, rbType, true); } if (_graphicalObject == null) { - Debug.Log($"GraphicalObject is null on {this.ToString()}. This may be intentional, and acceptable, if you are smoothing between ticks yourself. Otherwise consider assigning the GraphicalObject field."); + NetworkManagerExtensions.Log($"GraphicalObject is null on {gameObject.name}. This may be intentional, and acceptable, if you are smoothing between ticks yourself. Otherwise consider assigning the GraphicalObject field."); } else { - _tickSmoother = new PredictionTickSmoother(); - float teleportT = (_enableTeleport) ? _teleportThreshold : MoveRatesCls.UNSET_VALUE; - _tickSmoother.InitializeOnce(_graphicalObject, teleportT, this, _ownerInterpolation); + if (_tickSmoother == null) + _tickSmoother = ResettableObjectCaches.Retrieve(); + InitializeTickSmoother(); } } + /// + /// Initializes the tick smoother. + /// + private void InitializeTickSmoother() + { + if (_tickSmoother == null) + return; + _tickSmoother.ResetState(); + float teleportT = (_enableTeleport) ? _teleportThreshold : MoveRatesCls.UNSET_VALUE; + _tickSmoother.InitializeOnce(this, _graphicalObject, teleportT, (float)TimeManager.TickDelta, _ownerInterpolation); + } /// /// Initializes tick smoothing. /// private void DeinitializeSmoothers() { - _tickSmoother?.Deinitialize(); + if (_tickSmoother != null) + { + ResettableObjectCaches.StoreAndDefault(ref _tickSmoother); + ResettableObjectCaches.StoreAndDefault(ref _rigidbodyPauser); + } } - private void PredictionManager_OnPreReconcile(uint clientReconcileTick, uint serverReconcileTick) + private void TimeManager_OnPreTick() { - for (int i = 0; i < _predictionBehaviours.Count; i++) - _predictionBehaviours[i].Reconcile_Client_Start(); + _tickSmoother?.OnPreTick(); + } + + private void PredictionManager_OnPostReplicateReplay(uint clientTick, uint serverTick) + { + _tickSmoother?.OnPostReplay(clientTick); + } + + private void TimeManager_OnPostTick() + { + _tickSmoother?.OnPostTick(NetworkManager.TimeManager.LocalTick); + } + + private void PredictionManager_OnPreReconcile(uint clientTick, uint serverTick) + { + _tickSmoother?.OnPreReconcile(); + } + + + private void PredictionManager_OnReconcile(uint clientReconcileTick, uint serverReconcileTick) + { + if (!IsObjectReconciling) + { + if (_rigidbodyPauser != null) + _rigidbodyPauser.Pause(); + } + else + { + for (int i = 0; i < _predictionBehaviours.Count; i++) + _predictionBehaviours[i].Reconcile_Client_Start(); + } } private void PredictionManager_OnPostReconcile(uint clientReconcileTick, uint serverReconcileTick) @@ -220,7 +297,9 @@ private void PredictionManager_OnPostReconcile(uint clientReconcileTick, uint se * than per NB, where the pausing occurs, because once here * the entire object is out of the replay cycle so there's * no reason to try and unpause per NB. */ - RigidbodyPauser?.Unpause(); + if (_rigidbodyPauser != null) + _rigidbodyPauser.Unpause(); + IsObjectReconciling = false; } @@ -231,124 +310,6 @@ private void PredictionManager_OnReplicateReplay(uint clientTick, uint serverTic _predictionBehaviours[i].Replicate_Replay_Start(replayTick + 1); } - ///// - ///// Returns if this object is colliding with any local client objects. - ///// - ///// - //internal bool CollidingWithLocalClient() - //{ - // /* If it's been more than 1 tick since collision stayed - // * then do not consider as collided. */ - // return (TimeManager.LocalTick - _collisionStayedTick) <= 1; - //} - - ///// - ///// Called when colliding with another object. - ///// - //private void OnCollisionEnter(Collision collision) - //{ - // if (!IsClientInitialized) - // return; - // if (_predictionType != PredictionType.Rigidbody) - // return; - - // GameObject go = collision.gameObject; - // if (CollisionEnteredLocalClientObject(go)) - // CollisionEntered(go); - //} - - ///// - ///// Called when collision has entered a local clients object. - ///// - //private void CollisionEntered(GameObject go) - //{ - // if (_graphicalObject == null) - // return; - - // _collisionStayedTick = TimeManager.LocalTick; - // _localClientCollidedObjects.Add(go); - //} - - ///// - ///// Called when colliding with another object. - ///// - //private void OnCollisionEnter2D(Collision2D collision) - //{ - // if (_graphicalObject == null) - // return; - // if (!IsClientInitialized) - // return; - // if (_predictionType != PredictionType.Rigidbody2D) - // return; - - // GameObject go = collision.gameObject; - // if (CollisionEnteredLocalClientObject(go)) - // CollisionEntered(go); - //} - - - ///// - ///// Called when staying in collision with another object. - ///// - //private void OnCollisionStay(Collision collision) - //{ - // if (!IsClientInitialized) - // return; - // if (_predictionType != PredictionType.Rigidbody) - // return; - - // if (_localClientCollidedObjects.Contains(collision.gameObject)) - // _collisionStayedTick = TimeManager.LocalTick; - //} - ///// - ///// Called when staying in collision with another object. - ///// - //private void OnCollisionStay2D(Collision2D collision) - //{ - // if (!IsClientInitialized) - // return; - // if (_predictionType != PredictionType.Rigidbody2D) - // return; - - // if (_localClientCollidedObjects.Contains(collision.gameObject)) - // _collisionStayedTick = TimeManager.LocalTick; - //} - - ///// - ///// Called when a collision occurs and the smoothing type must perform operations. - ///// - //private bool CollisionEnteredLocalClientObject(GameObject go) - //{ - // if (go.TryGetComponent(out NetworkObject nob)) - // return nob.Owner.IsLocalClient; - - // //Fall through. - // return false; - //} - - - ///// - ///// Called when collision has exited a local clients object. - ///// - //private void TrySetCollisionExited() - //{ - // /* If this object is no longer - // * colliding with local client objects - // * then unset collision. - // * This is done here instead of using - // * OnCollisionExit because often collisionexit - // * will be missed due to ignored ticks. - // * While not ignoring ticks is always an option - // * its not ideal because ignoring ticks helps - // * prevent over predicting. */ - // TimeManager tm = TimeManager; - // if (tm == null || (_collisionStayedTick != 0 && (tm.LocalTick != _collisionStayedTick))) - // { - // _localClientCollidedObjects.Clear(); - // _collisionStayedTick = 0; - // } - //} - /// /// Registers a NetworkBehaviour that uses prediction with the NetworkObject. /// This method should only be called once throughout the entire lifetime of this object. diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.Prediction.cs.meta b/Assets/FishNet/Runtime/Object/NetworkObject.Prediction.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.Prediction.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkObject.Prediction.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.QOL.cs b/Assets/FishNet/Runtime/Object/NetworkObject.QOL.cs similarity index 92% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.QOL.cs rename to Assets/FishNet/Runtime/Object/NetworkObject.QOL.cs index b40b06f..85cb685 100644 --- a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.QOL.cs +++ b/Assets/FishNet/Runtime/Object/NetworkObject.QOL.cs @@ -1,4 +1,5 @@ -using FishNet.Component.ColliderRollback; +using FishNet.CodeAnalysis.Annotations; +using FishNet.Component.ColliderRollback; using FishNet.Connection; using FishNet.Managing; using FishNet.Managing.Client; @@ -87,10 +88,20 @@ public partial class NetworkObject : MonoBehaviour /// True if client nor server are started. /// public bool IsOffline => (!IsClientStarted && !IsServerStarted); +#if !PREDICTION_1 + /// + /// True if a reconcile is occuring on the PredictionManager. Note the difference between this and IsBehaviourReconciling. + /// + public bool IsManagerReconciling => PredictionManager.IsReconciling; +#endif /// /// True if the local client is the owner of this object. /// This will only return true if IsClientInitialized is also true. You may check ownership status regardless of client initialized state by using Owner.IsLocalClient. /// + [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "OnStartServer", "")] + [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "OnStartNetwork", " Use base.Owner.IsLocalClient instead.")] + [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "Awake", "")] + [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "Start", "")] public bool IsOwner { get @@ -124,7 +135,14 @@ public bool IsOwner return Owner.IsLocalClient; } } - + /// + /// True if IsOwner, or if IsServerInitialized with no Owner. + /// + [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "OnStartServer", "")] + [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "OnStartNetwork", " Use (base.Owner.IsLocalClient || (base.IsServerInitialized && !Owner.Isvalid) instead.")] + [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "Awake", "")] + [PreventUsageInside("global::FishNet.Object.NetworkBehaviour", "Start", "")] + public bool IsOwnerOrServer => (IsOwner || (IsServerInitialized && !Owner.IsValid)); /// /// /// diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.QOL.cs.meta b/Assets/FishNet/Runtime/Object/NetworkObject.QOL.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.QOL.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkObject.QOL.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.ReferenceIds.cs b/Assets/FishNet/Runtime/Object/NetworkObject.ReferenceIds.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.ReferenceIds.cs rename to Assets/FishNet/Runtime/Object/NetworkObject.ReferenceIds.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.ReferenceIds.cs.meta b/Assets/FishNet/Runtime/Object/NetworkObject.ReferenceIds.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.ReferenceIds.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkObject.ReferenceIds.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.RpcLinks.cs b/Assets/FishNet/Runtime/Object/NetworkObject.RpcLinks.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.RpcLinks.cs rename to Assets/FishNet/Runtime/Object/NetworkObject.RpcLinks.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.RpcLinks.cs.meta b/Assets/FishNet/Runtime/Object/NetworkObject.RpcLinks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.RpcLinks.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkObject.RpcLinks.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.cs b/Assets/FishNet/Runtime/Object/NetworkObject.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.cs rename to Assets/FishNet/Runtime/Object/NetworkObject.cs index 65cee73..b57ec35 100644 --- a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.cs +++ b/Assets/FishNet/Runtime/Object/NetworkObject.cs @@ -277,7 +277,7 @@ protected virtual void Awake() _isStatic = gameObject.isStatic; RuntimeChildNetworkBehaviours = CollectionCaches.RetrieveList(); SetChildDespawnedState(); -#if PREDICTION_V2 +#if !PREDICTION_1 //Prediction_Awake(); #endif } @@ -394,7 +394,7 @@ private void OnDestroy() void DeinitializePrediction_V2(bool asServer) { -#if PREDICTION_V2 +#if !PREDICTION_1 Prediction_Deinitialize(asServer); #endif } @@ -525,7 +525,7 @@ internal void Preinitialize_Internal(NetworkManager networkManager, int objectId if (estimatedTickDelay < 0) estimatedTickDelay = 0; -#if PREDICTION_V2 +#if !PREDICTION_1 /* Estimate of what the first replicate would have been for this object based on * spawn delay. //TODO: this may not be needed anymore. */ ReplicateTick.Update(TimeManager, lastPacketTick - (uint)estimatedTickDelay); @@ -549,14 +549,14 @@ internal void Preinitialize_Internal(NetworkManager networkManager, int objectId } _networkObserverInitiliazed = true; -#if PREDICTION_V2 +#if !PREDICTION_1 Prediction_Preinitialize(networkManager, asServer); #endif //Add to connections objects. Collection is a hashset so this can be called twice for clientHost. owner?.AddObject(this); } -#if PREDICTION_V2 +#if !PREDICTION_1 private void Update() { Prediction_Update(); @@ -825,7 +825,7 @@ internal void Initialize(bool asServer, bool invokeSyncTypeCallbacks) /// internal void Deinitialize(bool asServer) { -#if PREDICTION_V2 +#if !PREDICTION_1 Prediction_Deinitialize(asServer); #endif InvokeStopCallbacks(asServer); @@ -860,11 +860,11 @@ internal void Deinitialize(bool asServer) /// Resets the state of this NetworkObject. /// This is used internally and typically with custom object pooling. /// - public void ResetState() + public void ResetState(bool asServer) { int count = NetworkBehaviours.Length; for (int i = 0; i < count; i++) - NetworkBehaviours[i].ResetState(); + NetworkBehaviours[i].ResetState(asServer); State = NetworkObjectState.Unset; SetOwner(NetworkManager.EmptyConnection); diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObject.cs.meta b/Assets/FishNet/Runtime/Object/NetworkObject.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObject.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkObject.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObjectState.cs b/Assets/FishNet/Runtime/Object/NetworkObjectState.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObjectState.cs rename to Assets/FishNet/Runtime/Object/NetworkObjectState.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/NetworkObjectState.cs.meta b/Assets/FishNet/Runtime/Object/NetworkObjectState.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/NetworkObjectState.cs.meta rename to Assets/FishNet/Runtime/Object/NetworkObjectState.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction.meta b/Assets/FishNet/Runtime/Object/Prediction.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Prediction.meta rename to Assets/FishNet/Runtime/Object/Prediction.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/Attributes.cs b/Assets/FishNet/Runtime/Object/Prediction/Attributes.cs similarity index 98% rename from Assets/Packages/FishNet/Runtime/Object/Prediction/Attributes.cs rename to Assets/FishNet/Runtime/Object/Prediction/Attributes.cs index 9bba78f..c9658f4 100644 --- a/Assets/Packages/FishNet/Runtime/Object/Prediction/Attributes.cs +++ b/Assets/FishNet/Runtime/Object/Prediction/Attributes.cs @@ -2,7 +2,7 @@ namespace FishNet.Object.Prediction { -#if !PREDICTION_V2 +#if PREDICTION_1 /// /// Replicated methods are to be called from clients and will run the same data and logic on the server. /// Only data used as method arguments will be serialized. diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/Attributes.cs.meta b/Assets/FishNet/Runtime/Object/Prediction/Attributes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Prediction/Attributes.cs.meta rename to Assets/FishNet/Runtime/Object/Prediction/Attributes.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/Delegates.cs b/Assets/FishNet/Runtime/Object/Prediction/Delegates.cs similarity index 98% rename from Assets/Packages/FishNet/Runtime/Object/Prediction/Delegates.cs rename to Assets/FishNet/Runtime/Object/Prediction/Delegates.cs index 27af2ac..61a47d6 100644 --- a/Assets/Packages/FishNet/Runtime/Object/Prediction/Delegates.cs +++ b/Assets/FishNet/Runtime/Object/Prediction/Delegates.cs @@ -13,7 +13,7 @@ namespace FishNet.Object.Prediction.Delegating [APIExclude] public delegate void ReconcileRpcDelegate(PooledReader reader, Channel channel); -#if !PREDICTION_V2 +#if PREDICTION_1 [APIExclude] public delegate void ReplicateUserLogicDelegate(T data, bool asServer, Channel channel, bool replaying); [APIExclude] diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/Delegates.cs.meta b/Assets/FishNet/Runtime/Object/Prediction/Delegates.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Prediction/Delegates.cs.meta rename to Assets/FishNet/Runtime/Object/Prediction/Delegates.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/Interfaces.cs b/Assets/FishNet/Runtime/Object/Prediction/Interfaces.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Prediction/Interfaces.cs rename to Assets/FishNet/Runtime/Object/Prediction/Interfaces.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/Interfaces.cs.meta b/Assets/FishNet/Runtime/Object/Prediction/Interfaces.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Prediction/Interfaces.cs.meta rename to Assets/FishNet/Runtime/Object/Prediction/Interfaces.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/MoveRates.cs b/Assets/FishNet/Runtime/Object/Prediction/MoveRates.cs similarity index 71% rename from Assets/Packages/FishNet/Runtime/Object/Prediction/MoveRates.cs rename to Assets/FishNet/Runtime/Object/Prediction/MoveRates.cs index 67c34f8..d70e1d0 100644 --- a/Assets/Packages/FishNet/Runtime/Object/Prediction/MoveRates.cs +++ b/Assets/FishNet/Runtime/Object/Prediction/MoveRates.cs @@ -13,25 +13,33 @@ internal struct MoveRates public float Position; public float Rotation; public float Scale; + public float TimeRemaining; - public MoveRates(float value) + public MoveRates(float value) : this() { Position = value; Rotation = value; Scale = value; } - public MoveRates(float position, float rotation) + public MoveRates(float position, float rotation) : this() { Position = position; Rotation = rotation; Scale = MoveRatesCls.INSTANT_VALUE; } - public MoveRates(float position, float rotation, float scale) + public MoveRates(float position, float rotation, float scale) : this() { Position = position; Rotation = rotation; Scale = scale; } + public MoveRates(float position, float rotation, float scale, float timeRemaining) + { + Position = position; + Rotation = rotation; + Scale = scale; + TimeRemaining = timeRemaining; + } /// /// True if a positional move rate is set. @@ -125,6 +133,15 @@ public static MoveRates GetLocalMoveRates(TransformProperties prevValues, Transf return GetMoveRates(prevValues.Position, t.localPosition, prevValues.Rotation, t.localRotation, prevValues.LocalScale, t.localScale, duration, teleportThreshold); } + /// + /// Returns a new MoveRates based on previous values, and a transforms current position. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MoveRates GetMoveRates(TransformProperties prevValues, TransformProperties nextValues, float duration, float teleportThreshold) + { + return GetMoveRates(prevValues.Position, nextValues.Position, prevValues.Rotation, nextValues.Rotation, prevValues.LocalScale, nextValues.LocalScale, duration, teleportThreshold); + } + /// /// Returns a new MoveRates based on previous values, and a transforms current position. /// @@ -149,11 +166,46 @@ public static MoveRates GetMoveRates(Vector3 fromPosition, Vector3 toPosition, Q float rotationRate = rate.SetIfUnderTolerance(0.2f, MoveRatesCls.INSTANT_VALUE); rate = toScale.GetRate(fromScale, duration, out _); float scaleRate = rate.SetIfUnderTolerance(0.0001f, MoveRatesCls.INSTANT_VALUE); - + return new MoveRates(positionRate, rotationRate, scaleRate); } } + /// + /// Gets a move rate for two Vector3s. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetMoveRate(Vector3 fromPosition, Vector3 toPosition, float duration, float teleportThreshold) + { + float rate; + float distance; + + /* Position. */ + rate = toPosition.GetRate(fromPosition, duration, out distance); + //Basic teleport check. + if (teleportThreshold != MoveRatesCls.UNSET_VALUE && distance > teleportThreshold) + { + return MoveRatesCls.INSTANT_VALUE; + } + //Smoothing. + else + { + float positionRate = rate.SetIfUnderTolerance(0.0001f, MoveRatesCls.INSTANT_VALUE); + return positionRate; + } + } + + + /// + /// Gets a move rate for two Quaternions. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetMoveRate(Quaternion fromRotation, Quaternion toRotation, float duration) + { + float rate = toRotation.GetRate(fromRotation, duration, out _); + float rotationRate = rate.SetIfUnderTolerance(0.2f, MoveRatesCls.INSTANT_VALUE); + return rotationRate; + } /// /// Moves transform to target values. @@ -166,6 +218,21 @@ public void MoveLocalToTarget(Transform movingTransform, TransformProperties goa return; MoveRatesCls.MoveLocalToTarget(movingTransform, goalProperties.Position, Position, goalProperties.Rotation, Rotation, goalProperties.LocalScale, Scale, delta); + TimeRemaining -= delta; + } + + /// + /// Moves transform to target values. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void MoveWorldToTarget(Transform movingTransform, TransformProperties goalProperties, float delta) + { + //No rates are set. + if (!AnySet) + return; + + MoveRatesCls.MoveWorldToTarget(movingTransform, goalProperties.Position, Position, goalProperties.Rotation, Rotation, goalProperties.LocalScale, Scale, delta); + TimeRemaining -= delta; } } @@ -178,6 +245,7 @@ internal class MoveRatesCls : IResettable public float Position; public float Rotation; public float Scale; + public float TimeRemaining; public MoveRatesCls(float value) { @@ -198,6 +266,14 @@ public MoveRatesCls(float position, float rotation, float scale) Scale = scale; } + public MoveRatesCls(float position, float rotation, float scale, float timeRemaining) + { + Position = position; + Rotation = rotation; + Scale = scale; + TimeRemaining = timeRemaining; + } + /// /// True if a positional move rate is set. /// @@ -272,6 +348,7 @@ public void ResetState() Position = UNSET_VALUE; Rotation = UNSET_VALUE; Scale = UNSET_VALUE; + TimeRemaining = UNSET_VALUE; } public void InitializeState() { } @@ -296,6 +373,7 @@ public void MoveLocalToTarget(Transform movingTransform, TransformPropertiesCls return; MoveRatesCls.MoveLocalToTarget(movingTransform, goalProperties.Position, Position, goalProperties.Rotation, Rotation, goalProperties.LocalScale, Scale, delta); + TimeRemaining -= delta; } /// @@ -326,6 +404,40 @@ public static void MoveLocalToTarget(Transform movingTransform, Vector3 posGoal, t.localScale = Vector3.MoveTowards(t.localScale, scaleGoal, rate * delta); } + /// + /// Moves transform to target values. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void MoveWorldToTarget(Transform movingTransform, Vector3 posGoal, float posRate, Quaternion rotGoal, float rotRate, Vector3 scaleGoal, float scaleRate, float delta) + { + Transform t = movingTransform; + float rate; + + Vector3 start = movingTransform.position; + rate = posRate; + if (rate == MoveRatesCls.INSTANT_VALUE) + t.position = posGoal; + else if (rate == MoveRatesCls.UNSET_VALUE) { } + else + t.position = Vector3.MoveTowards(t.position, posGoal, rate * delta); + + //Debug.Log($"StartX {start.x.ToString("0.00")}. End {t.position.x.ToString("0.00")}. Rate {posRate}. Delta {delta}"); + + rate = rotRate; + if (rate == MoveRatesCls.INSTANT_VALUE) + t.rotation = rotGoal; + else if (rate == MoveRatesCls.UNSET_VALUE) { } + else + t.rotation = Quaternion.RotateTowards(t.rotation, rotGoal, rate * delta); + + rate = scaleRate; + if (rate == MoveRatesCls.INSTANT_VALUE) + t.localScale = scaleGoal; + else if (rate == MoveRatesCls.UNSET_VALUE) { } + else + t.localScale = Vector3.MoveTowards(t.localScale, scaleGoal, rate * delta); + } + } diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/MoveRates.cs.meta b/Assets/FishNet/Runtime/Object/Prediction/MoveRates.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Prediction/MoveRates.cs.meta rename to Assets/FishNet/Runtime/Object/Prediction/MoveRates.cs.meta diff --git a/Assets/FishNet/Runtime/Object/Prediction/PredictionRigidbody.cs b/Assets/FishNet/Runtime/Object/Prediction/PredictionRigidbody.cs new file mode 100644 index 0000000..50bf2fa --- /dev/null +++ b/Assets/FishNet/Runtime/Object/Prediction/PredictionRigidbody.cs @@ -0,0 +1,376 @@ +using FishNet.CodeGenerating; +using FishNet.Managing; +using FishNet.Serializing; +using GameKit.Dependencies.Utilities; +using System.Collections.Generic; +using UnityEngine; + +namespace FishNet.Object.Prediction +{ +#if !PREDICTION_1 + + public static class PredictionRigidbodySerializers + { + public static void WriteForceData(this Writer w, PredictionRigidbody.EntryData value) + { + PredictionRigidbody.ForceApplicationType appType = value.Type; + w.WriteByte((byte)appType); + switch (appType) + { + case PredictionRigidbody.ForceApplicationType.AddTorque: + case PredictionRigidbody.ForceApplicationType.AddForce: + case PredictionRigidbody.ForceApplicationType.AddRelativeTorque: + case PredictionRigidbody.ForceApplicationType.AddRelativeForce: + w.Write((PredictionRigidbody.ForceAndTorqueData)value.Data); + break; + case PredictionRigidbody.ForceApplicationType.AddExplosiveForce: + w.Write((PredictionRigidbody.ExplosiveForceData)value.Data); + break; + case PredictionRigidbody.ForceApplicationType.AddForceAtPosition: + w.Write((PredictionRigidbody.PositionForceData)value.Data); + break; + default: + NetworkManagerExtensions.LogError($"ForceApplicationType of {appType} is not supported."); + break; + } + } + + public static PredictionRigidbody.EntryData ReadForceData(this Reader r) + { + PredictionRigidbody.EntryData fd = new PredictionRigidbody.EntryData(); + + PredictionRigidbody.ForceApplicationType appType = (PredictionRigidbody.ForceApplicationType)r.ReadByte(); + fd.Type = appType; + + switch (appType) + { + case PredictionRigidbody.ForceApplicationType.AddTorque: + case PredictionRigidbody.ForceApplicationType.AddForce: + case PredictionRigidbody.ForceApplicationType.AddRelativeTorque: + case PredictionRigidbody.ForceApplicationType.AddRelativeForce: + fd.Data = r.Read(); + return fd; + case PredictionRigidbody.ForceApplicationType.AddExplosiveForce: + fd.Data = r.Read(); + return fd; + case PredictionRigidbody.ForceApplicationType.AddForceAtPosition: + fd.Data = r.Read(); + return fd; + default: + NetworkManagerExtensions.LogError($"ForceApplicationType of {appType} is not supported."); + return fd; + } + + + + } + + public static void WritePredictionRigidbody(this Writer w, PredictionRigidbody pr) + { + w.WriteList(pr.GetPendingForces()); + } + + public static PredictionRigidbody ReadPredictionRigidbody(this Reader r) + { + List lst = CollectionCaches.RetrieveList(); + r.ReadList(ref lst); + PredictionRigidbody pr = ResettableObjectCaches.Retrieve(); + + pr.SetPendingForces(lst); + return pr; + } + + } + + [UseGlobalCustomSerializer] + public class PredictionRigidbody : IResettable + { + #region Types. + public interface IForceData { } + //How the force was applied. + [System.Flags] + public enum ForceApplicationType : byte + { + AddForceAtPosition = 1, + AddExplosiveForce = 2, + AddForce = 4, + AddRelativeForce = 8, + AddTorque = 16, + AddRelativeTorque = 32, + } + public struct ForceAndTorqueData : IForceData + { + public Vector3 Force; + public ForceMode Mode; + + public ForceAndTorqueData(Vector3 force, ForceMode mode) + { + Force = force; + Mode = mode; + } + } + public struct PositionForceData : IForceData + { + public Vector3 Force; + public Vector3 Position; + public ForceMode Mode; + + public PositionForceData(Vector3 force, Vector3 position, ForceMode mode) + { + Force = force; + Position = position; + Mode = mode; + } + } + public struct ExplosiveForceData : IForceData + { + public float Force; + public Vector3 Position; + public float Radius; + public float UpwardsModifier; + public ForceMode Mode; + + public ExplosiveForceData(float force, Vector3 position, float radius, float upwardsModifier, ForceMode mode) + { + Force = force; + Position = position; + Radius = radius; + UpwardsModifier = upwardsModifier; + Mode = mode; + } + } + + [UseGlobalCustomSerializer] + public struct EntryData + { + public ForceApplicationType Type; + public IForceData Data; + + public EntryData(ForceApplicationType type, IForceData data) + { + Type = type; + Data = data; + } + public EntryData(EntryData fd) + { + Type = fd.Type; + Data = fd.Data; + } + } + #endregion + + #region Public. + /// + /// Rigidbody which force is applied. + /// + public Rigidbody Rigidbody { get; private set; } + #endregion + + #region Private + /// + /// Forces waiting to be applied. + /// + [ExcludeSerialization] + private List _pendingForces; + #endregion + + ~PredictionRigidbody() + { + if (_pendingForces != null) + CollectionCaches.StoreAndDefault(ref _pendingForces); + Rigidbody = null; + } + + /// + /// Rigidbody which force is applied. + /// + /// + public void Initialize(Rigidbody rb) + { + Rigidbody = rb; + if (_pendingForces == null) + _pendingForces = CollectionCaches.RetrieveList(); + else + _pendingForces.Clear(); + } + + /// + /// Adds Velocity force to the Rigidbody. + /// + public void AddForce(Vector3 force, ForceMode mode = ForceMode.Force) + { + EntryData fd = new EntryData(ForceApplicationType.AddForce, + new ForceAndTorqueData(force, mode)); + _pendingForces.Add(fd); + } + public void AddRelativeForce(Vector3 force, ForceMode mode = ForceMode.Force) + { + EntryData fd = new EntryData(ForceApplicationType.AddRelativeForce, + new ForceAndTorqueData(force, mode)); + _pendingForces.Add(fd); + + } + public void AddTorque(Vector3 force, ForceMode mode = ForceMode.Force) + { + EntryData fd = new EntryData(ForceApplicationType.AddTorque, + new ForceAndTorqueData(force, mode)); + _pendingForces.Add(fd); + } + public void AddRelativeTorque(Vector3 force, ForceMode mode = ForceMode.Force) + { + EntryData fd = new EntryData(ForceApplicationType.AddRelativeTorque, + new ForceAndTorqueData(force, mode)); + _pendingForces.Add(fd); + } + public void AddExplosiveForce(float force, Vector3 position, float radius, float upwardsModifier = 0f, ForceMode mode = ForceMode.Force) + { + EntryData fd = new EntryData(ForceApplicationType.AddExplosiveForce, + new ExplosiveForceData(force, position, radius, upwardsModifier, mode)); + _pendingForces.Add(fd); + } + public void AddForceAtPosition(Vector3 force, Vector3 position, ForceMode mode = ForceMode.Force) + { + EntryData fd = new EntryData(ForceApplicationType.AddForceAtPosition, + new PositionForceData(force, position, mode)); + _pendingForces.Add(fd); + } + + /// + /// Sets velocity while clearing pending forces. + /// Simulate should still be called normally. + /// + public void Velocity(Vector3 force) + { + Rigidbody.linearVelocity = force; + RemoveForces(true); + } + + /// + /// Sets angularVelocity while clearning pending forces. + /// Simulate should still be called normally. + /// + public void AngularVelocity(Vector3 force) + { + Rigidbody.angularVelocity = force; + RemoveForces(false); + } + + /// + /// Applies pending forces to rigidbody in the order they were added. + /// + public void Simulate() + { + foreach (EntryData item in _pendingForces) + { + switch (item.Type) + { + case ForceApplicationType.AddTorque: + ForceAndTorqueData e0 = (ForceAndTorqueData)item.Data; + Rigidbody.AddTorque(e0.Force, e0.Mode); + break; + case ForceApplicationType.AddForce: + ForceAndTorqueData e1 = (ForceAndTorqueData)item.Data; + Rigidbody.AddForce(e1.Force, e1.Mode); + break; + case ForceApplicationType.AddRelativeTorque: + ForceAndTorqueData e2 = (ForceAndTorqueData)item.Data; + Rigidbody.AddRelativeTorque(e2.Force, e2.Mode); + break; + case ForceApplicationType.AddRelativeForce: + ForceAndTorqueData e3 = (ForceAndTorqueData)item.Data; + Rigidbody.AddRelativeForce(e3.Force, e3.Mode); + break; + case ForceApplicationType.AddExplosiveForce: + ExplosiveForceData e4 = (ExplosiveForceData)item.Data; + Rigidbody.AddExplosionForce(e4.Force, e4.Position, e4.Radius, e4.UpwardsModifier, e4.Mode); + break; + case ForceApplicationType.AddForceAtPosition: + PositionForceData e5 = (PositionForceData)item.Data; + Rigidbody.AddForceAtPosition(e5.Force, e5.Position, e5.Mode); + break; + } + } + _pendingForces.Clear(); + } + + /// + /// Manually clears pending forces. + /// + /// True to clear velocities, false to clear angular velocities. + public void ClearPendingForces(bool velocity) + { + RemoveForces(velocity); + } + /// + /// Clears pending velocity and angular velocity forces. + /// + public void ClearPendingForces() + { + _pendingForces.Clear(); + } + + /// + /// Reconciles to a state. + /// + public void Reconcile(PredictionRigidbody pr) + { + _pendingForces.Clear(); + if (pr._pendingForces != null) + { + foreach (EntryData item in pr._pendingForces) + _pendingForces.Add(new EntryData(item)); + } + + ResettableObjectCaches.Store(pr); + } + + /// + /// Removes forces from pendingForces. + /// + /// True to remove if velocity, false if to remove angular velocity. + private void RemoveForces(bool velocity) + { + if (_pendingForces.Count > 0) + { + bool shouldExist = velocity; + ForceApplicationType velocityApplicationTypes = (ForceApplicationType.AddRelativeForce | ForceApplicationType.AddForce | ForceApplicationType.AddExplosiveForce); + + List newDatas = CollectionCaches.RetrieveList(); + foreach (EntryData item in _pendingForces) + { + if (VelocityApplicationTypesContains(item.Type) == !velocity) + newDatas.Add(item); + } + //Add back to _pendingForces if changed. + if (newDatas.Count != _pendingForces.Count) + { + _pendingForces.Clear(); + foreach (EntryData item in newDatas) + _pendingForces.Add(item); + } + CollectionCaches.Store(newDatas); + + bool VelocityApplicationTypesContains(ForceApplicationType apt) + { + return (velocityApplicationTypes & apt) == apt; + } + } + + + } + + internal List GetPendingForces() => _pendingForces; + internal void SetPendingForces(List lst) => _pendingForces = lst; + + public void ResetState() + { + CollectionCaches.StoreAndDefault(ref _pendingForces); + Rigidbody = null; + } + + public void InitializeState() { } + } +#endif + +} + diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/PredictonRigidbody.cs.meta b/Assets/FishNet/Runtime/Object/Prediction/PredictionRigidbody.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Prediction/PredictonRigidbody.cs.meta rename to Assets/FishNet/Runtime/Object/Prediction/PredictionRigidbody.cs.meta diff --git a/Assets/FishNet/Runtime/Object/Prediction/PredictionRigidbody2D.cs b/Assets/FishNet/Runtime/Object/Prediction/PredictionRigidbody2D.cs new file mode 100644 index 0000000..6afc0c1 --- /dev/null +++ b/Assets/FishNet/Runtime/Object/Prediction/PredictionRigidbody2D.cs @@ -0,0 +1,344 @@ +using FishNet.CodeGenerating; +using FishNet.Managing; +using FishNet.Serializing; +using GameKit.Dependencies.Utilities; +using System.Collections.Generic; +using UnityEngine; + +namespace FishNet.Object.Prediction +{ +#if !PREDICTION_1 + + public static class PredictionRigidbody2D2DSerializers + { + public static void WriteForceData(this Writer w, PredictionRigidbody2D.EntryData value) + { + PredictionRigidbody2D.ForceApplicationType appType = value.Type; + w.WriteByte((byte)appType); + switch (appType) + { + case PredictionRigidbody2D.ForceApplicationType.AddForce: + case PredictionRigidbody2D.ForceApplicationType.AddRelativeForce: + w.Write((PredictionRigidbody2D.ForceData)value.Data); + break; + case PredictionRigidbody2D.ForceApplicationType.AddTorque: + w.Write((PredictionRigidbody2D.TorqueData)value.Data); + break; + case PredictionRigidbody2D.ForceApplicationType.AddForceAtPosition: + w.Write((PredictionRigidbody2D.PositionForceData)value.Data); + break; + default: + NetworkManagerExtensions.LogError($"ForceApplicationType of {appType} is not supported."); + break; + } + } + + public static PredictionRigidbody2D.EntryData ReadForceData(this Reader r) + { + PredictionRigidbody2D.EntryData fd = new PredictionRigidbody2D.EntryData(); + + PredictionRigidbody2D.ForceApplicationType appType = (PredictionRigidbody2D.ForceApplicationType)r.ReadByte(); + fd.Type = appType; + + switch (appType) + { + case PredictionRigidbody2D.ForceApplicationType.AddForce: + case PredictionRigidbody2D.ForceApplicationType.AddRelativeForce: + fd.Data = r.Read(); + return fd; + case PredictionRigidbody2D.ForceApplicationType.AddTorque: + fd.Data = r.Read(); + return fd; + case PredictionRigidbody2D.ForceApplicationType.AddForceAtPosition: + fd.Data = r.Read(); + return fd; + default: + NetworkManagerExtensions.LogError($"ForceApplicationType of {appType} is not supported."); + return fd; + } + + + + } + + public static void WritePredictionRigidbody2D(this Writer w, PredictionRigidbody2D pr) + { + w.WriteList(pr.GetPendingForces()); + } + + public static PredictionRigidbody2D ReadPredictionRigidbody2D(this Reader r) + { + List lst = CollectionCaches.RetrieveList(); + r.ReadList(ref lst); + PredictionRigidbody2D pr = ResettableObjectCaches.Retrieve(); + + pr.SetPendingForces(lst); + return pr; + } + + } + + [UseGlobalCustomSerializer] + public class PredictionRigidbody2D : IResettable + { + #region Types. + public interface IForceData { } + //How the force was applied. + [System.Flags] + public enum ForceApplicationType : byte + { + AddForceAtPosition = 1, + AddForce = 4, + AddRelativeForce = 8, + AddTorque = 16, + } + public struct ForceData : IForceData + { + public Vector3 Force; + public ForceMode2D Mode; + + public ForceData(Vector3 force, ForceMode2D mode) + { + Force = force; + Mode = mode; + } + } + public struct TorqueData : IForceData + { + public float Force; + public ForceMode2D Mode; + + public TorqueData(float force, ForceMode2D mode) + { + Force = force; + Mode = mode; + } + } + public struct PositionForceData : IForceData + { + public Vector3 Force; + public Vector3 Position; + public ForceMode2D Mode; + + public PositionForceData(Vector3 force, Vector3 position, ForceMode2D mode) + { + Force = force; + Position = position; + Mode = mode; + } + } + + [UseGlobalCustomSerializer] + public struct EntryData + { + public ForceApplicationType Type; + public IForceData Data; + + public EntryData(ForceApplicationType type, IForceData data) + { + Type = type; + Data = data; + } + public EntryData(EntryData fd) + { + Type = fd.Type; + Data = fd.Data; + } + } + #endregion + + #region Public. + /// + /// Rigidbody which force is applied. + /// + public Rigidbody2D Rigidbody2D { get; private set; } + #endregion + + #region Private + /// + /// Forces waiting to be applied. + /// + [ExcludeSerialization] + private List _pendingForces; + #endregion + + ~PredictionRigidbody2D() + { + if (_pendingForces != null) + CollectionCaches.StoreAndDefault(ref _pendingForces); + Rigidbody2D = null; + } + + /// + /// Rigidbody which force is applied. + /// + /// + public void Initialize(Rigidbody2D rb) + { + Rigidbody2D = rb; + if (_pendingForces == null) + _pendingForces = CollectionCaches.RetrieveList(); + else + _pendingForces.Clear(); + } + + /// + /// Adds Velocity force to the Rigidbody. + /// + public void AddForce(Vector3 force, ForceMode2D mode = ForceMode2D.Force) + { + EntryData fd = new EntryData(ForceApplicationType.AddForce, + new ForceData(force, mode)); + _pendingForces.Add(fd); + } + public void AddRelativeForce(Vector3 force, ForceMode2D mode = ForceMode2D.Force) + { + EntryData fd = new EntryData(ForceApplicationType.AddRelativeForce, + new ForceData(force, mode)); + _pendingForces.Add(fd); + + } + public void AddTorque(float force, ForceMode2D mode = ForceMode2D.Force) + { + EntryData fd = new EntryData(ForceApplicationType.AddTorque, + new TorqueData(force, mode)); + _pendingForces.Add(fd); + } + public void AddForceAtPosition(Vector3 force, Vector3 position, ForceMode2D mode = ForceMode2D.Force) + { + EntryData fd = new EntryData(ForceApplicationType.AddForceAtPosition, + new PositionForceData(force, position, mode)); + _pendingForces.Add(fd); + } + + /// + /// Sets velocity while clearing pending forces. + /// Simulate should still be called normally. + /// + public void Velocity(Vector3 force) + { + Rigidbody2D.linearVelocity = force; + RemoveForces(true); + } + + /// + /// Sets angularVelocity while clearning pending forces. + /// Simulate should still be called normally. + /// + public void AngularVelocity(float force) + { + Rigidbody2D.angularVelocity = force; + RemoveForces(false); + } + + /// + /// Applies pending forces to rigidbody in the order they were added. + /// + public void Simulate() + { + foreach (EntryData item in _pendingForces) + { + switch (item.Type) + { + case ForceApplicationType.AddTorque: + TorqueData e0 = (TorqueData)item.Data; + Rigidbody2D.AddTorque(e0.Force, e0.Mode); + break; + case ForceApplicationType.AddForce: + ForceData e1 = (ForceData)item.Data; + Rigidbody2D.AddForce(e1.Force, e1.Mode); + break; + case ForceApplicationType.AddRelativeForce: + ForceData e3 = (ForceData)item.Data; + Rigidbody2D.AddRelativeForce(e3.Force, e3.Mode); + break; + case ForceApplicationType.AddForceAtPosition: + PositionForceData e5 = (PositionForceData)item.Data; + Rigidbody2D.AddForceAtPosition(e5.Force, e5.Position, e5.Mode); + break; + } + } + _pendingForces.Clear(); + } + + /// + /// Manually clears pending forces. + /// + /// True to clear velocities, false to clear angular velocities. + public void ClearPendingForces(bool velocity) + { + RemoveForces(velocity); + } + /// + /// Clears pending velocity and angular velocity forces. + /// + public void ClearPendingForces() + { + _pendingForces.Clear(); + } + + /// + /// Reconciles to a state. + /// + public void Reconcile(PredictionRigidbody2D pr) + { + _pendingForces.Clear(); + if (pr._pendingForces != null) + { + foreach (EntryData item in pr._pendingForces) + _pendingForces.Add(new EntryData(item)); + } + + ResettableObjectCaches.Store(pr); + } + + /// + /// Removes forces from pendingForces. + /// + /// True to remove if velocity, false if to remove angular velocity. + private void RemoveForces(bool velocity) + { + if (_pendingForces.Count > 0) + { + bool shouldExist = velocity; + ForceApplicationType velocityApplicationTypes = (ForceApplicationType.AddRelativeForce | ForceApplicationType.AddForce); + + List newDatas = CollectionCaches.RetrieveList(); + foreach (EntryData item in _pendingForces) + { + if (VelocityApplicationTypesContains(item.Type) == !velocity) + newDatas.Add(item); + } + //Add back to _pendingForces if changed. + if (newDatas.Count != _pendingForces.Count) + { + _pendingForces.Clear(); + foreach (EntryData item in newDatas) + _pendingForces.Add(item); + } + CollectionCaches.Store(newDatas); + + bool VelocityApplicationTypesContains(ForceApplicationType apt) + { + return (velocityApplicationTypes & apt) == apt; + } + } + + + } + + internal List GetPendingForces() => _pendingForces; + internal void SetPendingForces(List lst) => _pendingForces = lst; + + public void ResetState() + { + CollectionCaches.StoreAndDefault(ref _pendingForces); + Rigidbody2D = null; + } + + public void InitializeState() { } + } +#endif + +} + diff --git a/Assets/FishNet/Runtime/Object/Prediction/PredictionRigidbody2D.cs.meta b/Assets/FishNet/Runtime/Object/Prediction/PredictionRigidbody2D.cs.meta new file mode 100644 index 0000000..0fc7249 --- /dev/null +++ b/Assets/FishNet/Runtime/Object/Prediction/PredictionRigidbody2D.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1b6a1cc418198134180faa3438517b52 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FishNet/Runtime/Object/Prediction/PredictionTickSmoother.cs b/Assets/FishNet/Runtime/Object/Prediction/PredictionTickSmoother.cs new file mode 100644 index 0000000..1fc26e8 --- /dev/null +++ b/Assets/FishNet/Runtime/Object/Prediction/PredictionTickSmoother.cs @@ -0,0 +1,151 @@ +//using FishNet.Utility.Extension; //Remove on 2024/06/01 +//using System.Runtime.CompilerServices; +//using UnityEngine; + +//namespace FishNet.Object.Prediction +//{ +// internal class LocalTransformTickSmoother +// { +// #region Private. +// /// +// /// Object to smooth. +// /// +// private Transform _graphicalObject; +// /// +// /// When not MoveRatesCls.UNSET_VALUE the graphical object will teleport into it's next position if the move distance exceeds this value. +// /// +// private float _teleportThreshold; +// /// +// /// How quickly to move towards goal values. +// /// +// private MoveRates _moveRates; +// /// +// /// True if a pretick occurred since last postTick. +// /// +// private bool _preTicked; +// /// +// /// Local values of the graphical during pretick. +// /// +// private TransformProperties _gfxInitializedLocalValues; +// /// +// /// World values of the graphical after it's been aligned to initialized values in PreTick. +// /// +// private TransformProperties _gfxPreSimulateWorldValues; +// /// +// /// TickDelta on the TimeManager. +// /// +// private float _tickDelta; +// /// +// /// How many ticks to interpolate over. +// /// +// private byte _interpolation; +// #endregion + +// /// +// /// Initializes this smoother; should only be completed once. +// /// +// internal void InitializeOnce(Transform graphicalObject, float teleportDistance, float tickDelta, byte interpolation) +// { +// _gfxInitializedLocalValues = graphicalObject.GetLocalProperties(); +// _tickDelta = tickDelta; +// _graphicalObject = graphicalObject; +// _teleportThreshold = (teleportDistance * (float)interpolation); +// _interpolation = interpolation; +// } + +// /// +// /// Keeps initialized values but unsets runtime values. +// /// +// internal void Deinitialize() +// { +// _graphicalObject.SetLocalProperties(_gfxInitializedLocalValues); +// _preTicked = false; +// } + +// /// +// /// Called every frame. +// /// +// internal void Update() +// { +// if (!CanSmooth()) +// return; + +// MoveToTarget(); +// } + + +// /// +// /// Called when the TimeManager invokes OnPreTick. +// /// +// internal void OnPreTick() +// { +// if (!CanSmooth()) +// return; + +// _preTicked = true; +// _gfxPreSimulateWorldValues = _graphicalObject.GetWorldProperties(); +// } + +// /// +// /// Called when TimeManager invokes OnPostTick. +// /// +// internal void OnPostTick() +// { +// if (!CanSmooth()) +// return; + +// //If preticked then previous transform values are known. +// if (_preTicked) +// { +// _graphicalObject.SetWorldProperties(_gfxPreSimulateWorldValues); +// SetMoveRates(_gfxInitializedLocalValues, _graphicalObject); +// } +// //If did not pretick then the only thing we can do is snap to instantiated values. +// else +// { +// _graphicalObject.SetLocalProperties(_gfxInitializedLocalValues); +// } +// } + +// /// +// /// Returns if prediction can be used on this rigidbody. +// /// +// /// +// private bool CanSmooth() +// { +// if (_graphicalObject == null) +// return false; + +// return true; +// } + +// /// +// /// Sets Position and Rotation move rates to reach Target datas. +// /// +// private void SetMoveRates(TransformProperties prevValues, Transform t) +// { +// float duration = (_tickDelta * (float)_interpolation); +// /* If interpolation is 1 then add on a tiny amount +// * of more time to compensate for frame time, so that +// * the smoothing does not complete before the next tick, +// * as this would result in jitter. */ +// if (_interpolation == 1) +// duration += Mathf.Max(Time.deltaTime, (1f / 50f)); +// float teleportT = _teleportThreshold; +// _moveRates = MoveRates.GetLocalMoveRates(prevValues, t, duration, teleportT); +// } + + +// /// +// /// Moves transform to target values. +// /// +// [MethodImpl(MethodImplOptions.AggressiveInlining)] +// private void MoveToTarget() +// { +// _moveRates.MoveLocalToTarget(_graphicalObject, _gfxInitializedLocalValues, Time.deltaTime); +// } + +// } + + +//} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/PredictionTickSmoother.cs.meta b/Assets/FishNet/Runtime/Object/Prediction/PredictionTickSmoother.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Prediction/PredictionTickSmoother.cs.meta rename to Assets/FishNet/Runtime/Object/Prediction/PredictionTickSmoother.cs.meta diff --git a/Assets/FishNet/Runtime/Object/Prediction/TransformTickSmoother.cs b/Assets/FishNet/Runtime/Object/Prediction/TransformTickSmoother.cs new file mode 100644 index 0000000..8f9fbbc --- /dev/null +++ b/Assets/FishNet/Runtime/Object/Prediction/TransformTickSmoother.cs @@ -0,0 +1,133 @@ +//Remove on 2024/06/01 +//using FishNet.Utility.Extension; +//using System.Runtime.CompilerServices; +//using UnityEngine; + +//namespace FishNet.Object.Prediction +//{ +// internal class LocalTransformTickSmoother +// { +// #region Private. +// /// +// /// Object to smooth. +// /// +// private Transform _transform; +// /// +// /// When not 0f the graphical object will teleport into it's next position if the move distance exceeds this value. +// /// +// private float _teleportThreshold; +// /// +// /// How quickly to move towards goal values. +// /// +// private MoveRates _moveRates; +// /// +// /// WOrld values of the graphical during PreTick. +// /// +// private TransformProperties _preTickValues; +// /// +// /// Local values of the graphical after PostTick. +// /// +// private TransformProperties? _postTickValues; +// /// +// /// Duration to move over. +// /// +// private float _tickDelta; +// /// +// /// True if a pretick occurred since last postTick. +// /// +// private bool _preTicked; +// #endregion + +// /// +// /// Initializes this smoother; should only be completed once. +// /// +// internal void InitializeOnce(Transform t, float teleportDistance, float tickDelta) +// { +// //If current graphicalObject is set then snap it to postTick values. +// if (_transform != null && _postTickValues.HasValue) +// _transform.SetLocalProperties(_postTickValues.Value); + +// _tickDelta = tickDelta; +// _postTickValues = t.GetWorldProperties(); +// _transform = t; +// _teleportThreshold = teleportDistance; +// } + +// /// +// /// Called every frame. +// /// +// internal void Update() +// { +// if (!CanSmooth()) +// return; + +// if (_postTickValues.HasValue) +// MoveToTarget(_postTickValues.Value); +// } + + +// /// +// /// Called when the TimeManager invokes OnPreTick. +// /// +// internal void OnPreTick() +// { +// if (!CanSmooth()) +// return; + +// _preTicked = true; +// _preTickValues = _transform.GetWorldProperties(); +// } + +// /// +// /// Called when TimeManager invokes OnPostTick. +// /// +// internal void OnPostTick() +// { +// if (!CanSmooth()) +// return; + +// //If preticked then previous transform values are known. +// if (_preTicked) +// { +// SetMoveRates(_preTickValues, _transform); +// _postTickValues = _transform.GetWorldProperties(); +// _transform.SetWorldProperties(_preTickValues); +// } +// _preTicked = false; +// } + +// /// +// /// Returns if prediction can be used on this rigidbody. +// /// +// /// +// private bool CanSmooth() +// { +// if (_transform == null) +// return false; + +// return true; +// } + +// /// +// /// Moves transform to target values. +// /// +// [MethodImpl(MethodImplOptions.AggressiveInlining)] +// private void MoveToTarget(TransformProperties tp) +// { +// _moveRates.MoveLocalToTarget(_transform, tp, Time.deltaTime); +// } + +// /// +// /// Sets Position and Rotation move rates to reach Target datas. +// /// +// private void SetMoveRates(TransformProperties prevValues, Transform t) +// { +// float duration = _tickDelta; +// float teleportT = _teleportThreshold; +// _moveRates = MoveRates.GetWorldMoveRates(prevValues, t, duration, teleportT); +// } + +// } + + +//} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/TransformTickSmoother.cs.meta b/Assets/FishNet/Runtime/Object/Prediction/TransformTickSmoother.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Prediction/TransformTickSmoother.cs.meta rename to Assets/FishNet/Runtime/Object/Prediction/TransformTickSmoother.cs.meta diff --git a/Assets/FishNet/Runtime/Object/ReplicateState.cs b/Assets/FishNet/Runtime/Object/ReplicateState.cs new file mode 100644 index 0000000..64322f3 --- /dev/null +++ b/Assets/FishNet/Runtime/Object/ReplicateState.cs @@ -0,0 +1,82 @@ +using FishNet.Utility; +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo(UtilityConstants.CODEGEN_ASSEMBLY_NAME)] +namespace FishNet.Object +{ + + public enum ReplicateState : byte + { + /// + /// The default value of this state. + /// This value should never occur when a replicate runs. + /// + Invalid = 0, + /// + /// Value is seen on server, and clients when they own the object. + /// Data has been received on the object for the tick. + /// + CurrentCreated = 1, + /// + /// Value is only seen on server when they do not own the object. + /// Server does not have data on this non-owned object for the tick but expected to, such as a state should have arrived but did not. + /// + [System.Obsolete("This is currently not used but may be in a later release. Please read summary for value.")] + CurrentPredicted = 2, + /// + /// Value is only seen on clients when they do not own the object. + /// Client does not have data for the tick but expected to, such as a state should have arrived but did not. + /// Client is currently reconciling. + /// + [System.Obsolete("This is currently not used but may be in a later release. Please read summary for value.")] + ReplayedPredicted = 3, + /// + /// Value is only seen on clients. + /// Client has data on the object for the tick. + /// Client is currently reconciling. + /// + ReplayedCreated = 4, + /// + /// Value is only seen on clients when they do not own the object. + /// Tick is in the future and data cannot yet be known. + /// This can be used to exit replicate early to not process actions, or create actions based on previous datas. + /// + CurrentFuture = 5, + /// + /// Value is only seen on clients when they do not own the object. + /// Tick is in the future and data cannot yet be known. + /// Client is currently reconciling. + /// This can be used to exit replicate early to not process actions, or create actions based on previous datas. + /// + ReplayedFuture = 6, + } + + public static class ReplicateStateExtensions + { + /// + /// Returns if value is valid. + /// This should never be false. + /// + public static bool IsValid(this ReplicateState value) => (value != ReplicateState.Invalid); + /// + /// Returns if value is replayed. + /// +#pragma warning disable CS0618 // Type or member is obsolete + public static bool IsReplayed(this ReplicateState value) => (value == ReplicateState.ReplayedPredicted || value == ReplicateState.ReplayedCreated || value == ReplicateState.ReplayedFuture); +#pragma warning restore CS0618 // Type or member is obsolete + /// + /// Returns if value is user created. + /// + public static bool IsCreated(this ReplicateState value) => (value == ReplicateState.CurrentCreated || value == ReplicateState.ReplayedCreated); + /// + /// Returns if value is predicted. + /// +#pragma warning disable CS0618 // Type or member is obsolete + public static bool IsPredicted(this ReplicateState value) => (value == ReplicateState.ReplayedPredicted); +#pragma warning restore CS0618 // Type or member is obsolete + /// + /// Returns if value is in the future. + /// + public static bool IsFuture(this ReplicateState value) => (value == ReplicateState.CurrentFuture || value == ReplicateState.ReplayedFuture); + } +} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Object/ReplicateState.cs.meta b/Assets/FishNet/Runtime/Object/ReplicateState.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/ReplicateState.cs.meta rename to Assets/FishNet/Runtime/Object/ReplicateState.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/RpcLinkType.cs b/Assets/FishNet/Runtime/Object/RpcLinkType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/RpcLinkType.cs rename to Assets/FishNet/Runtime/Object/RpcLinkType.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/RpcLinkType.cs.meta b/Assets/FishNet/Runtime/Object/RpcLinkType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/RpcLinkType.cs.meta rename to Assets/FishNet/Runtime/Object/RpcLinkType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/SyncTypeWriteType.cs b/Assets/FishNet/Runtime/Object/SyncTypeWriteType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/SyncTypeWriteType.cs rename to Assets/FishNet/Runtime/Object/SyncTypeWriteType.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/SyncTypeWriteType.cs.meta b/Assets/FishNet/Runtime/Object/SyncTypeWriteType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/SyncTypeWriteType.cs.meta rename to Assets/FishNet/Runtime/Object/SyncTypeWriteType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing.meta b/Assets/FishNet/Runtime/Object/Synchronizing.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing.meta rename to Assets/FishNet/Runtime/Object/Synchronizing.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/ICustomSync.cs b/Assets/FishNet/Runtime/Object/Synchronizing/ICustomSync.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/ICustomSync.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/ICustomSync.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/ICustomSync.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/ICustomSync.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/ICustomSync.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/ICustomSync.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/MissingObjectPacketLength.cs b/Assets/FishNet/Runtime/Object/Synchronizing/MissingObjectPacketLength.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/MissingObjectPacketLength.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/MissingObjectPacketLength.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/MissingObjectPacketLength.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/MissingObjectPacketLength.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/MissingObjectPacketLength.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/MissingObjectPacketLength.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/ReadPermissions.cs b/Assets/FishNet/Runtime/Object/Synchronizing/ReadPermissions.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/ReadPermissions.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/ReadPermissions.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/ReadPermissions.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/ReadPermissions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/ReadPermissions.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/ReadPermissions.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncBase.cs b/Assets/FishNet/Runtime/Object/Synchronizing/SyncBase.cs similarity index 96% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncBase.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncBase.cs index 00d88bd..1cb62bc 100644 --- a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncBase.cs +++ b/Assets/FishNet/Runtime/Object/Synchronizing/SyncBase.cs @@ -334,9 +334,9 @@ public bool Dirty()//bool sendRpc = false) protected bool ReadChangeId(PooledReader reader) { bool reset = reader.ReadBoolean(); - uint id = reader.ReadUInt32(); bool ignoreResults = !reset && (id <= _lastReadDirtyId); + _lastReadDirtyId = id; return ignoreResults; } @@ -431,19 +431,34 @@ internal protected virtual void WriteFull(PooledWriter writer) [MakePublic] internal protected virtual void Read(PooledReader reader, bool asServer) { } /// - /// Resets initialized values. + /// Resets initialized values for server and client. /// - [MakePublic] internal protected virtual void ResetState() { - _lastWriteFullLocalTick = 0; - _changeId = 0; - _lastReadDirtyId = DEFAULT_LAST_READ_DIRTYID; - NextSyncTick = 0; - SetCurrentChannel(Settings.Channel); - IsDirty = false; + ResetState(true); + ResetState(false); } - } + /// + /// Resets initialized values for server or client. + /// + [MakePublic] + internal protected virtual void ResetState(bool asServer) + { + if (asServer) + { + _lastWriteFullLocalTick = 0; + _changeId = 0; + NextSyncTick = 0; + SetCurrentChannel(Settings.Channel); + IsDirty = false; + } + else + { + _lastReadDirtyId = DEFAULT_LAST_READ_DIRTYID; + } + } + + } } \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncBase.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/SyncBase.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncBase.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncBase.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncDictionary.cs b/Assets/FishNet/Runtime/Object/Synchronizing/SyncDictionary.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncDictionary.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncDictionary.cs index bd53db9..6531646 100644 --- a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncDictionary.cs +++ b/Assets/FishNet/Runtime/Object/Synchronizing/SyncDictionary.cs @@ -7,10 +7,11 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; +using UnityEngine; namespace FishNet.Object.Synchronizing { - + [System.Serializable] public class SyncDictionary : SyncBase, IDictionary, IReadOnlyDictionary { @@ -76,6 +77,7 @@ public ChangeData(SyncDictionaryOperation operation, TKey key, TValue value) /// /// Copy of objects on client portion when acting as a host. /// + [HideInInspector] public Dictionary ClientHostCollection; /// /// Number of objects in the collection. @@ -393,9 +395,9 @@ private void InvokeOnChange(SyncDictionaryOperation operation, TKey key, TValue /// Resets to initialized values. /// [APIExclude] - internal protected override void ResetState() + internal protected override void ResetState(bool asServer) { - base.ResetState(); + base.ResetState(asServer); _sendAll = false; _changed.Clear(); Collection.Clear(); diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncDictionary.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/SyncDictionary.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncDictionary.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncDictionary.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncDictionaryOperation.cs b/Assets/FishNet/Runtime/Object/Synchronizing/SyncDictionaryOperation.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncDictionaryOperation.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncDictionaryOperation.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncDictionaryOperation.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/SyncDictionaryOperation.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncDictionaryOperation.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncDictionaryOperation.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncHashSetOperation.cs b/Assets/FishNet/Runtime/Object/Synchronizing/SyncHashSetOperation.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncHashSetOperation.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncHashSetOperation.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncHashSetOperation.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/SyncHashSetOperation.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncHashSetOperation.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncHashSetOperation.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncHashset.cs b/Assets/FishNet/Runtime/Object/Synchronizing/SyncHashset.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncHashset.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncHashset.cs index e5110c3..4261cbe 100644 --- a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncHashset.cs +++ b/Assets/FishNet/Runtime/Object/Synchronizing/SyncHashset.cs @@ -6,10 +6,11 @@ using System.Collections; using System.Collections.Generic; using System.Runtime.CompilerServices; +using UnityEngine; namespace FishNet.Object.Synchronizing { - + [System.Serializable] public class SyncHashSet : SyncBase, ISet { #region Types. @@ -70,6 +71,7 @@ public ChangeData(SyncHashSetOperation operation, T item) /// /// Copy of objects on client portion when acting as a host. /// + [HideInInspector] public HashSet ClientHostCollection; /// /// Number of objects in the collection. @@ -359,9 +361,9 @@ private void InvokeOnChange(SyncHashSetOperation operation, T item, bool asServe /// /// Resets to initialized values. /// - internal protected override void ResetState() + internal protected override void ResetState(bool asServer) { - base.ResetState(); + base.ResetState(asServer); _sendAll = false; _changed.Clear(); Collection.Clear(); diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncHashset.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/SyncHashset.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncHashset.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncHashset.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncList.cs b/Assets/FishNet/Runtime/Object/Synchronizing/SyncList.cs similarity index 98% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncList.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncList.cs index 0a633f2..2fa5c5b 100644 --- a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncList.cs +++ b/Assets/FishNet/Runtime/Object/Synchronizing/SyncList.cs @@ -7,12 +7,13 @@ using System.Collections; using System.Collections.Generic; using System.Runtime.CompilerServices; +using UnityEngine; namespace FishNet.Object.Synchronizing { - + [System.Serializable] public class SyncList : SyncBase, IList, IReadOnlyList - { + { #region Types. /// /// Information needed to invoke a callback. @@ -77,6 +78,7 @@ public ChangeData(SyncListOperation operation, int index, T item) /// /// Copy of objects on client portion when acting as a host. /// + [HideInInspector] public List ClientHostCollection; /// /// Number of objects in the collection. @@ -423,9 +425,9 @@ private void InvokeOnChange(SyncListOperation operation, int index, T prev, T ne /// /// Resets to initialized values. /// - internal protected override void ResetState() + internal protected override void ResetState(bool asServer) { - base.ResetState(); + base.ResetState(asServer); _sendAll = false; _changed.Clear(); ClientHostCollection.Clear(); @@ -519,8 +521,10 @@ public void CopyTo(T[] array, int index) public int IndexOf(T item) { for (int i = 0; i < Collection.Count; ++i) + { if (_comparer.Equals(item, Collection[i])) return i; + } return -1; } @@ -532,8 +536,10 @@ public int IndexOf(T item) public int FindIndex(Predicate match) { for (int i = 0; i < Collection.Count; ++i) + { if (match(Collection[i])) return i; + } return -1; } @@ -557,8 +563,10 @@ public List FindAll(Predicate match) { List results = new List(); for (int i = 0; i < Collection.Count; ++i) + { if (match(Collection[i])) results.Add(Collection[i]); + } return results; } @@ -647,9 +655,11 @@ public int RemoveAll(Predicate match) { List toRemove = new List(); for (int i = 0; i < Collection.Count; ++i) + { if (match(Collection[i])) toRemove.Add(Collection[i]); - + } + foreach (T entry in toRemove) Remove(entry); diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncList.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/SyncList.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncList.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncList.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncListOperation.cs b/Assets/FishNet/Runtime/Object/Synchronizing/SyncListOperation.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncListOperation.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncListOperation.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncListOperation.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/SyncListOperation.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncListOperation.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncListOperation.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncTypeSetting.cs b/Assets/FishNet/Runtime/Object/Synchronizing/SyncTypeSetting.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncTypeSetting.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncTypeSetting.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncTypeSetting.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/SyncTypeSetting.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncTypeSetting.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncTypeSetting.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncVar.cs b/Assets/FishNet/Runtime/Object/Synchronizing/SyncVar.cs similarity index 91% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncVar.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncVar.cs index 11b5b26..7f31c77 100644 --- a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncVar.cs +++ b/Assets/FishNet/Runtime/Object/Synchronizing/SyncVar.cs @@ -99,6 +99,10 @@ public T Value /// [SerializeField] private T _value; + /// + /// True if T IsValueType. + /// + private bool _isValueType; #endregion #region Constructors. @@ -112,6 +116,7 @@ public T Value protected override void Initialized() { base.Initialized(); + _isValueType = typeof(T).IsValueType; _initialValue = _value; } @@ -141,18 +146,15 @@ private void UpdateValues(T next) [MethodImpl(MethodImplOptions.AggressiveInlining)] internal void SetValue(T nextValue, bool calledByUser, bool sendRpc = false) { - /* If not registered then that means Awake - * has not completed on the owning class. This would be true - * when setting values within awake on the owning class. Registered - * is called at the end of awake, so it would be unset until awake completed. - * - * Registered however will be true when setting from another script, - * even if the owning class of this was just spawned. This is because - * the unity cycle will fire awake on the object soon as it's spawned, - * completing awake, and the user would set the value after. */ + /* IsInitialized is only set after the script containing this SyncVar + * has executed our codegen in the beginning of awake, and after awake + * user logic. When not set update the initial values */ if (!base.IsInitialized) + { + SetInitialValues(nextValue); return; - + } + /* If not client or server then set skipChecks * as true. When neither is true it's likely user is changing * value before object is initialized. This is allowed @@ -298,8 +300,17 @@ internal protected override void WriteDelta(PooledWriter writer, bool resetSyncT [MakePublic] internal protected override void WriteFull(PooledWriter obj0) { - if (Comparers.EqualityCompare(_initialValue, _value)) - return; + /* If a class then skip comparer check. + * InitialValue and Value will be the same reference. + * + * If a struct then compare field changes, since the references + * will not be the same. Otherwise comparer normally. */ + //Compare if a value type. + if (_isValueType) + { + if (Comparers.EqualityCompare(_initialValue, _value)) + return; + } /* SyncVars only hold latest value, so just * write current delta. */ WriteDelta(obj0, false); @@ -318,9 +329,9 @@ protected internal override void Read(PooledReader reader, bool asServer) /// Resets to initialized values. /// [MakePublic] - internal protected override void ResetState() + internal protected override void ResetState(bool asServer) { - base.ResetState(); + base.ResetState(asServer); _value = _initialValue; _previousClientValue = _initialValue; } diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncVar.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/SyncVar.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/SyncVar.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/SyncVar.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/WritePermissions.cs b/Assets/FishNet/Runtime/Object/Synchronizing/WritePermissions.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/WritePermissions.cs rename to Assets/FishNet/Runtime/Object/Synchronizing/WritePermissions.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/Synchronizing/WritePermissions.cs.meta b/Assets/FishNet/Runtime/Object/Synchronizing/WritePermissions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/Synchronizing/WritePermissions.cs.meta rename to Assets/FishNet/Runtime/Object/Synchronizing/WritePermissions.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/TransformProperties.cs b/Assets/FishNet/Runtime/Object/TransformProperties.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/TransformProperties.cs rename to Assets/FishNet/Runtime/Object/TransformProperties.cs diff --git a/Assets/Packages/FishNet/Runtime/Object/TransformProperties.cs.meta b/Assets/FishNet/Runtime/Object/TransformProperties.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Object/TransformProperties.cs.meta rename to Assets/FishNet/Runtime/Object/TransformProperties.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing.meta b/Assets/FishNet/Runtime/Observing.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing.meta rename to Assets/FishNet/Runtime/Observing.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions.meta b/Assets/FishNet/Runtime/Observing/Conditions.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions.meta rename to Assets/FishNet/Runtime/Observing/Conditions.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/DistanceCondition.cs b/Assets/FishNet/Runtime/Observing/Conditions/DistanceCondition.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/DistanceCondition.cs rename to Assets/FishNet/Runtime/Observing/Conditions/DistanceCondition.cs diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/DistanceCondition.cs.meta b/Assets/FishNet/Runtime/Observing/Conditions/DistanceCondition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/DistanceCondition.cs.meta rename to Assets/FishNet/Runtime/Observing/Conditions/DistanceCondition.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition.meta b/Assets/FishNet/Runtime/Observing/Conditions/GridCondition.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition.meta rename to Assets/FishNet/Runtime/Observing/Conditions/GridCondition.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.asset b/Assets/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.asset similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.asset rename to Assets/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.asset diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.asset.meta b/Assets/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.asset.meta rename to Assets/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.asset.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.cs b/Assets/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.cs rename to Assets/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.cs diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.cs.meta b/Assets/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.cs.meta rename to Assets/FishNet/Runtime/Observing/Conditions/GridCondition/GridCondition.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition/HashGrid.cs b/Assets/FishNet/Runtime/Observing/Conditions/GridCondition/HashGrid.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition/HashGrid.cs rename to Assets/FishNet/Runtime/Observing/Conditions/GridCondition/HashGrid.cs diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition/HashGrid.cs.meta b/Assets/FishNet/Runtime/Observing/Conditions/GridCondition/HashGrid.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/GridCondition/HashGrid.cs.meta rename to Assets/FishNet/Runtime/Observing/Conditions/GridCondition/HashGrid.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/HostOnlyCondition.cs b/Assets/FishNet/Runtime/Observing/Conditions/HostOnlyCondition.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/HostOnlyCondition.cs rename to Assets/FishNet/Runtime/Observing/Conditions/HostOnlyCondition.cs diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/HostOnlyCondition.cs.meta b/Assets/FishNet/Runtime/Observing/Conditions/HostOnlyCondition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/HostOnlyCondition.cs.meta rename to Assets/FishNet/Runtime/Observing/Conditions/HostOnlyCondition.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/MatchCondition.cs b/Assets/FishNet/Runtime/Observing/Conditions/MatchCondition.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/MatchCondition.cs rename to Assets/FishNet/Runtime/Observing/Conditions/MatchCondition.cs diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/MatchCondition.cs.meta b/Assets/FishNet/Runtime/Observing/Conditions/MatchCondition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/MatchCondition.cs.meta rename to Assets/FishNet/Runtime/Observing/Conditions/MatchCondition.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/OwnerOnlyCondition.cs b/Assets/FishNet/Runtime/Observing/Conditions/OwnerOnlyCondition.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/OwnerOnlyCondition.cs rename to Assets/FishNet/Runtime/Observing/Conditions/OwnerOnlyCondition.cs diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/OwnerOnlyCondition.cs.meta b/Assets/FishNet/Runtime/Observing/Conditions/OwnerOnlyCondition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/OwnerOnlyCondition.cs.meta rename to Assets/FishNet/Runtime/Observing/Conditions/OwnerOnlyCondition.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/SceneCondition.cs b/Assets/FishNet/Runtime/Observing/Conditions/SceneCondition.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/SceneCondition.cs rename to Assets/FishNet/Runtime/Observing/Conditions/SceneCondition.cs diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/SceneCondition.cs.meta b/Assets/FishNet/Runtime/Observing/Conditions/SceneCondition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/SceneCondition.cs.meta rename to Assets/FishNet/Runtime/Observing/Conditions/SceneCondition.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects.meta b/Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects.meta rename to Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/DistanceCondition.asset b/Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/DistanceCondition.asset similarity index 91% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/DistanceCondition.asset rename to Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/DistanceCondition.asset index b84bce7..bfdf72c 100644 --- a/Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/DistanceCondition.asset +++ b/Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/DistanceCondition.asset @@ -13,5 +13,6 @@ MonoBehaviour: m_Name: DistanceCondition m_EditorClassIdentifier: NetworkObject: {fileID: 0} - _maximumDistance: 100 + _maximumDistance: 10 _hideDistancePercent: 0.1 + UpdateFrequency: 0 diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/DistanceCondition.asset.meta b/Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/DistanceCondition.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/DistanceCondition.asset.meta rename to Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/DistanceCondition.asset.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/HostOnlyCondition.asset b/Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/HostOnlyCondition.asset similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/HostOnlyCondition.asset rename to Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/HostOnlyCondition.asset diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/HostOnlyCondition.asset.meta b/Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/HostOnlyCondition.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/HostOnlyCondition.asset.meta rename to Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/HostOnlyCondition.asset.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/MatchCondition.asset b/Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/MatchCondition.asset similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/MatchCondition.asset rename to Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/MatchCondition.asset diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/MatchCondition.asset.meta b/Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/MatchCondition.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/MatchCondition.asset.meta rename to Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/MatchCondition.asset.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/OwnerOnlyCondition.asset b/Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/OwnerOnlyCondition.asset similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/OwnerOnlyCondition.asset rename to Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/OwnerOnlyCondition.asset diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/OwnerOnlyCondition.asset.meta b/Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/OwnerOnlyCondition.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/OwnerOnlyCondition.asset.meta rename to Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/OwnerOnlyCondition.asset.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/SceneCondition.asset b/Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/SceneCondition.asset similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/SceneCondition.asset rename to Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/SceneCondition.asset diff --git a/Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/SceneCondition.asset.meta b/Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/SceneCondition.asset.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/Conditions/ScriptableObjects/SceneCondition.asset.meta rename to Assets/FishNet/Runtime/Observing/Conditions/ScriptableObjects/SceneCondition.asset.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/HostVisibilityUpdateTypes.cs b/Assets/FishNet/Runtime/Observing/HostVisibilityUpdateTypes.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/HostVisibilityUpdateTypes.cs rename to Assets/FishNet/Runtime/Observing/HostVisibilityUpdateTypes.cs diff --git a/Assets/Packages/FishNet/Runtime/Observing/HostVisibilityUpdateTypes.cs.meta b/Assets/FishNet/Runtime/Observing/HostVisibilityUpdateTypes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/HostVisibilityUpdateTypes.cs.meta rename to Assets/FishNet/Runtime/Observing/HostVisibilityUpdateTypes.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/NetworkObserver.cs b/Assets/FishNet/Runtime/Observing/NetworkObserver.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/NetworkObserver.cs rename to Assets/FishNet/Runtime/Observing/NetworkObserver.cs diff --git a/Assets/Packages/FishNet/Runtime/Observing/NetworkObserver.cs.meta b/Assets/FishNet/Runtime/Observing/NetworkObserver.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/NetworkObserver.cs.meta rename to Assets/FishNet/Runtime/Observing/NetworkObserver.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/ObserverCondition.cs b/Assets/FishNet/Runtime/Observing/ObserverCondition.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/ObserverCondition.cs rename to Assets/FishNet/Runtime/Observing/ObserverCondition.cs diff --git a/Assets/Packages/FishNet/Runtime/Observing/ObserverCondition.cs.meta b/Assets/FishNet/Runtime/Observing/ObserverCondition.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/ObserverCondition.cs.meta rename to Assets/FishNet/Runtime/Observing/ObserverCondition.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/ObserverConditionType.cs b/Assets/FishNet/Runtime/Observing/ObserverConditionType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/ObserverConditionType.cs rename to Assets/FishNet/Runtime/Observing/ObserverConditionType.cs diff --git a/Assets/Packages/FishNet/Runtime/Observing/ObserverConditionType.cs.meta b/Assets/FishNet/Runtime/Observing/ObserverConditionType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/ObserverConditionType.cs.meta rename to Assets/FishNet/Runtime/Observing/ObserverConditionType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Observing/ObserverStateChange.cs b/Assets/FishNet/Runtime/Observing/ObserverStateChange.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/ObserverStateChange.cs rename to Assets/FishNet/Runtime/Observing/ObserverStateChange.cs diff --git a/Assets/Packages/FishNet/Runtime/Observing/ObserverStateChange.cs.meta b/Assets/FishNet/Runtime/Observing/ObserverStateChange.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Observing/ObserverStateChange.cs.meta rename to Assets/FishNet/Runtime/Observing/ObserverStateChange.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins.meta b/Assets/FishNet/Runtime/Plugins.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins.meta rename to Assets/FishNet/Runtime/Plugins.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis.meta b/Assets/FishNet/Runtime/Plugins/CodeAnalysis.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis.meta rename to Assets/FishNet/Runtime/Plugins/CodeAnalysis.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.Analyzers.dll b/Assets/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.Analyzers.dll similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.Analyzers.dll rename to Assets/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.Analyzers.dll diff --git a/Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.Analyzers.dll.meta b/Assets/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.Analyzers.dll.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.Analyzers.dll.meta rename to Assets/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.Analyzers.dll.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.dll b/Assets/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.dll similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.dll rename to Assets/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.dll diff --git a/Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.dll.meta b/Assets/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.dll.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.dll.meta rename to Assets/FishNet/Runtime/Plugins/CodeAnalysis/FishNet.CodeAnalysis.dll.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/LICENSE.txt b/Assets/FishNet/Runtime/Plugins/CodeAnalysis/LICENSE.txt similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/LICENSE.txt rename to Assets/FishNet/Runtime/Plugins/CodeAnalysis/LICENSE.txt diff --git a/Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/LICENSE.txt.meta b/Assets/FishNet/Runtime/Plugins/CodeAnalysis/LICENSE.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/LICENSE.txt.meta rename to Assets/FishNet/Runtime/Plugins/CodeAnalysis/LICENSE.txt.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/README.txt b/Assets/FishNet/Runtime/Plugins/CodeAnalysis/README.txt similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/README.txt rename to Assets/FishNet/Runtime/Plugins/CodeAnalysis/README.txt diff --git a/Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/README.txt.meta b/Assets/FishNet/Runtime/Plugins/CodeAnalysis/README.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/CodeAnalysis/README.txt.meta rename to Assets/FishNet/Runtime/Plugins/CodeAnalysis/README.txt.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback.meta b/Assets/FishNet/Runtime/Plugins/ColliderRollback.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback.meta rename to Assets/FishNet/Runtime/Plugins/ColliderRollback.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/LICENSE.txt b/Assets/FishNet/Runtime/Plugins/ColliderRollback/LICENSE.txt similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/LICENSE.txt rename to Assets/FishNet/Runtime/Plugins/ColliderRollback/LICENSE.txt diff --git a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/LICENSE.txt.meta b/Assets/FishNet/Runtime/Plugins/ColliderRollback/LICENSE.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/LICENSE.txt.meta rename to Assets/FishNet/Runtime/Plugins/ColliderRollback/LICENSE.txt.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts.meta b/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts.meta rename to Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts.meta diff --git a/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollback.cs b/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollback.cs new file mode 100644 index 0000000..e1904b5 --- /dev/null +++ b/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollback.cs @@ -0,0 +1,57 @@ +using FishNet.Managing; +using FishNet.Object; +using UnityEngine; + +namespace FishNet.Component.ColliderRollback +{ + + public class ColliderRollback : NetworkBehaviour + { + #region Types. + internal enum BoundingBoxType + { + /// + /// Disable this feature. + /// + Disabled, + /// + /// Manually specify the dimensions of a bounding box. + /// + Manual, + } + + #endregion + + #region Serialized. +#pragma warning disable CS0414 + /// + /// How to configure the bounding box check. + /// + [Tooltip("How to configure the bounding box check.")] + [SerializeField] + private BoundingBoxType _boundingBox = BoundingBoxType.Disabled; + /// + /// Physics type to generate a bounding box for. + /// + [Tooltip("Physics type to generate a bounding box for.")] + [SerializeField] + private RollbackPhysicsType _physicsType = RollbackPhysicsType.Physics; + /// + /// Size for the bounding box. This is only used when BoundingBox is set to Manual. + /// + [Tooltip("Size for the bounding box.. This is only used when BoundingBox is set to Manual.")] + [SerializeField] + private Vector3 _boundingBoxSize = new Vector3(3f, 3f, 3f); + /// + /// Objects holding colliders which can rollback. + /// + [Tooltip("Objects holding colliders which can rollback.")] + [SerializeField] + private GameObject[] _colliderParents = new GameObject[0]; +#pragma warning restore CS0414 + #endregion + + + } + +} diff --git a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollback.cs.meta b/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollback.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollback.cs.meta rename to Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollback.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollbackEditor.cs b/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollbackEditor.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollbackEditor.cs rename to Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollbackEditor.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollbackEditor.cs.meta b/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollbackEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollbackEditor.cs.meta rename to Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollbackEditor.cs.meta diff --git a/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackManager.cs b/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackManager.cs new file mode 100644 index 0000000..05e9425 --- /dev/null +++ b/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackManager.cs @@ -0,0 +1,192 @@ +using FishNet.Connection; +using FishNet.Managing; +using FishNet.Managing.Scened; +using FishNet.Managing.Timing; +using FishNet.Transporting; +using GameKit.Dependencies.Utilities; +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using UnityEngine; +using UnityEngine.SceneManagement; + +namespace FishNet.Component.ColliderRollback +{ + public class RollbackManager : MonoBehaviour + { + #region Internal. + /// + /// Cached value for bounding box layermask. + /// + internal int? BoundingBoxLayerNumber + { + get + { + if (_boundingBoxLayerNumber == null) + { + for (int i = 0; i < 32; i++) + { + if ((1 << i) == BoundingBoxLayer.value) + { + _boundingBoxLayerNumber = i; + break; + } + } + } + + return _boundingBoxLayerNumber; + } + } + private int? _boundingBoxLayerNumber; + #endregion + + #region Serialized. + /// + /// + /// + [Tooltip("Layer to use when creating and checking against bounding boxes. This should be different from any layer used.")] + [SerializeField] + private LayerMask _boundingBoxLayer = 0; + /// + /// Layer to use when creating and checking against bounding boxes. This should be different from any layer used. + /// + internal LayerMask BoundingBoxLayer => _boundingBoxLayer; + /// + /// + /// + [Tooltip("Maximum time in the past colliders can be rolled back to.")] + [SerializeField] + private float _maximumRollbackTime = 1.25f; + /// + /// Maximum time in the past colliders can be rolled back to. + /// + internal float MaximumRollbackTime => _maximumRollbackTime; + /// + /// + /// + [Tooltip("Interpolation value for the NetworkTransforms or objects being rolled back.")] + [Range(0, 250)] + [SerializeField] + internal ushort Interpolation = 2; + #endregion + + + + + + /// + /// Initializes this script for use. + /// + /// + internal void InitializeOnce_Internal(NetworkManager manager) + { + + } + + + + + + + /// + /// Rolls back all colliders. + /// + /// Precise tick received from the client. + /// Type of physics to rollback; this is often what your casts will use. + /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. + public void Rollback(PreciseTick pt, RollbackPhysicsType physicsType, bool asOwnerAndClientHost = false) + { + + } + + + /// + /// Rolls back all colliders. + /// + /// Precise tick received from the client. + /// Type of physics to rollback; this is often what your casts will use. + /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Rollback(Scene scene, PreciseTick pt, RollbackPhysicsType physicsType, bool asOwnerAndClientHost = false) + { + + } + /// + /// Rolls back all colliders. + /// + /// Precise tick received from the client. + /// Type of physics to rollback; this is often what your casts will use. + /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. + public void Rollback(int sceneHandle, PreciseTick pt, RollbackPhysicsType physicsType, bool asOwnerAndClientHost = false) + { + + } + + + /// + /// Rolls back all 3d colliders hit by a test cast against bounding boxes. + /// + /// Ray origin. + /// Direction to cast. + /// Distance of cast. + /// Precise tick received from the client. + /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. + public void Rollback(Vector3 origin, Vector3 normalizedDirection, float distance, PreciseTick pt, bool asOwnerAndClientHost = false) + { + + } + + /// + /// Rolls back all 3d colliders hit by a test cast against bounding boxes. + /// + /// Ray origin. + /// Direction to cast. + /// Distance of cast. + /// Precise tick received from the client. + /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Rollback(Scene scene, Vector3 origin, Vector3 normalizedDirection, float distance, PreciseTick pt, bool asOwnerAndClientHost = false) + { + + } + /// + /// Rolls back all 3d colliders hit by a test cast against bounding boxes. + /// + /// Ray origin. + /// Direction to cast. + /// Distance of cast. + /// Precise tick received from the client. + /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. + public void Rollback(int sceneHandle, Vector3 origin, Vector3 normalizedDirection, float distance, PreciseTick pt, bool asOwnerAndClientHost = false) + { + + } + + /// + /// Rolls back all 3d colliders hit by a test cast against bounding boxes. + /// + /// Ray origin. + /// Direction to cast. + /// Distance of cast. + /// Precise tick received from the client. + /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. + public void Rollback(Vector2 origin, Vector2 normalizedDirection, float distance, PreciseTick pt, bool asOwnerAndClientHost = false) + { + + } + + + + + /// + /// Returns all ColliderRollback objects back to their original position. + /// + public void Return() + { + + } + + + } + +} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackManager.cs.meta b/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackManager.cs.meta rename to Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackManager.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackPhysicsType.cs b/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackPhysicsType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackPhysicsType.cs rename to Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackPhysicsType.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackPhysicsType.cs.meta b/Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackPhysicsType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackPhysicsType.cs.meta rename to Assets/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackPhysicsType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit.meta b/Assets/FishNet/Runtime/Plugins/GameKit.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit.meta rename to Assets/FishNet/Runtime/Plugins/GameKit.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/GameKit.Dependencies.asmdef b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/GameKit.Dependencies.asmdef similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/GameKit.Dependencies.asmdef rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/GameKit.Dependencies.asmdef diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/GameKit.Dependencies.asmdef.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/GameKit.Dependencies.asmdef.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/GameKit.Dependencies.asmdef.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/GameKit.Dependencies.asmdef.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/EditorOverride.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/EditorOverride.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/EditorOverride.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/EditorOverride.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/EditorOverride.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/EditorOverride.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/EditorOverride.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/EditorOverride.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus on-5718.png b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus on-5718.png similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus on-5718.png rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus on-5718.png diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus on-5718.png.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus on-5718.png.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus on-5718.png.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus on-5718.png.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus-6510.png b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus-6510.png similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus-6510.png rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus-6510.png diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus-6510.png.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus-6510.png.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus-6510.png.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/Editor/Resources/IN foldout focus-6510.png.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/GroupAttribute.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/GroupAttribute.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/GroupAttribute.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/GroupAttribute.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/GroupAttribute.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/GroupAttribute.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/GroupAttribute.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/Group/GroupAttribute.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/Editor.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/Editor.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/Editor/ShowIfProperty.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/Editor/ShowIfProperty.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/Editor/ShowIfProperty.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/Editor/ShowIfProperty.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/Editor/ShowIfProperty.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/Editor/ShowIfProperty.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/Editor/ShowIfProperty.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/Editor/ShowIfProperty.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/ShowIfAttribute.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/ShowIfAttribute.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/ShowIfAttribute.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/ShowIfAttribute.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/ShowIfAttribute.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/ShowIfAttribute.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/ShowIfAttribute.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Inspectors/ShowIf/ShowIfAttribute.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ApplicationState.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ApplicationState.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ApplicationState.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ApplicationState.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ApplicationState.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ApplicationState.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ApplicationState.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ApplicationState.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Arrays.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Arrays.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Arrays.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Arrays.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Arrays.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Arrays.cs.meta similarity index 93% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Arrays.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Arrays.cs.meta index ac4a928..94f6ccf 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Arrays.cs.meta +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Arrays.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 1b93eae9ff81b3e4b892128ca4b392ed timeCreated: 1530140103 -licenseType: Free +licenseType: Store MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Bools.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Bools.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Bools.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Bools.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Bools.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Bools.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Bools.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Bools.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/CanvasGroups.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/CanvasGroups.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/CanvasGroups.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/CanvasGroups.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/CanvasGroups.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/CanvasGroups.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/CanvasGroups.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/CanvasGroups.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Colliders.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Colliders.cs similarity index 65% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Colliders.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Colliders.cs index eaa0087..fec81a9 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Colliders.cs +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Colliders.cs @@ -3,10 +3,9 @@ namespace GameKit.Dependencies.Utilities { - - public static class ColliderExtensions + public static class ColliderExtensions { - public static void GetBoxCastParams(this BoxCollider boxCollider, out Vector3 center, out Vector3 halfExtents) + public static void GetBoxOverlapParams(this BoxCollider boxCollider, out Vector3 center, out Vector3 halfExtents) { Transform cachedTransform = boxCollider.transform; @@ -98,7 +97,7 @@ public static void GetCapsuleCastParams(this CapsuleCollider capsuleCollider, ou point2 = new Vector3(x2, y2, z2); } - public static void GetSphereCastParams(this SphereCollider sphereCollider, out Vector3 center, out float radius) + public static void GetSphereOverlapParams(this SphereCollider sphereCollider, out Vector3 center, out float radius) { Transform cachedTransform = sphereCollider.transform; @@ -118,4 +117,46 @@ public static void GetSphereCastParams(this SphereCollider sphereCollider, out V } } + + public static class Collider2DExtensions + { + public static void GetBox2DOverlapParams(this BoxCollider2D boxCollider, out Vector3 center, out Vector3 halfExtents) + { + Transform cachedTransform = boxCollider.transform; + + // DO NOT USE UNITY'S VECTOR OPERATIONS IN HOT PATHS, UNITY DOESN'T OPTIMISE THEM + + center = cachedTransform.TransformPoint(boxCollider.offset); + + Vector3 lossyScale = cachedTransform.lossyScale; + + Vector3 size = boxCollider.size; + + float x = size.x * 0.5f * lossyScale.x; + float y = size.y * 0.5f * lossyScale.y; + float z = size.z * 0.5f * lossyScale.z; + + halfExtents = new Vector3(x, y, z); + } + + public static void GetCircleOverlapParams(this CircleCollider2D circleCollider, out Vector3 center, out float radius) + { + Transform cachedTransform = circleCollider.transform; + Vector3 offset = new Vector3(circleCollider.offset.x, circleCollider.offset.y, circleCollider.transform.position.z); + center = cachedTransform.TransformPoint(offset); + + Vector3 lossyScale = cachedTransform.lossyScale; + + // Use System.Math instead of UnityEngine.Mathf because it's much faster. + + float x = Math.Abs(lossyScale.x); + float y = Math.Abs(lossyScale.y); + float z = Math.Abs(lossyScale.z); + + // Two calls of Math.Max are faster than a single Mathf.Max call because Math.Max doesn't allocate memory and doesn't use loops. + + radius = circleCollider.radius * Math.Max(Math.Max(x, y), z); + } + } + } \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Colliders.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Colliders.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Colliders.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Colliders.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Dictionaries.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Dictionaries.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Dictionaries.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Dictionaries.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Dictionaries.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Dictionaries.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Dictionaries.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Dictionaries.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Disks.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Disks.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Disks.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Disks.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Disks.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Disks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Disks.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Disks.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Editing.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Editing.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Editing.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Editing.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Editing.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Editing.cs.meta similarity index 93% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Editing.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Editing.cs.meta index 77204fd..8f7a83a 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Editing.cs.meta +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Editing.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: dd42f76391fc1254f82767dbf1a4bc8b timeCreated: 1525378031 -licenseType: Free +licenseType: Store MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Enums.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Enums.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Enums.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Enums.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Enums.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Enums.cs.meta similarity index 93% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Enums.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Enums.cs.meta index 0f5f864..7535a86 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Enums.cs.meta +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Enums.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: e6c66aec505f9254491b2b126a2d4745 timeCreated: 1522959833 -licenseType: Free +licenseType: Store MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Floats.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Floats.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Floats.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Floats.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Floats.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Floats.cs.meta similarity index 93% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Floats.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Floats.cs.meta index 16f76aa..aec5456 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Floats.cs.meta +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Floats.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 4ab517aa5c3b6e34ca20461339adda04 timeCreated: 1526172456 -licenseType: Free +licenseType: Store MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Hashing.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Hashing.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Hashing.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Hashing.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Hashing.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Hashing.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Hashing.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Hashing.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Ints.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Ints.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Ints.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Ints.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Ints.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Ints.cs.meta similarity index 93% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Ints.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Ints.cs.meta index a3ce1e3..1573629 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Ints.cs.meta +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Ints.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: c673118198f5c4b41986d52762828363 timeCreated: 1527268448 -licenseType: Free +licenseType: Store MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Layers.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Layers.cs new file mode 100644 index 0000000..0238f71 --- /dev/null +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Layers.cs @@ -0,0 +1,107 @@ +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using UnityEngine; + +namespace GameKit.Dependencies.Utilities +{ + + public static class Layers + { + /* GetInteractableLayer methods is an implementation from this + * link: https://forum.unity.com/threads/is-there-a-way-to-get-the-layer-collision-matrix.260744/#post-3483886 */ + /// + /// Lookup of interactable layers for each layer. + /// + private static Dictionary _interactablesLayers; + + /// + /// Tries to initializes InteractableLayers. + /// + private static void TryInitializeInteractableLayers() + { + if (_interactablesLayers != null) + return; + + _interactablesLayers = new Dictionary(); + for (int i = 0; i < 32; i++) + { + int mask = 0; + for (int j = 0; j < 32; j++) + { + if (!Physics.GetIgnoreLayerCollision(i, j)) + { + mask |= 1 << j; + } + } + //Setting without add check is quicker. + _interactablesLayers[i] = mask; + } + } + + /// + /// Returns interactable layers value for layer. + /// + public static int GetInteractableLayersValue(int layer) + { + TryInitializeInteractableLayers(); + return _interactablesLayers[layer]; + } + + /// + /// Returns interactable layers LayerMask for a GameObject. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static LayerMask GetInteractableLayersMask(int layer) => (LayerMask)GetInteractableLayersValue(layer); + + + /// + /// Returns interactable layers value for a GameObject. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetInteractableLayersValue(GameObject go) => GetInteractableLayersValue(go.layer); + + /// + /// Returns interactable layers LayerMask for a GameObject. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static LayerMask GetInteractableLayersMask(GameObject go) => (LayerMask)GetInteractableLayersValue(go.layer); + + + /// + /// Converts a layer mask to a layer number. + /// + /// + /// + public static int LayerMaskToLayerNumber(LayerMask mask) + { + return LayerValueToLayerNumber(mask.value); + } + /// + /// Converts a layer value int to a layer int. + /// + /// + /// + public static int LayerValueToLayerNumber(int bitmask) + { + int result = bitmask > 0 ? 0 : 31; + while (bitmask > 1) + { + bitmask = bitmask >> 1; + result++; + } + return result; + } + + /// + /// Returns if a LayerMask contains a specified layer. + /// + /// LayerMask to check for layer in. + /// Layer to check within LayerMask. + /// + public static bool ContainsLayer(LayerMask layerMask, int layer) + { + return (layerMask == (layerMask | (1 << layer))); + } + } + +} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Layers.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Layers.cs.meta similarity index 93% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Layers.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Layers.cs.meta index 0f2c1d6..42487b2 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Layers.cs.meta +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Layers.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 1c18e15e44d21a94d8919f4b6b125a1f timeCreated: 1522349045 -licenseType: Free +licenseType: Store MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/LayoutGroups.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/LayoutGroups.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/LayoutGroups.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/LayoutGroups.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/LayoutGroups.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/LayoutGroups.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/LayoutGroups.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/LayoutGroups.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Materials.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Materials.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Materials.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Materials.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Materials.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Materials.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Materials.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Materials.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Maths.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Maths.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Maths.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Maths.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Maths.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Maths.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Maths.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Maths.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ObjectCaching.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ObjectCaching.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ObjectCaching.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ObjectCaching.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ObjectCaching.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ObjectCaching.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ObjectCaching.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/ObjectCaching.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Objects.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Objects.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Objects.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Objects.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Objects.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Objects.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Objects.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Objects.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Particles.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Particles.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Particles.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Particles.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Particles.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Particles.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Particles.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Particles.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Quaternions.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Quaternions.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Quaternions.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Quaternions.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Quaternions.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Quaternions.cs.meta similarity index 93% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Quaternions.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Quaternions.cs.meta index 22d6bf3..2379b4b 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Quaternions.cs.meta +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Quaternions.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 02a9084f4f788cd4293cdff56a49b5dd timeCreated: 1522043602 -licenseType: Free +licenseType: Store MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Strings.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Strings.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Strings.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Strings.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Strings.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Strings.cs.meta similarity index 93% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Strings.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Strings.cs.meta index 15ce9e2..60a10a7 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Strings.cs.meta +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Strings.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: b396f2be4de550a4e92b552650311600 timeCreated: 1525378031 -licenseType: Free +licenseType: Store MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Transforms.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Transforms.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Transforms.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Transforms.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Transforms.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Transforms.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Transforms.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Transforms.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/CanvasGroupFader.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/CanvasGroupFader.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/CanvasGroupFader.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/CanvasGroupFader.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/CanvasGroupFader.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/CanvasGroupFader.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/CanvasGroupFader.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/CanvasGroupFader.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ButtonData.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ButtonData.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ButtonData.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ButtonData.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ButtonData.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ButtonData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ButtonData.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ButtonData.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/CanvasTracker.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/CanvasTracker.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/CanvasTracker.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/CanvasTracker.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/CanvasTracker.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/CanvasTracker.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/CanvasTracker.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/CanvasTracker.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingContainer.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingContainer.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingContainer.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingContainer.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingContainer.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingContainer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingContainer.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingContainer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingImage.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingImage.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingImage.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingImage.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingImage.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingImage.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingImage.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingImage.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingOptions.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingOptions.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingOptions.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingOptions.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingOptions.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingOptions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingOptions.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/FloatingOptions.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageButtonData.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageButtonData.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageButtonData.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageButtonData.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageButtonData.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageButtonData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageButtonData.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageButtonData.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageOptionButton.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageOptionButton.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageOptionButton.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageOptionButton.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageOptionButton.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageOptionButton.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageOptionButton.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ImageOptionButton.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/OptionButton.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/OptionButton.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/OptionButton.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/OptionButton.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/OptionButton.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/OptionButton.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/OptionButton.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/OptionButton.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/RectTransformResizer.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/RectTransformResizer.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/RectTransformResizer.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/RectTransformResizer.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/RectTransformResizer.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/RectTransformResizer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/RectTransformResizer.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/RectTransformResizer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ResizableContainer.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ResizableContainer.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ResizableContainer.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ResizableContainer.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ResizableContainer.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ResizableContainer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ResizableContainer.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Canvases/ResizableContainer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/DDOL.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/DDOL.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/DDOL.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/DDOL.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/DDOL.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/DDOL.cs.meta similarity index 93% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/DDOL.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/DDOL.cs.meta index aa6dc70..81ff1f3 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/DDOL.cs.meta +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/DDOL.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 4e0b25628cfd4f241a22a7c0ee2b932f timeCreated: 1528404670 -licenseType: Free +licenseType: Store MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Editor.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Editor.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Editor/SceneDrawer.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Editor/SceneDrawer.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Editor/SceneDrawer.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Editor/SceneDrawer.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Editor/SceneDrawer.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Editor/SceneDrawer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Editor/SceneDrawer.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Editor/SceneDrawer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange2D.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange2D.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange2D.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange2D.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange2D.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange2D.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange2D.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/FloatRange2D.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/IntRange.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/IntRange.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/IntRange.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/IntRange.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/IntRange.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/IntRange.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/IntRange.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/IntRange.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/CHANGELOG.txt b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/CHANGELOG.txt similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/CHANGELOG.txt rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/CHANGELOG.txt diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/CHANGELOG.txt.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/CHANGELOG.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/CHANGELOG.txt.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/CHANGELOG.txt.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Prefabs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Prefabs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Prefabs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Prefabs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Prefabs/Projectile.prefab b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Prefabs/Projectile.prefab similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Prefabs/Projectile.prefab rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Prefabs/Projectile.prefab diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Prefabs/Projectile.prefab.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Prefabs/Projectile.prefab.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Prefabs/Projectile.prefab.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Prefabs/Projectile.prefab.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scenes.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scenes.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scenes.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scenes.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scenes/ObjectPool.unity b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scenes/ObjectPool.unity similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scenes/ObjectPool.unity rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scenes/ObjectPool.unity diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scenes/ObjectPool.unity.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scenes/ObjectPool.unity.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scenes/ObjectPool.unity.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scenes/ObjectPool.unity.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/Projectile.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/Projectile.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/Projectile.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/Projectile.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/Projectile.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/Projectile.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/Projectile.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/Projectile.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/ProjectileSpawner.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/ProjectileSpawner.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/ProjectileSpawner.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/ProjectileSpawner.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/ProjectileSpawner.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/ProjectileSpawner.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/ProjectileSpawner.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Demo/Scripts/ProjectileSpawner.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/README.txt b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/README.txt similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/README.txt rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/README.txt diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/README.txt.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/README.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/README.txt.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/README.txt.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ListStack.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ListStack.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ListStack.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ListStack.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ListStack.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ListStack.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ListStack.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ListStack.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ObjectPool.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ObjectPool.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ObjectPool.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ObjectPool.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ObjectPool.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ObjectPool.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ObjectPool.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/ObjectPool.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/PoolData.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/PoolData.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/PoolData.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/PoolData.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/PoolData.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/PoolData.cs.meta similarity index 93% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/PoolData.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/PoolData.cs.meta index ea2ee93..5f6f831 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/PoolData.cs.meta +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ObjectPooling/Scripts/PoolData.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: f8b47752cc2784843b70d83bf47de090 timeCreated: 1522106622 -licenseType: Free +licenseType: Store MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ResettableRingBuffer.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ResettableRingBuffer.cs similarity index 98% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ResettableRingBuffer.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ResettableRingBuffer.cs index 1adfdd4..b1e245b 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ResettableRingBuffer.cs +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ResettableRingBuffer.cs @@ -222,11 +222,14 @@ public void Initialize(int capacity) /// public void Clear() { - for (int i = 0; i < Capacity; i++) + if (Collection != null) { - if (i < _written) - Collection[i].ResetState(); - Collection[i] = default; + for (int i = 0; i < Capacity; i++) + { + if (i < _written) + Collection[i].ResetState(); + Collection[i] = default; + } } _written = 0; diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ResettableRingBuffer.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ResettableRingBuffer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ResettableRingBuffer.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ResettableRingBuffer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/RingBuffer.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/RingBuffer.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/RingBuffer.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/RingBuffer.cs index f970ef6..626e3cd 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/RingBuffer.cs +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/RingBuffer.cs @@ -812,7 +812,7 @@ public void RemoveRange(bool fromStart, int length) //Full reset if value is at or more than written. if (length >= _written) { - Clear(); + Reset(); return; } diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/RingBuffer.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/RingBuffer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/RingBuffer.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/RingBuffer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SceneAttribute.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SceneAttribute.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SceneAttribute.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SceneAttribute.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SceneAttribute.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SceneAttribute.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SceneAttribute.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SceneAttribute.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ScrollbarValueSetter.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ScrollbarValueSetter.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ScrollbarValueSetter.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ScrollbarValueSetter.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ScrollbarValueSetter.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ScrollbarValueSetter.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ScrollbarValueSetter.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/ScrollbarValueSetter.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SingletonScriptableObject.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SingletonScriptableObject.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SingletonScriptableObject.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SingletonScriptableObject.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SingletonScriptableObject.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SingletonScriptableObject.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SingletonScriptableObject.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/SingletonScriptableObject.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/TimedOperation.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/TimedOperation.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/TimedOperation.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/TimedOperation.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/TimedOperation.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/TimedOperation.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/TimedOperation.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/TimedOperation.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Vector2Range.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Vector2Range.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Vector2Range.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Vector2Range.cs diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Vector2Range.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Vector2Range.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Vector2Range.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Types/Vector2Range.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Vectors.cs b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Vectors.cs similarity index 97% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Vectors.cs rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Vectors.cs index a45bc6c..7db156d 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Vectors.cs +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Vectors.cs @@ -20,13 +20,13 @@ public static class Vectors /// /// Returns how fast an object must move over duration to reach goal. /// - /// Vector3 to measure distance against. + /// Vector3 to measure distance against. /// How long it should take to move to goal. /// A multiplier applied towards interval. Typically this is used for ticks passed. /// - public static float GetRate(this Vector3 a, Vector3 goal, float duration, out float distance, uint interval = 1) + public static float GetRate(this Vector3 a, Vector3 b, float duration, out float distance, uint interval = 1) { - distance = Vector3.Distance(a, goal); + distance = Vector3.Distance(a, b); return distance / (duration * interval); } /// diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Vectors.cs.meta b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Vectors.cs.meta similarity index 93% rename from Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Vectors.cs.meta rename to Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Vectors.cs.meta index 754abb5..6f59c68 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Vectors.cs.meta +++ b/Assets/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Vectors.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 6bf25d6d9fa7a754b85a60006db774c4 timeCreated: 1522043602 -licenseType: Free +licenseType: Store MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak.meta b/Assets/FishNet/Runtime/Plugins/Yak.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak.meta rename to Assets/FishNet/Runtime/Plugins/Yak.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/CHANGELOG.txt b/Assets/FishNet/Runtime/Plugins/Yak/CHANGELOG.txt similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak/CHANGELOG.txt rename to Assets/FishNet/Runtime/Plugins/Yak/CHANGELOG.txt diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/CHANGELOG.txt.meta b/Assets/FishNet/Runtime/Plugins/Yak/CHANGELOG.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak/CHANGELOG.txt.meta rename to Assets/FishNet/Runtime/Plugins/Yak/CHANGELOG.txt.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core.meta b/Assets/FishNet/Runtime/Plugins/Yak/Core.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak/Core.meta rename to Assets/FishNet/Runtime/Plugins/Yak/Core.meta diff --git a/Assets/FishNet/Runtime/Plugins/Yak/Core/ClientSocket.cs b/Assets/FishNet/Runtime/Plugins/Yak/Core/ClientSocket.cs new file mode 100644 index 0000000..defe925 --- /dev/null +++ b/Assets/FishNet/Runtime/Plugins/Yak/Core/ClientSocket.cs @@ -0,0 +1,57 @@ +using FishNet.Transporting.Yak.Server; +using System; +using System.Collections.Generic; + +namespace FishNet.Transporting.Yak.Client +{ + /// + /// Creates a fake client connection to interact with the ServerSocket. + /// + public class ClientSocket : CommonSocket + { + #region Private. + /// + /// Socket for the server. + /// + private ServerSocket _server; + /// + /// Incomimg data. + /// + private Queue _incoming = new Queue(); + #endregion + + + + /// + /// Starts the client connection. + /// + internal bool StartConnection() + { + + return true; + } + + + + /// + /// Stops the local socket. + /// + internal bool StopConnection() + { + + return true; + } + + + + + + + + #region Local server. + + #endregion + + + } +} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/ClientSocket.cs.meta b/Assets/FishNet/Runtime/Plugins/Yak/Core/ClientSocket.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/ClientSocket.cs.meta rename to Assets/FishNet/Runtime/Plugins/Yak/Core/ClientSocket.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/CommonSocket.cs b/Assets/FishNet/Runtime/Plugins/Yak/Core/CommonSocket.cs similarity index 55% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/CommonSocket.cs rename to Assets/FishNet/Runtime/Plugins/Yak/Core/CommonSocket.cs index 338952e..0cb5e5a 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/CommonSocket.cs +++ b/Assets/FishNet/Runtime/Plugins/Yak/Core/CommonSocket.cs @@ -1,5 +1,3 @@ -//PROSTART -using FishNet.Transporting; using System.Collections.Generic; namespace FishNet.Transporting.Yak @@ -21,23 +19,8 @@ internal LocalConnectionState GetLocalConnectionState() { return _connectionState; } - /// - /// Sets a new connection state. - /// - /// - protected virtual void SetLocalConnectionState(LocalConnectionState connectionState, bool server) - { - //If state hasn't changed. - if (connectionState == _connectionState) - return; - _connectionState = connectionState; - - if (server) - Transport.HandleServerConnectionState(new ServerConnectionStateArgs(connectionState, Transport.Index)); - else - Transport.HandleClientConnectionState(new ClientConnectionStateArgs(connectionState, Transport.Index)); - } + #endregion #region Protected. @@ -60,13 +43,8 @@ internal virtual void Initialize(Transport t, CommonSocket socket) /// internal void ClearQueue(ref Queue queue) { - while (queue.Count > 0) - { - LocalPacket lp = queue.Dequeue(); - lp.Dispose(); - } + } } } -//PROEND \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/CommonSocket.cs.meta b/Assets/FishNet/Runtime/Plugins/Yak/Core/CommonSocket.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/CommonSocket.cs.meta rename to Assets/FishNet/Runtime/Plugins/Yak/Core/CommonSocket.cs.meta diff --git a/Assets/FishNet/Runtime/Plugins/Yak/Core/LocalPacket.cs b/Assets/FishNet/Runtime/Plugins/Yak/Core/LocalPacket.cs new file mode 100644 index 0000000..9059f08 --- /dev/null +++ b/Assets/FishNet/Runtime/Plugins/Yak/Core/LocalPacket.cs @@ -0,0 +1,11 @@ +using FishNet.Utility.Performance; +using System; + +namespace FishNet.Transporting.Yak +{ + internal struct LocalPacket + { + + } + +} diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/LocalPacket.cs.meta b/Assets/FishNet/Runtime/Plugins/Yak/Core/LocalPacket.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/LocalPacket.cs.meta rename to Assets/FishNet/Runtime/Plugins/Yak/Core/LocalPacket.cs.meta diff --git a/Assets/FishNet/Runtime/Plugins/Yak/Core/ServerSocket.cs b/Assets/FishNet/Runtime/Plugins/Yak/Core/ServerSocket.cs new file mode 100644 index 0000000..8eec06e --- /dev/null +++ b/Assets/FishNet/Runtime/Plugins/Yak/Core/ServerSocket.cs @@ -0,0 +1,83 @@ +using FishNet.Connection; +using FishNet.Transporting.Yak.Client; +using System; +using System.Collections.Generic; + +namespace FishNet.Transporting.Yak.Server +{ + /// + /// Creates a fake socket acting as server. + /// + public class ServerSocket : CommonSocket + { + #region Public. + /// + /// Gets the current ConnectionState of a remote client on the server. + /// + /// ConnectionId to get ConnectionState for. + internal RemoteConnectionState GetConnectionState(int connectionId) + { + if (connectionId != NetworkConnection.SIMULATED_CLIENTID_VALUE) + return RemoteConnectionState.Stopped; + + LocalConnectionState state = _client.GetLocalConnectionState(); + return (state == LocalConnectionState.Started) ? RemoteConnectionState.Started : + RemoteConnectionState.Stopped; + } + #endregion + + #region Private. + /// + /// Packets received from local client. + /// + private Queue _incoming = new Queue(); + /// + /// Socket for client. + /// + private ClientSocket _client; + #endregion + + + + /// + /// Starts the server. + /// + internal bool StartConnection() + { + + return true; + } + + + + + /// + /// Stops the local socket. + /// + internal bool StopConnection() + { + + return true; + } + + /// + /// Stops a remote client from the server, disconnecting the client. + /// + /// ConnectionId of the client to disconnect. + internal bool StopConnection(int connectionId) + { + + return true; + } + + + + + + #region Local client. + + + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/ServerSocket.cs.meta b/Assets/FishNet/Runtime/Plugins/Yak/Core/ServerSocket.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/ServerSocket.cs.meta rename to Assets/FishNet/Runtime/Plugins/Yak/Core/ServerSocket.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/VERSION.txt b/Assets/FishNet/Runtime/Plugins/Yak/VERSION.txt similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak/VERSION.txt rename to Assets/FishNet/Runtime/Plugins/Yak/VERSION.txt diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/VERSION.txt.meta b/Assets/FishNet/Runtime/Plugins/Yak/VERSION.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak/VERSION.txt.meta rename to Assets/FishNet/Runtime/Plugins/Yak/VERSION.txt.meta diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Yak.cs b/Assets/FishNet/Runtime/Plugins/Yak/Yak.cs similarity index 86% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak/Yak.cs rename to Assets/FishNet/Runtime/Plugins/Yak/Yak.cs index f3193af..f40561d 100644 --- a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Yak.cs +++ b/Assets/FishNet/Runtime/Plugins/Yak/Yak.cs @@ -1,6 +1,5 @@ -//PROSTART +using FishNet.Connection; using FishNet.Managing; -using FishNet.Managing.Logging; using System; using UnityEngine; @@ -22,26 +21,19 @@ public class Yak : Transport #region Const. /// - /// Id to use for client when acting as host. + /// Maximum packet size for this transport. /// - internal const int CLIENT_HOST_ID = short.MaxValue; private const int MTU = 5000; #endregion public override void Initialize(NetworkManager networkManager, int transportIndex) { - base.Initialize(networkManager, transportIndex); - - _client = new Client.ClientSocket(); - _server = new Server.ServerSocket(); - - _client.Initialize(this, _server); - _server.Initialize(this, _client); + } private void OnDestroy() { - Shutdown(); + } #region ConnectionStates. @@ -54,6 +46,7 @@ public override string GetConnectionAddress(int connectionId) { return String.Empty; } +#pragma warning disable CS0067 /// /// Called when a connection state changes for the local client. /// @@ -66,6 +59,7 @@ public override string GetConnectionAddress(int connectionId) /// Called when a connection state changes for a remote client. /// public override event Action OnRemoteConnectionState; +#pragma warning restore CS0067 /// /// Gets the current local ConnectionState. /// @@ -91,7 +85,7 @@ public override RemoteConnectionState GetConnectionState(int connectionId) /// public override void HandleClientConnectionState(ClientConnectionStateArgs connectionStateArgs) { - OnClientConnectionState?.Invoke(connectionStateArgs); + } /// /// Handles a ConnectionStateArgs for the local server. @@ -99,7 +93,7 @@ public override void HandleClientConnectionState(ClientConnectionStateArgs conne /// public override void HandleServerConnectionState(ServerConnectionStateArgs connectionStateArgs) { - OnServerConnectionState?.Invoke(connectionStateArgs); + } /// /// Handles a ConnectionStateArgs for a remote client. @@ -107,7 +101,7 @@ public override void HandleServerConnectionState(ServerConnectionStateArgs conne /// public override void HandleRemoteConnectionState(RemoteConnectionStateArgs connectionStateArgs) { - OnRemoteConnectionState?.Invoke(connectionStateArgs); + } #endregion @@ -118,10 +112,7 @@ public override void HandleRemoteConnectionState(RemoteConnectionStateArgs conne /// True to process data received on the server. public override void IterateIncoming(bool server) { - if (server) - _server.IterateIncoming(); - else - _client.IterateIncoming(); + } /// @@ -166,7 +157,7 @@ public override void HandleServerReceivedDataArgs(ServerReceivedDataArgs receive /// /// Data to send. public override void SendToServer(byte channelId, ArraySegment segment) { - _client.SendToServer(channelId, segment); + } /// /// Sends data to a client. @@ -176,7 +167,7 @@ public override void SendToServer(byte channelId, ArraySegment segment) /// public override void SendToClient(byte channelId, ArraySegment segment, int connectionId) { - _server.SendToClient(channelId, segment, connectionId); + } #endregion @@ -192,7 +183,7 @@ public override void SendToClient(byte channelId, ArraySegment segment, in /// public override int GetMaximumClients() { - return short.MaxValue; + return NetworkConnection.MAXIMUM_CLIENTID_WITHOUT_SIMULATED_VALUE; } /// /// Sets maximum number of clients allowed to connect to the server. If applied at runtime and clients exceed this value existing clients will stay connected but new clients may not connect. @@ -256,9 +247,7 @@ public override bool StopConnection(int connectionId, bool immediately) /// public override void Shutdown() { - //Stops client then server connections. - StopConnection(false); - StopConnection(true); + } #region Privates. @@ -268,11 +257,7 @@ public override void Shutdown() /// True if there were no blocks. A true response does not promise a socket will or has connected. private bool StartServer() { - if (_server.GetLocalConnectionState() != LocalConnectionState.Stopped) - { - NetworkManager.LogError("Server is already running."); - return false; - } + bool result = _server.StartConnection(); @@ -284,9 +269,7 @@ private bool StartServer() /// private bool StopServer() { - if (_server != null) - return _server.StopConnection(); - + return false; } @@ -297,13 +280,7 @@ private bool StopServer() /// True if there were no blocks. A true response does not promise a socket will or has connected. private bool StartClient() { - if (_client.GetLocalConnectionState() != LocalConnectionState.Stopped) - { - NetworkManager.LogError("Client is already running."); - return false; - } - - _client.StartConnection(); + return true; } @@ -312,8 +289,7 @@ private bool StartClient() /// private bool StopClient() { - if (_client != null) - return _client.StopConnection(); + return false; } @@ -343,5 +319,4 @@ public override int GetMTU(byte channel) #endregion } -} -//PROEND \ No newline at end of file +} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Yak.cs.meta b/Assets/FishNet/Runtime/Plugins/Yak/Yak.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Plugins/Yak/Yak.cs.meta rename to Assets/FishNet/Runtime/Plugins/Yak/Yak.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing.meta b/Assets/FishNet/Runtime/Serializing.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing.meta rename to Assets/FishNet/Runtime/Serializing.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/AutoPackType.cs b/Assets/FishNet/Runtime/Serializing/AutoPackType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/AutoPackType.cs rename to Assets/FishNet/Runtime/Serializing/AutoPackType.cs diff --git a/Assets/Packages/FishNet/Runtime/Serializing/AutoPackType.cs.meta b/Assets/FishNet/Runtime/Serializing/AutoPackType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/AutoPackType.cs.meta rename to Assets/FishNet/Runtime/Serializing/AutoPackType.cs.meta diff --git a/Assets/FishNet/Runtime/Serializing/GenericReader.cs b/Assets/FishNet/Runtime/Serializing/GenericReader.cs new file mode 100644 index 0000000..1325c95 --- /dev/null +++ b/Assets/FishNet/Runtime/Serializing/GenericReader.cs @@ -0,0 +1,43 @@ +using FishNet.Documenting; +using FishNet.Utility; +using System; +using System.Runtime.CompilerServices; + + +[assembly: InternalsVisibleTo(UtilityConstants.GENERATED_ASSEMBLY_NAME)] +//Required for internal tests. +[assembly: InternalsVisibleTo(UtilityConstants.TEST_ASSEMBLY_NAME)] +namespace FishNet.Serializing +{ + /// + /// Used for read references to generic types. + /// + /// + [APIExclude] + public static class GenericReader + { + public static Func Read { get; set; } + public static Func ReadAutoPack { get; set; } + /// + /// True if this type has a custom writer. + /// + private static bool _hasCustomSerializer; + + public static void SetReadUnpacked(Func value) + { + /* If a custom serializer has already been set then exit method + * to not overwrite serializer. */ + if (_hasCustomSerializer) + return; + + //Set has custom serializer if value being used is not a generated method. + _hasCustomSerializer = !(value.Method.Name.StartsWith(UtilityConstants.GENERATED_READER_PREFIX)); + Read = value; + } + + public static void SetReadAutoPacked(Func value) + { + ReadAutoPack = value; + } + } +} diff --git a/Assets/FishNet/Runtime/Serializing/GenericReader.cs.meta b/Assets/FishNet/Runtime/Serializing/GenericReader.cs.meta new file mode 100644 index 0000000..8d2b667 --- /dev/null +++ b/Assets/FishNet/Runtime/Serializing/GenericReader.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2a02167b94bcdd84da90bbcf5d6ad649 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FishNet/Runtime/Serializing/GenericWriter.cs b/Assets/FishNet/Runtime/Serializing/GenericWriter.cs new file mode 100644 index 0000000..dc56385 --- /dev/null +++ b/Assets/FishNet/Runtime/Serializing/GenericWriter.cs @@ -0,0 +1,42 @@ +using FishNet.Documenting; +using FishNet.Utility; +using System; +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo(UtilityConstants.GENERATED_ASSEMBLY_NAME)] +namespace FishNet.Serializing +{ + + /// + /// Used for write references to generic types. + /// + /// + [APIExclude] + public static class GenericWriter + { + public static Action Write { get; private set; } + public static Action WriteAutoPack { get; private set; } + /// + /// True if this type has a custom writer. + /// + private static bool _hasCustomSerializer; + + public static void SetWriteUnpacked(Action value) + { + /* If a custom serializer has already been set then exit method + * to not overwrite serializer. */ + if (_hasCustomSerializer) + return; + + //Set has custom serializer if value being used is not a generated method. + _hasCustomSerializer = !(value.Method.Name.StartsWith(UtilityConstants.GENERATED_WRITER_PREFIX)); + Write = value; + } + + public static void SetWriteAutoPacked(Action value) + { + WriteAutoPack = value; + } + } + +} diff --git a/Assets/FishNet/Runtime/Serializing/GenericWriter.cs.meta b/Assets/FishNet/Runtime/Serializing/GenericWriter.cs.meta new file mode 100644 index 0000000..ca1a59b --- /dev/null +++ b/Assets/FishNet/Runtime/Serializing/GenericWriter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c79ac203808e16489cbc2072fad75db +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping.meta b/Assets/FishNet/Runtime/Serializing/Helping.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Helping.meta rename to Assets/FishNet/Runtime/Serializing/Helping.meta diff --git a/Assets/Packages/FishNet/Runtime/Broadcast/Helping/BroadcastHelpers.cs b/Assets/FishNet/Runtime/Serializing/Helping/Broadcasts.cs similarity index 86% rename from Assets/Packages/FishNet/Runtime/Broadcast/Helping/BroadcastHelpers.cs rename to Assets/FishNet/Runtime/Serializing/Helping/Broadcasts.cs index 3af2007..e027a07 100644 --- a/Assets/Packages/FishNet/Runtime/Broadcast/Helping/BroadcastHelpers.cs +++ b/Assets/FishNet/Runtime/Serializing/Helping/Broadcasts.cs @@ -1,14 +1,40 @@ using FishNet.Connection; +using FishNet.Managing; using FishNet.Serializing; using FishNet.Transporting; using GameKit.Dependencies.Utilities; using System; using System.Collections.Generic; -using System.Diagnostics; namespace FishNet.Broadcast.Helping { - internal static class BroadcastHelper + + internal static class BroadcastsSerializers + { + /// + /// Writes a broadcast to writer. + /// + internal static PooledWriter WriteBroadcast(NetworkManager networkManager, PooledWriter writer, T message, ref Channel channel) + { + writer.WritePacketId(PacketId.Broadcast); + writer.WriteUInt16(typeof(T).FullName.GetStableHashU16()); + //Write data to a new writer. + PooledWriter dataWriter = WriterPool.Retrieve(); + dataWriter.Write(message); + //Write length of data. + writer.WriteLength(dataWriter.Length); + //Write data. + writer.WriteArraySegment(dataWriter.GetArraySegment()); + //Update channel to reliable if needed. + networkManager.TransportManager.CheckSetReliableChannel(writer.Length, ref channel); + + dataWriter.Store(); + + return writer; + } + } + + internal static class BroadcastExtensions { /// /// Gets the key for a broadcast type. @@ -194,6 +220,4 @@ public override void UnregisterHandler(object obj) public override bool RequireAuthentication => false; } - - } \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping/Broadcasts.cs.meta b/Assets/FishNet/Runtime/Serializing/Helping/Broadcasts.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Helping/Broadcasts.cs.meta rename to Assets/FishNet/Runtime/Serializing/Helping/Broadcasts.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping/Comparers.cs b/Assets/FishNet/Runtime/Serializing/Helping/Comparers.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Helping/Comparers.cs rename to Assets/FishNet/Runtime/Serializing/Helping/Comparers.cs diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping/Comparers.cs.meta b/Assets/FishNet/Runtime/Serializing/Helping/Comparers.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Helping/Comparers.cs.meta rename to Assets/FishNet/Runtime/Serializing/Helping/Comparers.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping/Quaternion32.cs b/Assets/FishNet/Runtime/Serializing/Helping/Quaternion32.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Helping/Quaternion32.cs rename to Assets/FishNet/Runtime/Serializing/Helping/Quaternion32.cs diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping/Quaternion32.cs.meta b/Assets/FishNet/Runtime/Serializing/Helping/Quaternion32.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Helping/Quaternion32.cs.meta rename to Assets/FishNet/Runtime/Serializing/Helping/Quaternion32.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping/Quaternion64.cs b/Assets/FishNet/Runtime/Serializing/Helping/Quaternion64.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Helping/Quaternion64.cs rename to Assets/FishNet/Runtime/Serializing/Helping/Quaternion64.cs diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping/Quaternion64.cs.meta b/Assets/FishNet/Runtime/Serializing/Helping/Quaternion64.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Helping/Quaternion64.cs.meta rename to Assets/FishNet/Runtime/Serializing/Helping/Quaternion64.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping/QuaternionConverter.cs b/Assets/FishNet/Runtime/Serializing/Helping/QuaternionConverter.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Helping/QuaternionConverter.cs rename to Assets/FishNet/Runtime/Serializing/Helping/QuaternionConverter.cs diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping/QuaternionConverter.cs.meta b/Assets/FishNet/Runtime/Serializing/Helping/QuaternionConverter.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Helping/QuaternionConverter.cs.meta rename to Assets/FishNet/Runtime/Serializing/Helping/QuaternionConverter.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping/ValueConversions.cs b/Assets/FishNet/Runtime/Serializing/Helping/ValueConversions.cs similarity index 92% rename from Assets/Packages/FishNet/Runtime/Serializing/Helping/ValueConversions.cs rename to Assets/FishNet/Runtime/Serializing/Helping/ValueConversions.cs index 48153c7..5736854 100644 --- a/Assets/Packages/FishNet/Runtime/Serializing/Helping/ValueConversions.cs +++ b/Assets/FishNet/Runtime/Serializing/Helping/ValueConversions.cs @@ -2,9 +2,6 @@ namespace FishNet.Serializing.Helping { - - - // -- helpers for float conversion without allocations -- [StructLayout(LayoutKind.Explicit)] internal struct UIntFloat { diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping/ValueConversions.cs.meta b/Assets/FishNet/Runtime/Serializing/Helping/ValueConversions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Helping/ValueConversions.cs.meta rename to Assets/FishNet/Runtime/Serializing/Helping/ValueConversions.cs.meta diff --git a/Assets/FishNet/Runtime/Serializing/Reader.Delta.cs b/Assets/FishNet/Runtime/Serializing/Reader.Delta.cs new file mode 100644 index 0000000..6341cd3 --- /dev/null +++ b/Assets/FishNet/Runtime/Serializing/Reader.Delta.cs @@ -0,0 +1,96 @@ +using FishNet.CodeGenerating; +using FishNet.Managing; +using FishNet.Utility; +using System.Runtime.CompilerServices; +using UnityEngine; +using static FishNet.Serializing.Writer; + +/* THIS IS IN DRAFTING / WIP. Do not attempt to use or modify this file. */ +/* THIS IS IN DRAFTING / WIP. Do not attempt to use or modify this file. */ +/* THIS IS IN DRAFTING / WIP. Do not attempt to use or modify this file. */ + +[assembly: InternalsVisibleTo(UtilityConstants.GENERATED_ASSEMBLY_NAME)] +//Required for internal tests. +[assembly: InternalsVisibleTo(UtilityConstants.TEST_ASSEMBLY_NAME)] +namespace FishNet.Serializing +{ + + /// + /// Reads data from a buffer. + /// + public partial class Reader + { + //[NotSerializer] + //internal ushort ReadUInt16Delta(ushort prev) + //{ + // int next = ReadInt32(); + // return (ushort)(prev + next); + //} + //[NotSerializer] + //internal short ReadInt16Delta(short prev) => (short)ReadUInt16Delta((ushort)prev); + + //[NotSerializer] + //internal uint ReadUInt32Delta(uint prev) + //{ + // long next = ReadInt64(); + // return (prev + (uint)next); + //} + + //[NotSerializer] + //internal int ReadInt32Delta(int prev) => (int)ReadUInt32Delta((uint)prev); + + + //[NotSerializer] + //internal ulong ReadUInt64Delta(ulong prev) + //{ + // bool newLarger = ReadBoolean(); + // ulong difference = ReadPackedWhole(); + + // return (newLarger) ? + // (prev + difference) : (prev - difference); + //} + //[NotSerializer] + //internal long ReadInt64Delta(long prev) => (long)ReadUInt64Delta((ulong)prev); + + //[NotSerializer] + //internal LayerMask ReadLayerMaskDelta(LayerMask prev) + //{ + // int layerValue = ReadInt32Delta(prev); + // return (LayerMask)layerValue; + //} + + [NotSerializer] + internal float ReadSingleDelta(float prev) + { + AutoPackTypeSigned apts = (AutoPackTypeSigned)ReadByte(); + /* If numeric value is equal to PackedPositive or higher than + * the pack type will be positive, as all positive types + * are larger than negative in the enum. */ + float multiplier = ((byte)apts >= (byte)AutoPackTypeSigned.PackedPositive) ? + 1f : -1f; + + switch (apts) + { + case AutoPackTypeSigned.Unpacked: + return ReadSingle(AutoPackType.Unpacked); + case AutoPackTypeSigned.PackedPositive: + case AutoPackTypeSigned.PackedNegative: + return (prev + GetUnpackedValue(ReadByte())); + case AutoPackTypeSigned.PackedLessPositive: + case AutoPackTypeSigned.PackedLessNegative: + return (prev + GetUnpackedValue(ReadUInt16())); + } + + //Fallthrough. + NetworkManager.LogError("Unhandled ReadSingleDelta packType of {apts}."); + return default; + + float GetUnpackedValue(ushort readValue) + { + return (readValue / Writer.ACCURACY) * multiplier; + } + } + + + } +} diff --git a/Assets/FishNet/Runtime/Serializing/Reader.Delta.cs.meta b/Assets/FishNet/Runtime/Serializing/Reader.Delta.cs.meta new file mode 100644 index 0000000..be09796 --- /dev/null +++ b/Assets/FishNet/Runtime/Serializing/Reader.Delta.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 90549173680239a48a3b0b61ecd47a77 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Reader.cs b/Assets/FishNet/Runtime/Serializing/Reader.cs similarity index 97% rename from Assets/Packages/FishNet/Runtime/Serializing/Reader.cs rename to Assets/FishNet/Runtime/Serializing/Reader.cs index 683c68a..129983c 100644 --- a/Assets/Packages/FishNet/Runtime/Serializing/Reader.cs +++ b/Assets/FishNet/Runtime/Serializing/Reader.cs @@ -21,21 +21,11 @@ [assembly: InternalsVisibleTo(UtilityConstants.TEST_ASSEMBLY_NAME)] namespace FishNet.Serializing { - /// - /// Used for read references to generic types. - /// - /// - [APIExclude] - public static class GenericReader - { - public static Func Read { internal get; set; } - public static Func ReadAutoPack { internal get; set; } - } - + /// /// Reads data from a buffer. /// - public class Reader + public partial class Reader { #region Types. public enum DataSource @@ -231,7 +221,7 @@ internal int ReadLength() [MethodImpl(MethodImplOptions.AggressiveInlining)] internal PacketId ReadPacketId() { - return (PacketId)ReadUInt16(); + return (PacketId)ReadUInt16(AutoPackType.Unpacked); } /// @@ -395,11 +385,21 @@ public bool ReadBoolean() /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public ushort ReadUInt16() + public ushort ReadUInt16(AutoPackType packType = AutoPackType.Unpacked) { + //todo Packing for this type appears to be broken. Fix then remove this line. + packType = AutoPackType.Unpacked; + ushort result = 0; - result |= _buffer[Position++]; - result |= (ushort)(_buffer[Position++] << 8); + if (packType == AutoPackType.Unpacked) + { + result |= _buffer[Position++]; + result |= (ushort)(_buffer[Position++] << 8); + } + else + { + result = (ushort)ReadPackedWhole(); + } return result; } @@ -409,7 +409,7 @@ public ushort ReadUInt16() /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public short ReadInt16() => (short)ReadUInt16(); + public short ReadInt16(AutoPackType packType = AutoPackType.Packed) => (short)ReadUInt16(packType); /// /// Reads an int32. @@ -1081,7 +1081,7 @@ public Channel ReadChannel() [MethodImpl(MethodImplOptions.AggressiveInlining)] public int ReadNetworkConnectionId() { - return ReadInt16(); + return ReadInt32(); } /// @@ -1259,7 +1259,7 @@ public ulong ReadPackedWhole() #endregion #region Generators. -#if !PREDICTION_V2 +#if PREDICTION_1 /// /// Reads a replicate into collection and returns item count read. /// @@ -1510,6 +1510,27 @@ public T Read() string GetLogMessage() => $"Read method not found for {type.FullName}. Use a supported type or create a custom serializer."; } + /// + /// Reads any supported type assuming there is no AutoPackType. + /// + [NotSerializer] + [MakePublic] + internal T ReadUnpacked() + { + Func del = GenericReader.Read; + if (del == null) + { + NetworkManager.LogError(GetLogMessage()); + return default; + } + else + { + return del.Invoke(this); + } + + string GetLogMessage() => $"Read method not found for {typeof(T).FullName}. Use a supported type or create a custom serializer."; + } + /// /// Returns if T takes AutoPackType argument. diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Reader.cs.meta b/Assets/FishNet/Runtime/Serializing/Reader.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Reader.cs.meta rename to Assets/FishNet/Runtime/Serializing/Reader.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/ReaderExtensions.cs b/Assets/FishNet/Runtime/Serializing/ReaderExtensions.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/ReaderExtensions.cs rename to Assets/FishNet/Runtime/Serializing/ReaderExtensions.cs diff --git a/Assets/Packages/FishNet/Runtime/Serializing/ReaderExtensions.cs.meta b/Assets/FishNet/Runtime/Serializing/ReaderExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/ReaderExtensions.cs.meta rename to Assets/FishNet/Runtime/Serializing/ReaderExtensions.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/ReaderPool.cs b/Assets/FishNet/Runtime/Serializing/ReaderPool.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/ReaderPool.cs rename to Assets/FishNet/Runtime/Serializing/ReaderPool.cs diff --git a/Assets/Packages/FishNet/Runtime/Serializing/ReaderPool.cs.meta b/Assets/FishNet/Runtime/Serializing/ReaderPool.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/ReaderPool.cs.meta rename to Assets/FishNet/Runtime/Serializing/ReaderPool.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/ReaderStatics.cs b/Assets/FishNet/Runtime/Serializing/ReaderStatics.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/ReaderStatics.cs rename to Assets/FishNet/Runtime/Serializing/ReaderStatics.cs diff --git a/Assets/Packages/FishNet/Runtime/Serializing/ReaderStatics.cs.meta b/Assets/FishNet/Runtime/Serializing/ReaderStatics.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/ReaderStatics.cs.meta rename to Assets/FishNet/Runtime/Serializing/ReaderStatics.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/SceneComparer.cs b/Assets/FishNet/Runtime/Serializing/SceneComparer.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/SceneComparer.cs rename to Assets/FishNet/Runtime/Serializing/SceneComparer.cs diff --git a/Assets/Packages/FishNet/Runtime/Serializing/SceneComparer.cs.meta b/Assets/FishNet/Runtime/Serializing/SceneComparer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/SceneComparer.cs.meta rename to Assets/FishNet/Runtime/Serializing/SceneComparer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/TransformPackingData.cs b/Assets/FishNet/Runtime/Serializing/TransformPackingData.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/TransformPackingData.cs rename to Assets/FishNet/Runtime/Serializing/TransformPackingData.cs diff --git a/Assets/Packages/FishNet/Runtime/Serializing/TransformPackingData.cs.meta b/Assets/FishNet/Runtime/Serializing/TransformPackingData.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/TransformPackingData.cs.meta rename to Assets/FishNet/Runtime/Serializing/TransformPackingData.cs.meta diff --git a/Assets/FishNet/Runtime/Serializing/Writer.Delta.cs b/Assets/FishNet/Runtime/Serializing/Writer.Delta.cs new file mode 100644 index 0000000..f30019f --- /dev/null +++ b/Assets/FishNet/Runtime/Serializing/Writer.Delta.cs @@ -0,0 +1,218 @@ +using FishNet.CodeGenerating; +using FishNet.Connection; +using FishNet.Documenting; +using FishNet.Managing; +using FishNet.Object; +using FishNet.Object.Prediction; +using FishNet.Serializing.Helping; +using FishNet.Utility; +using System; +using System.Runtime.CompilerServices; +using UnityEngine; + +[assembly: InternalsVisibleTo(UtilityConstants.GENERATED_ASSEMBLY_NAME)] +namespace FishNet.Serializing +{ + + /* THIS IS IN DRAFTING / WIP. Do not attempt to use or modify this file. */ + /* THIS IS IN DRAFTING / WIP. Do not attempt to use or modify this file. */ + /* THIS IS IN DRAFTING / WIP. Do not attempt to use or modify this file. */ + + /// + /// Writes data to a buffer. + /// + public partial class Writer + { + [System.Flags] + internal enum AutoPackTypeSigned : byte + { + Unpacked = 0, + PackedNegative = 1, + PackedLessNegative = 2, + PackedPositive = 4, + PackedLessPositive = 8, + } + + + internal const float LARGEST_PACKED_UNSIGNED_FLOAT = ((float)byte.MaxValue / ACCURACY); + internal const float LARGEST_PACKEDLESS_UNSIGNED_FLOAT = ((float)ushort.MaxValue / ACCURACY); + internal const float LARGEST_PACKED_SIGNED_FLOAT = ((float)sbyte.MaxValue / ACCURACY); + internal const float LARGEST_PACKEDLESS_SIGNED_FLOAT = ((float)short.MaxValue / ACCURACY); + internal const float ACCURACY = 1000f; + internal const float ACCURACY_DECIMAL = 0.001f; + + + //[NotSerializer] + //internal void WriteUInt16Delta(ushort a, ushort b) + //{ + // int difference = (int)(b - a); + // WritePackedWhole((ulong)difference); + //} + //[NotSerializer] + //internal void WriteInt16Delta(short a, short b) => WriteUInt16Delta((ushort)a, (ushort)b); + + + //[NotSerializer] + //internal void WriteUInt32Delta(uint a, uint b) + //{ + // long difference = (long)(b - a); + // WritePackedWhole((ulong)difference); + //} + //[NotSerializer] + //internal void WriteInt32Delta(int a, int b) => WriteUInt32Delta((uint)a, (uint)b); + + + //[NotSerializer] + //internal void WriteUInt64Delta(ulong a, ulong b) + //{ + // ulong difference; + // bool bLarger; + // if (b > a) + // { + // bLarger = true; + // difference = (b - a); + // } + // else + // { + // bLarger = false; + // difference = (a - b); + // } + + // WriteBoolean(bLarger); + // WritePackedWhole(difference); + //} + //[NotSerializer] + //internal void WriteInt64Delta(long a, long b) => WriteUInt64Delta((ulong)a, (ulong)b); + + //[NotSerializer] + //internal void WriteLayerMaskDelta(LayerMask a, LayerMask b) + //{ + // WriteInt32Delta(b.value, a.value); + //} + + [NotSerializer] + internal void WriteSingleDelta(float a, float b) + { + double difference = (b - a); + AutoPackTypeSigned apts = GetAutoPackTypeSigned(difference); + WriteByte((byte)apts); + + switch (apts) + { + case AutoPackTypeSigned.PackedNegative: + case AutoPackTypeSigned.PackedPositive: + WriteByte((byte)(difference * ACCURACY)); + return; + case AutoPackTypeSigned.PackedLessNegative: + case AutoPackTypeSigned.PackedLessPositive: + WriteUInt16((ushort)(difference * ACCURACY)); + return; + case AutoPackTypeSigned.Unpacked: + WriteSingle(b, AutoPackType.Unpacked); + return; + } + } + + private AutoPackTypeSigned GetAutoPackTypeSigned(double value) + { + double absValue = (value >= 0d) ? value : (value * -1d); + + if (absValue <= LARGEST_PACKED_UNSIGNED_FLOAT) + return (value >= 0d) ? AutoPackTypeSigned.PackedPositive : AutoPackTypeSigned.PackedNegative; + else if (absValue <= LARGEST_PACKEDLESS_UNSIGNED_FLOAT) + return (value >= 0d) ? AutoPackTypeSigned.PackedLessPositive : AutoPackTypeSigned.PackedLessNegative; + else + return AutoPackTypeSigned.Unpacked; + } + + //Draft / WIP below. May become discarded. + + //internal enum DeltaPackType + //{ + // Packed = 1, + // PackedLess = 2, + //} + //internal enum Vector3DeltaA : byte + //{ + // Unset = 0, + // XPacked = 1, + // XPackedLess = 2, + // XUnpacked = 4, + // YPacked = 8, + // YPackedLess = 16, + // YUnpacked = 32, + // ZPacked = 64, + // ZPackedLess = 128, + // ZUnpacked = 4, + //} + + //internal const float LARGEST_PACKED_DIFFERENCE = ((float)sbyte.MaxValue / ACCURACY); + //internal const float LARGEST_PACKEDLESS_DIFFERENCE = ((float)short.MaxValue / ACCURACY); + //internal const float ACCURACY = 1000f; + //internal const float ACCURACY_DECIMAL = 0.001f; + + + //[NotSerializer] + //public void WriteVector3Delta(Vector3 a, Vector3 b) + //{ + // //Start as the highest. + + // float xDiff = (b.x - a.x); + // float yDiff = (b.x - a.x); + // float zDiff = (b.x - a.x); + + // float absXDiff = Mathf.Abs(xDiff); + // float absYDiff = Mathf.Abs(yDiff); + // float absZDiff = Mathf.Abs(zDiff); + + // float largestDiff = 0f; + // Vector3Delta delta = Vector3Delta.Unset; + // if (absXDiff >= ACCURACY_DECIMAL) + // { + // delta |= Vector3Delta.HasX; + // largestDiff = absXDiff; + // } + // if (absYDiff >= ACCURACY_DECIMAL) + // { + // delta |= Vector3Delta.HasY; + // largestDiff = Mathf.Max(largestDiff, absYDiff); + // } + // if (absZDiff >= ACCURACY_DECIMAL) + // { + // delta |= Vector3Delta.HasZ; + // largestDiff = Mathf.Max(largestDiff, absZDiff); + // } + + // /* If packed is not specified then unpacked + // * is assumed. */ + // if (largestDiff <= LARGEST_PACKED_DIFFERENCE) + // delta |= Vector3Delta.Packed; + // else if (largestDiff <= LARGEST_PACKEDLESS_DIFFERENCE) + // delta |= Vector3Delta.PackedLess; + + + + // xDiff = Mathf.CeilToInt(xDiff * ACCURACY); + // yDiff = Mathf.CeilToInt(yDiff * ACCURACY); + // zDiff = Mathf.CeilToInt(zDiff * ACCURACY); + + // Reserve(1); + + + // UIntFloat valA; + // UIntFloat valB; + + // valA = new UIntFloat(a.x); + // valB = new UIntFloat(b.x); + // WriteUInt32(valB.UIntValue - valA.UIntValue, packType); + // Debug.Log("Diff " + (valB.UIntValue - valA.UIntValue) + ", " + (valA.UIntValue - valB.UIntValue)); + // valA = new UIntFloat(a.y); + // valB = new UIntFloat(b.y); + // WriteUInt32(valB.UIntValue - valA.UIntValue, packType); + // valA = new UIntFloat(a.z); + // valB = new UIntFloat(b.z); + // WriteUInt32(valB.UIntValue - valA.UIntValue, packType); + //} + + } +} diff --git a/Assets/FishNet/Runtime/Serializing/Writer.Delta.cs.meta b/Assets/FishNet/Runtime/Serializing/Writer.Delta.cs.meta new file mode 100644 index 0000000..599e314 --- /dev/null +++ b/Assets/FishNet/Runtime/Serializing/Writer.Delta.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 03955a9bd0c9a6f44886554887435672 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Writer.cs b/Assets/FishNet/Runtime/Serializing/Writer.cs similarity index 95% rename from Assets/Packages/FishNet/Runtime/Serializing/Writer.cs rename to Assets/FishNet/Runtime/Serializing/Writer.cs index 7f94cac..9f21ca4 100644 --- a/Assets/Packages/FishNet/Runtime/Serializing/Writer.cs +++ b/Assets/FishNet/Runtime/Serializing/Writer.cs @@ -13,26 +13,16 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using UnityEngine; +using System.Reflection; [assembly: InternalsVisibleTo(UtilityConstants.GENERATED_ASSEMBLY_NAME)] namespace FishNet.Serializing { - /// - /// Used for write references to generic types. - /// - /// - [APIExclude] - public static class GenericWriter - { - public static Action Write { get; set; } - public static Action WriteAutoPack { get; set; } - } - /// /// Writes data to a buffer. /// - public class Writer + public partial class Writer { #region Public. /// @@ -204,7 +194,7 @@ internal void WriteLength(int length) [MethodImpl(MethodImplOptions.AggressiveInlining)] internal void WritePacketId(PacketId pid) { - WriteUInt16((ushort)pid); + WriteUInt16((ushort)pid, AutoPackType.Unpacked); } /// @@ -324,12 +314,22 @@ public void WriteBoolean(bool value) /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void WriteUInt16(ushort value) + public void WriteUInt16(ushort value, AutoPackType packType = AutoPackType.Packed) { - EnsureBufferLength(2); - _buffer[Position++] = (byte)value; - _buffer[Position++] = (byte)(value >> 8); - Length = Math.Max(Length, Position); + //todo Packing for this type appears to be broken. Fix then remove this line. + packType = AutoPackType.Unpacked; + + if (packType == AutoPackType.Unpacked) + { + EnsureBufferLength(2); + _buffer[Position++] = (byte)value; + _buffer[Position++] = (byte)(value >> 8); + Length = Math.Max(Length, Position); + } + else + { + WritePackedWhole(value); + } } /// @@ -337,13 +337,7 @@ public void WriteUInt16(ushort value) /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void WriteInt16(short value) - { - EnsureBufferLength(2); - _buffer[Position++] = (byte)value; - _buffer[Position++] = (byte)(value >> 8); - Length = Math.Max(Length, Position); - } + public void WriteInt16(short value, AutoPackType packType = AutoPackType.Packed) => WriteUInt16((ushort)value, packType); /// /// Writes a int32. @@ -514,11 +508,8 @@ public void WriteArraySegment(ArraySegment value) [MethodImpl(MethodImplOptions.AggressiveInlining)] public void WriteVector2(Vector2 value) { - UIntFloat converter; - converter = new UIntFloat { FloatValue = value.x }; - WriteUInt32(converter.UIntValue, AutoPackType.Unpacked); - converter = new UIntFloat { FloatValue = value.y }; - WriteUInt32(converter.UIntValue, AutoPackType.Unpacked); + WriteSingle(value.x, AutoPackType.Unpacked); + WriteSingle(value.y, AutoPackType.Unpacked); } /// @@ -528,13 +519,9 @@ public void WriteVector2(Vector2 value) [MethodImpl(MethodImplOptions.AggressiveInlining)] public void WriteVector3(Vector3 value) { - UIntFloat converter; - converter = new UIntFloat { FloatValue = value.x }; - WriteUInt32(converter.UIntValue, AutoPackType.Unpacked); - converter = new UIntFloat { FloatValue = value.y }; - WriteUInt32(converter.UIntValue, AutoPackType.Unpacked); - converter = new UIntFloat { FloatValue = value.z }; - WriteUInt32(converter.UIntValue, AutoPackType.Unpacked); + WriteSingle(value.x, AutoPackType.Unpacked); + WriteSingle(value.y, AutoPackType.Unpacked); + WriteSingle(value.z, AutoPackType.Unpacked); } /// @@ -544,15 +531,10 @@ public void WriteVector3(Vector3 value) [MethodImpl(MethodImplOptions.AggressiveInlining)] public void WriteVector4(Vector4 value) { - UIntFloat converter; - converter = new UIntFloat { FloatValue = value.x }; - WriteUInt32(converter.UIntValue, AutoPackType.Unpacked); - converter = new UIntFloat { FloatValue = value.y }; - WriteUInt32(converter.UIntValue, AutoPackType.Unpacked); - converter = new UIntFloat { FloatValue = value.z }; - WriteUInt32(converter.UIntValue, AutoPackType.Unpacked); - converter = new UIntFloat { FloatValue = value.w }; - WriteUInt32(converter.UIntValue, AutoPackType.Unpacked); + WriteSingle(value.x, AutoPackType.Unpacked); + WriteSingle(value.y, AutoPackType.Unpacked); + WriteSingle(value.z, AutoPackType.Unpacked); + WriteSingle(value.w, AutoPackType.Unpacked); } /// @@ -963,7 +945,7 @@ public void WriteLayerMask(LayerMask value) public void WriteNetworkConnection(NetworkConnection connection) { int value = (connection == null) ? NetworkConnection.UNSET_CLIENTID_VALUE : connection.ClientId; - WriteInt16((short)value); + WriteNetworkConnectionId(value); } /// @@ -972,9 +954,9 @@ public void WriteNetworkConnection(NetworkConnection connection) /// [NotSerializer] [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void WriteNetworkConnectionId(short id) + public void WriteNetworkConnectionId(int id) { - WriteInt16(id); + WriteInt32(id); } /// @@ -1148,7 +1130,7 @@ public void WriteList(List value, int offset) WriteList(value, offset, value.Count - offset); } -#if !PREDICTION_V2 +#if PREDICTION_1 /// /// Writes a replication to the server. /// @@ -1354,12 +1336,11 @@ public void WriteArray(T[] value) /// - /// Writers any supported type. + /// Writes any supported type. /// /// /// [NotSerializer] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Write(T value) { System.Type type = typeof(T); @@ -1383,6 +1364,25 @@ public void Write(T value) string GetLogMessage() => $"Write method not found for {type.FullName}. Use a supported type or create a custom serializer."; } + /// + /// Writes any supported type assuming there is no AutoPackType. + /// + /// + /// + [NotSerializer] + [MakePublic] + internal void WriteUnpacked(T value) + { + Action del = GenericWriter.Write; + if (del == null) + NetworkManager.LogError(GetLogMessage()); + else + del.Invoke(this, value); + + string GetLogMessage() => $"Write method not found for {typeof(T).FullName}. Use a supported type or create a custom serializer."; + } + + /// /// Returns if T takes AutoPackType argument. /// diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Writer.cs.meta b/Assets/FishNet/Runtime/Serializing/Writer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/Writer.cs.meta rename to Assets/FishNet/Runtime/Serializing/Writer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/WriterExtensions.cs b/Assets/FishNet/Runtime/Serializing/WriterExtensions.cs similarity index 97% rename from Assets/Packages/FishNet/Runtime/Serializing/WriterExtensions.cs rename to Assets/FishNet/Runtime/Serializing/WriterExtensions.cs index 5c5c23d..5b5b0e7 100644 --- a/Assets/Packages/FishNet/Runtime/Serializing/WriterExtensions.cs +++ b/Assets/FishNet/Runtime/Serializing/WriterExtensions.cs @@ -25,11 +25,14 @@ public static class WriterExtensions static WriterExtensions() { + DefaultPackedTypes.Add(typeof(short)); + DefaultPackedTypes.Add(typeof(ushort)); DefaultPackedTypes.Add(typeof(int)); DefaultPackedTypes.Add(typeof(uint)); DefaultPackedTypes.Add(typeof(long)); DefaultPackedTypes.Add(typeof(ulong)); DefaultPackedTypes.Add(typeof(Color)); + DefaultPackedTypes.Add(typeof(Quaternion)); DefaultPackedTypes.Add(typeof(Vector2Int)); DefaultPackedTypes.Add(typeof(Vector3Int)); DefaultPackedTypes.Add(typeof(Quaternion)); diff --git a/Assets/Packages/FishNet/Runtime/Serializing/WriterExtensions.cs.meta b/Assets/FishNet/Runtime/Serializing/WriterExtensions.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/WriterExtensions.cs.meta rename to Assets/FishNet/Runtime/Serializing/WriterExtensions.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/WriterPool.cs b/Assets/FishNet/Runtime/Serializing/WriterPool.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/WriterPool.cs rename to Assets/FishNet/Runtime/Serializing/WriterPool.cs diff --git a/Assets/Packages/FishNet/Runtime/Serializing/WriterPool.cs.meta b/Assets/FishNet/Runtime/Serializing/WriterPool.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/WriterPool.cs.meta rename to Assets/FishNet/Runtime/Serializing/WriterPool.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Serializing/WriterStatics.cs b/Assets/FishNet/Runtime/Serializing/WriterStatics.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/WriterStatics.cs rename to Assets/FishNet/Runtime/Serializing/WriterStatics.cs diff --git a/Assets/Packages/FishNet/Runtime/Serializing/WriterStatics.cs.meta b/Assets/FishNet/Runtime/Serializing/WriterStatics.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Serializing/WriterStatics.cs.meta rename to Assets/FishNet/Runtime/Serializing/WriterStatics.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting.meta b/Assets/FishNet/Runtime/Transporting.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting.meta rename to Assets/FishNet/Runtime/Transporting.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Channels.cs b/Assets/FishNet/Runtime/Transporting/Channels.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Channels.cs rename to Assets/FishNet/Runtime/Transporting/Channels.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Channels.cs.meta b/Assets/FishNet/Runtime/Transporting/Channels.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Channels.cs.meta rename to Assets/FishNet/Runtime/Transporting/Channels.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/ConnectionStates.cs b/Assets/FishNet/Runtime/Transporting/ConnectionStates.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/ConnectionStates.cs rename to Assets/FishNet/Runtime/Transporting/ConnectionStates.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/ConnectionStates.cs.meta b/Assets/FishNet/Runtime/Transporting/ConnectionStates.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/ConnectionStates.cs.meta rename to Assets/FishNet/Runtime/Transporting/ConnectionStates.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/EventStructures.cs b/Assets/FishNet/Runtime/Transporting/EventStructures.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/EventStructures.cs rename to Assets/FishNet/Runtime/Transporting/EventStructures.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/EventStructures.cs.meta b/Assets/FishNet/Runtime/Transporting/EventStructures.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/EventStructures.cs.meta rename to Assets/FishNet/Runtime/Transporting/EventStructures.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/IPAddressType.cs b/Assets/FishNet/Runtime/Transporting/IPAddressType.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/IPAddressType.cs rename to Assets/FishNet/Runtime/Transporting/IPAddressType.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/IPAddressType.cs.meta b/Assets/FishNet/Runtime/Transporting/IPAddressType.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/IPAddressType.cs.meta rename to Assets/FishNet/Runtime/Transporting/IPAddressType.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/NetworkReaderLoop.cs b/Assets/FishNet/Runtime/Transporting/NetworkReaderLoop.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/NetworkReaderLoop.cs rename to Assets/FishNet/Runtime/Transporting/NetworkReaderLoop.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/NetworkReaderLoop.cs.meta b/Assets/FishNet/Runtime/Transporting/NetworkReaderLoop.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/NetworkReaderLoop.cs.meta rename to Assets/FishNet/Runtime/Transporting/NetworkReaderLoop.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/NetworkWriterLoop.cs b/Assets/FishNet/Runtime/Transporting/NetworkWriterLoop.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/NetworkWriterLoop.cs rename to Assets/FishNet/Runtime/Transporting/NetworkWriterLoop.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/NetworkWriterLoop.cs.meta b/Assets/FishNet/Runtime/Transporting/NetworkWriterLoop.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/NetworkWriterLoop.cs.meta rename to Assets/FishNet/Runtime/Transporting/NetworkWriterLoop.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/PacketId.cs b/Assets/FishNet/Runtime/Transporting/PacketId.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/PacketId.cs rename to Assets/FishNet/Runtime/Transporting/PacketId.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/PacketId.cs.meta b/Assets/FishNet/Runtime/Transporting/PacketId.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/PacketId.cs.meta rename to Assets/FishNet/Runtime/Transporting/PacketId.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transport.cs b/Assets/FishNet/Runtime/Transporting/Transport.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transport.cs rename to Assets/FishNet/Runtime/Transporting/Transport.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transport.cs.meta b/Assets/FishNet/Runtime/Transporting/Transport.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transport.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transport.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports.meta b/Assets/FishNet/Runtime/Transporting/Transports.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports.meta rename to Assets/FishNet/Runtime/Transporting/Transports.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass.meta b/Assets/FishNet/Runtime/Transporting/Transports/Multipass.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Multipass.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/CHANGELOG.txt b/Assets/FishNet/Runtime/Transporting/Transports/Multipass/CHANGELOG.txt similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/CHANGELOG.txt rename to Assets/FishNet/Runtime/Transporting/Transports/Multipass/CHANGELOG.txt diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/CHANGELOG.txt.meta b/Assets/FishNet/Runtime/Transporting/Transports/Multipass/CHANGELOG.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/CHANGELOG.txt.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Multipass/CHANGELOG.txt.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/Multipass.cs b/Assets/FishNet/Runtime/Transporting/Transports/Multipass/Multipass.cs similarity index 95% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/Multipass.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Multipass/Multipass.cs index b806e9a..80a1597 100644 --- a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/Multipass.cs +++ b/Assets/FishNet/Runtime/Transporting/Transports/Multipass/Multipass.cs @@ -1,3 +1,4 @@ +using FishNet.Connection; using FishNet.Managing; using GameKit.Dependencies.Utilities; using System; @@ -118,13 +119,10 @@ public Transport ClientTransport /// Ids available to new connections. /// private Queue _availableMultipassIds = new Queue(); - #endregion - - #region Const. /// - /// Id to use for client when acting as host. + /// Last Id added to availableMultipassIds. /// - internal const int CLIENT_HOST_ID = short.MaxValue; + private int _lastAvailableMultipassId = 0; #endregion public override void Initialize(NetworkManager networkManager, int transportIndex) @@ -173,7 +171,6 @@ private void OnDestroy() ResetLookupCollections(); } - #region ClientIds. /// /// Resets lookup collections and caches potential garbage. @@ -203,7 +200,7 @@ private void TryResetClientIds(bool force) } ResetLookupCollections(); - CreateAvailableIds(); + CreateAvailableIds(true); } /// @@ -357,7 +354,7 @@ private void Multipass_OnRemoteConnectionState(RemoteConnectionStateArgs connect * transportConnectionId. */ int transportIndex = connectionStateArgs.TransportIndex; - int transportId = connectionStateArgs.ConnectionId; + int transportConnectionId = connectionStateArgs.ConnectionId; /* MultipassId is set to a new value when connecting * or discovered value when disconnecting. */ int multipassId; @@ -366,12 +363,22 @@ private void Multipass_OnRemoteConnectionState(RemoteConnectionStateArgs connect //Started. if (connectionStateArgs.ConnectionState == RemoteConnectionState.Started) { + if (_availableMultipassIds.Count == 0) + { + bool addedIds = CreateAvailableIds(false); + if (!addedIds) + { + base.NetworkManager.Log($"There are no more available connectionIds to use. Connection {transportConnectionId} has been kicked."); + _transports[transportIndex].StopConnection(transportConnectionId, true); + return; + } + } //Get a multipassId for new connections. multipassId = _availableMultipassIds.Dequeue(); //Get and update a clienttransportdata. - ClientTransportData ctd = new ClientTransportData(transportIndex, transportId, multipassId); + ClientTransportData ctd = new ClientTransportData(transportIndex, transportConnectionId, multipassId); //Assign the lookup for transportId/index. - transportToMultipass[transportId] = ctd; + transportToMultipass[transportConnectionId] = ctd; //Assign the lookup for multipassId. _multpassIdLookup[multipassId] = ctd; @@ -383,7 +390,7 @@ private void Multipass_OnRemoteConnectionState(RemoteConnectionStateArgs connect //Stopped. else { - ClientTransportData ctd = GetDataFromTransportId(transportIndex, transportId); + ClientTransportData ctd = GetDataFromTransportId(transportIndex, transportConnectionId); /* If CTD could not be found then the connection * is not stored/known. Nothing further can be done; the event cannot * invoke either since Id is unknown. */ @@ -392,7 +399,7 @@ private void Multipass_OnRemoteConnectionState(RemoteConnectionStateArgs connect //Add the multipassId back to the queue. _availableMultipassIds.Enqueue(ctd.MultipassId); - transportToMultipass.Remove(transportId); + transportToMultipass.Remove(transportConnectionId); _multpassIdLookup.Remove(ctd.MultipassId); #if UNITY_EDITOR || DEVELOPMENT_BUILD //Remove packets held for connection from latency simulator. @@ -527,12 +534,25 @@ private bool IsClientTransportSetWithError(string methodText) /// /// Populates the availableIds collection. /// - private void CreateAvailableIds() + /// True if at least 1 Id was added. + private bool CreateAvailableIds(bool reset) { - _availableMultipassIds.Clear(); - //Reserve maxValue - 1 since some local transports use that. - for (int i = 0; i < (short.MaxValue - 1); i++) - _availableMultipassIds.Enqueue(i); + if (reset) + { + _lastAvailableMultipassId = 0; + _availableMultipassIds.Clear(); + } + //Add in blocks of 1000. + int added = 0; + while ((_lastAvailableMultipassId <= NetworkConnection.MAXIMUM_CLIENTID_WITHOUT_SIMULATED_VALUE) + && (added < 1000)) + { + added++; + _availableMultipassIds.Enqueue(_lastAvailableMultipassId); + _lastAvailableMultipassId++; + } + + return (added > 0); } /// @@ -650,7 +670,6 @@ public override bool IsLocalTransport(int multipassId) public override int GetMaximumClients() { base.NetworkManager.LogError($"This method is not supported. Use GetMaximumClients(transportIndex) instead."); - return -1; } /// diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/Multipass.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Multipass/Multipass.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/Multipass.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Multipass/Multipass.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/VERSION.txt b/Assets/FishNet/Runtime/Transporting/Transports/Multipass/VERSION.txt similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/VERSION.txt rename to Assets/FishNet/Runtime/Transporting/Transports/Multipass/VERSION.txt diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/VERSION.txt.meta b/Assets/FishNet/Runtime/Transporting/Transports/Multipass/VERSION.txt.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Multipass/VERSION.txt.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Multipass/VERSION.txt.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ClientSocket.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ClientSocket.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ClientSocket.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ClientSocket.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ClientSocket.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ClientSocket.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ClientSocket.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ClientSocket.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/CommonSocket.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/CommonSocket.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/CommonSocket.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/CommonSocket.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/CommonSocket.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/CommonSocket.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/CommonSocket.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/CommonSocket.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ServerSocket.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ServerSocket.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ServerSocket.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ServerSocket.cs index f926016..90f9a06 100644 --- a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ServerSocket.cs +++ b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ServerSocket.cs @@ -540,7 +540,7 @@ internal void SendToClient(byte channelId, ArraySegment segment, int conne /// internal int GetMaximumClients() { - return _maximumClients; + return Math.Min(_maximumClients, NetworkConnection.MAXIMUM_CLIENTID_WITHOUT_SIMULATED_VALUE); } /// diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ServerSocket.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ServerSocket.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ServerSocket.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/ServerSocket.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/Supporting.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/Supporting.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/Supporting.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/Supporting.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/Supporting.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/Supporting.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Core/Supporting.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Core/Supporting.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Editor.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Editor.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Editor.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Editor.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Editor/TugboatEditor.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Editor/TugboatEditor.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Editor/TugboatEditor.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Editor/TugboatEditor.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Editor/TugboatEditor.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Editor/TugboatEditor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Editor/TugboatEditor.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Editor/TugboatEditor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/BaseChannel.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/BaseChannel.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/BaseChannel.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/BaseChannel.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/BaseChannel.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/BaseChannel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/BaseChannel.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/BaseChannel.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ConnectionRequest.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ConnectionRequest.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ConnectionRequest.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ConnectionRequest.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ConnectionRequest.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ConnectionRequest.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ConnectionRequest.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ConnectionRequest.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/INetEventListener.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/INetEventListener.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/INetEventListener.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/INetEventListener.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/INetEventListener.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/INetEventListener.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/INetEventListener.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/INetEventListener.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/InternalPackets.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/InternalPackets.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/InternalPackets.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/InternalPackets.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/InternalPackets.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/InternalPackets.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/InternalPackets.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/InternalPackets.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/Crc32cLayer.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/Crc32cLayer.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/Crc32cLayer.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/Crc32cLayer.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/Crc32cLayer.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/Crc32cLayer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/Crc32cLayer.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/Crc32cLayer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/PacketLayerBase.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/PacketLayerBase.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/PacketLayerBase.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/PacketLayerBase.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/PacketLayerBase.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/PacketLayerBase.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/PacketLayerBase.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/PacketLayerBase.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/XorEncryptLayer.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/XorEncryptLayer.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/XorEncryptLayer.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/XorEncryptLayer.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/XorEncryptLayer.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/XorEncryptLayer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/XorEncryptLayer.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Layers/XorEncryptLayer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NatPunchModule.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NatPunchModule.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NatPunchModule.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NatPunchModule.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NatPunchModule.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NatPunchModule.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NatPunchModule.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NatPunchModule.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NativeSocket.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NativeSocket.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NativeSocket.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NativeSocket.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NativeSocket.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NativeSocket.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NativeSocket.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NativeSocket.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetConstants.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetConstants.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetConstants.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetConstants.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetConstants.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetConstants.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetConstants.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetConstants.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetDebug.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetDebug.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetDebug.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetDebug.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetDebug.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetDebug.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetDebug.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetDebug.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.PacketPool.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.PacketPool.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.PacketPool.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.PacketPool.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.PacketPool.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.PacketPool.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.PacketPool.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.PacketPool.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.Socket.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.Socket.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.Socket.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.Socket.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.Socket.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.Socket.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.Socket.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.Socket.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetManager.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPacket.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPacket.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPacket.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPacket.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPacket.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPacket.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPacket.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPacket.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPeer.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPeer.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPeer.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPeer.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPeer.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPeer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPeer.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetPeer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetStatistics.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetStatistics.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetStatistics.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetStatistics.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetStatistics.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetStatistics.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetStatistics.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetStatistics.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetUtils.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetUtils.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetUtils.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetUtils.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetUtils.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetUtils.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetUtils.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/NetUtils.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/PooledPacket.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/PooledPacket.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/PooledPacket.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/PooledPacket.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/PooledPacket.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/PooledPacket.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/PooledPacket.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/PooledPacket.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ReliableChannel.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ReliableChannel.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ReliableChannel.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ReliableChannel.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ReliableChannel.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ReliableChannel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ReliableChannel.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/ReliableChannel.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/SequencedChannel.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/SequencedChannel.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/SequencedChannel.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/SequencedChannel.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/SequencedChannel.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/SequencedChannel.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/SequencedChannel.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/SequencedChannel.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/CRC32C.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/CRC32C.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/CRC32C.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/CRC32C.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/CRC32C.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/CRC32C.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/CRC32C.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/CRC32C.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/FastBitConverter.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/FastBitConverter.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/FastBitConverter.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/FastBitConverter.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/FastBitConverter.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/FastBitConverter.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/FastBitConverter.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/FastBitConverter.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/INetSerializable.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/INetSerializable.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/INetSerializable.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/INetSerializable.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/INetSerializable.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/INetSerializable.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/INetSerializable.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/INetSerializable.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataReader.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataReader.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataReader.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataReader.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataReader.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataReader.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataReader.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataReader.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataWriter.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataWriter.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataWriter.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataWriter.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataWriter.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataWriter.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataWriter.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetDataWriter.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetPacketProcessor.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetPacketProcessor.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetPacketProcessor.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetPacketProcessor.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetPacketProcessor.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetPacketProcessor.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetPacketProcessor.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetPacketProcessor.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetSerializer.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetSerializer.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetSerializer.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetSerializer.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetSerializer.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetSerializer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetSerializer.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NetSerializer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpPacket.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpPacket.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpPacket.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpPacket.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpPacket.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpPacket.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpPacket.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpPacket.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpRequest.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpRequest.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpRequest.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpRequest.cs diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpRequest.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpRequest.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpRequest.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/Utils/NtpRequest.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Tugboat.cs b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Tugboat.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Tugboat.cs rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Tugboat.cs index 4ffe236..ad6d12e 100644 --- a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Tugboat.cs +++ b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Tugboat.cs @@ -63,7 +63,7 @@ public class Tugboat : Transport /// Maximum number of players which may be connected at once. /// [Tooltip("Maximum number of players which may be connected at once.")] - [Range(1, 99999999)] + [Range(1, 9999)] [SerializeField] private int _maximumClients = 4095; diff --git a/Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Tugboat.cs.meta b/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Tugboat.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Transporting/Transports/Tugboat/Tugboat.cs.meta rename to Assets/FishNet/Runtime/Transporting/Transports/Tugboat/Tugboat.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Utility.meta b/Assets/FishNet/Runtime/Utility.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility.meta rename to Assets/FishNet/Runtime/Utility.meta diff --git a/Assets/FishNet/Runtime/Utility/AdaptiveLocalTransformSmoother.cs b/Assets/FishNet/Runtime/Utility/AdaptiveLocalTransformSmoother.cs new file mode 100644 index 0000000..c13904e --- /dev/null +++ b/Assets/FishNet/Runtime/Utility/AdaptiveLocalTransformSmoother.cs @@ -0,0 +1,363 @@ +#if !PREDICTION_1 +using FishNet.Managing.Timing; +using FishNet.Utility.Extension; +using FishNet.Utility.Performance; +using GameKit.Dependencies.Utilities; +using System.Runtime.CompilerServices; +using UnityEngine; + +namespace FishNet.Object.Prediction +{ + + internal class AdaptiveLocalTransformTickSmoother : IResettable + { + #region Types. + private struct TickTransformProperties + { + public uint Tick; + public TransformProperties Properties; + + public TickTransformProperties(uint tick, Transform t) + { + Tick = tick; + Properties = new TransformProperties(t.localPosition, t.localRotation, t.localScale); + } + public TickTransformProperties(uint tick, Transform t, Vector3 localScale) + { + Tick = tick; + Properties = new TransformProperties(t.localPosition, t.localRotation, localScale); + } + } + #endregion + + #region Private. + /// + /// Object to smooth. + /// + private Transform _graphicalObject; + /// + /// When not MoveRatesCls.UNSET_VALUE the graphical object will teleport into it's next position if the move distance exceeds this value. + /// + private float _teleportThreshold; + /// + /// How quickly to move towards goal values. + /// + private MoveRates _moveRates = new MoveRates(MoveRatesCls.UNSET_VALUE); + /// + /// True if a pretick occurred since last postTick. + /// + private bool _preTicked; + /// + /// Local values of the graphical during pretick. + /// + private TransformProperties _gfxInitializedLocalValues; + /// + /// World values of the graphical after it's been aligned to initialized values in PreTick. + /// + private TransformProperties _gfxPreSimulateWorldValues; + /// + /// TickDelta on the TimeManager. + /// + private float _tickDelta; + /// + /// How many ticks to interpolate over when not using adaptive. + /// + private byte _ownerInterpolation; + /// + /// Current interpolation, regardless of if using adaptive or not. + /// + private byte _interpolation; + /// + /// NetworkObject this is for. + /// + private NetworkObject _networkObject; + /// + /// Value to multiply movement by. This is used to reduce or increase the rate the movement buffer is consumed. + /// + private float _movementMultiplier = 1f; + /// + /// TransformProperties to move towards. + /// + private BasicQueue _transformProperties = new(); + #endregion + + #region Const. + /// + /// Maximum allowed entries to be queued over the interpolation amount. + /// + private int MAXIMUM_QUEUED_OVER_INTERPOLATION = 3; + #endregion + + /// + /// Initializes this smoother; should only be completed once. + /// + internal void InitializeOnce(NetworkObject nob, Transform graphicalObject, float teleportDistance, float tickDelta, byte ownerInterpolation) + { + _networkObject = nob; + _gfxInitializedLocalValues = graphicalObject.GetLocalProperties(); + _tickDelta = tickDelta; + _graphicalObject = graphicalObject; + _teleportThreshold = teleportDistance; + _ownerInterpolation = ownerInterpolation; + UpdateInterpolation(0); + } + + /// + /// Updates interpolation based on localClient latency. + /// + private void UpdateInterpolation(uint clientStateTick) + { + if (_networkObject.IsServerStarted || _networkObject.IsOwner) + { + _interpolation = _ownerInterpolation; + } + else + { + float interpolation; + TimeManager tm = _networkObject.TimeManager; + if (clientStateTick == 0) + { + //Not enough data to calculate; guestimate. This should only happen once. + float fRtt = (float)tm.RoundTripTime; + interpolation = (fRtt / 10f); + + } + else + { + interpolation = (tm.LocalTick - clientStateTick) + _networkObject.PredictionManager.Interpolation; + } + + interpolation = Mathf.Clamp(interpolation, _ownerInterpolation, byte.MaxValue); + _interpolation = (byte)Mathf.RoundToInt(interpolation); + } + } + + /// + /// Called every frame. + /// + internal void Update() + { + if (!CanSmooth()) + return; + + MoveToTarget(Time.deltaTime); + } + + /// + /// Called when the TimeManager invokes OnPreTick. + /// + internal void OnPreTick() + { + if (!CanSmooth()) + return; + + DiscardOverInterpolation(); + _preTicked = true; + _gfxPreSimulateWorldValues = _graphicalObject.GetWorldProperties(); + } + + internal void OnPreReconcile() + { + UpdateInterpolation(_networkObject.PredictionManager.ClientStateTick); + } + + internal void OnPostReplay(uint clientTick) + { + if (_transformProperties.Count == 0) + return; + + uint firstTick = _transformProperties.Peek().Tick; + //Already in motion to first entry, or first entry passed tick. + if (clientTick <= firstTick) + return; + + ModifyTransformProperties(clientTick, firstTick); + } + + /// + /// Called when TimeManager invokes OnPostTick. + /// + internal void OnPostTick(uint clientTick) + { + if (!CanSmooth()) + return; + + //If preticked then previous transform values are known. + if (_preTicked) + { + DiscardOverInterpolation(); + _graphicalObject.SetWorldProperties(_gfxPreSimulateWorldValues); + AddTransformProperties(clientTick); + } + //If did not pretick then the only thing we can do is snap to instantiated values. + else + { + _graphicalObject.SetLocalProperties(_gfxInitializedLocalValues); + } + } + + /// + /// Discards datas over interpolation limit. + /// + private void DiscardOverInterpolation() + { + int dequeueCount = (_transformProperties.Count - (_interpolation + MAXIMUM_QUEUED_OVER_INTERPOLATION)); + //If there are entries to dequeue. + if (dequeueCount > 0) + { + TickTransformProperties tpp = default; + for (int i = 0; i < dequeueCount; i++) + tpp = _transformProperties.Dequeue(); + + SetMoveRates(tpp.Properties, _transformProperties[0].Properties); + } + } + + /// + /// Adds a new transform properties and sets move rates if needed. + /// + private void AddTransformProperties(uint tick) + { + TickTransformProperties tpp = new TickTransformProperties(tick, _networkObject.transform, _graphicalObject.localScale); + _transformProperties.Enqueue(tpp); + //If first entry then set move rates. + if (_transformProperties.Count == 1) + SetMoveRates(new TransformProperties(_graphicalObject.position, _graphicalObject.rotation, _graphicalObject.localScale), tpp.Properties); + } + + /// + /// Modifies a transform property for a tick. This does not error check for empty collections. + /// + /// First tick in the queue. If 0 this will be looked up. + private void ModifyTransformProperties(uint clientTick, uint firstTick) + { + uint tick = clientTick; + /*Ticks will always be added incremental by 1 so it's safe to jump ahead the difference + * of tick and firstTick. */ + int index = (int)(tick - firstTick); + //Replace with new data. + if (index < _transformProperties.Count) + { + _transformProperties[index] = new TickTransformProperties(tick, _networkObject.transform, _graphicalObject.localScale); + } + else + { + //This should never happen. + } + } + + + /// + /// Returns if prediction can be used on this rigidbody. + /// + /// + private bool CanSmooth() + { + if (_graphicalObject == null) + return false; + + return true; + } + + /// + /// Sets Position and Rotation move rates to reach Target datas. + /// + private void SetMoveRates(TransformProperties prevValues, TransformProperties nextValues) + { + float duration = _tickDelta; + /* If interpolation is 1 then add on a tiny amount + * of more time to compensate for frame time, so that + * the smoothing does not complete before the next tick, + * as this would result in jitter. */ + float teleportT = _teleportThreshold; + _moveRates = MoveRates.GetMoveRates(prevValues, nextValues, duration, teleportT); + _moveRates.TimeRemaining = duration; + + SetMovementMultiplier(); + } + + private void SetMovementMultiplier() + { + /* If there's more in queue than interpolation then begin to move faster based on overage. + * Move 5% faster for every overage. */ + int overInterpolation = (_transformProperties.Count - _interpolation); + //If needs to be adjusted. + if (overInterpolation != 0f) + { + _movementMultiplier += (0.015f * overInterpolation); + } + //If does not need to be adjusted. + else + { + //If interpolation is 1 then slow down just barely to accomodate for frame delta variance. + if (_interpolation == 1) + _movementMultiplier = 0.99f; + } + + _movementMultiplier = Mathf.Clamp(_movementMultiplier, 0.95f, 1.05f); + } + + /// + /// Moves transform to target values. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void MoveToTarget(float delta) + { + int tpCount = _transformProperties.Count; + //No data. + if (tpCount == 0) + return; + /* If buffer is considerably under goal then halt + * movement. This will allow the buffer to grow. */ + if ((tpCount - _interpolation) < -4) + return; + + TickTransformProperties ttp = _transformProperties.Peek(); + _moveRates.MoveWorldToTarget(_graphicalObject, ttp.Properties, (delta * _movementMultiplier)); + float tRemaining = _moveRates.TimeRemaining; + //if TimeLeft is <= 0f then transform is at goal. Grab a new goal if possible. + if (tRemaining <= 0f) + { + //Dequeue current entry and if there's another call a move on it. + _transformProperties.Dequeue(); + + //If there are entries left then setup for the next. + if (_transformProperties.Count > 0) + { + SetMoveRates(ttp.Properties, _transformProperties.Peek().Properties); + //If delta is negative then call move again with abs. + if (tRemaining < 0f) + MoveToTarget(Mathf.Abs(tRemaining)); + } + //No remaining, set to snap. + else + { + _moveRates = new MoveRates(MoveRatesCls.UNSET_VALUE); + } + } + } + + public void ResetState() + { + _networkObject = null; + if (_graphicalObject != null) + { + _graphicalObject.SetLocalProperties(_gfxInitializedLocalValues); + _graphicalObject = null; + } + _movementMultiplier = 1f; + _transformProperties.Clear(); + _teleportThreshold = default; + _moveRates = default; + _preTicked = default; + _gfxInitializedLocalValues = default; + _gfxPreSimulateWorldValues = default; + _tickDelta = default; + _interpolation = default; + } + + public void InitializeState() { } + } + +} +#endif \ No newline at end of file diff --git a/Assets/FishNet/Runtime/Utility/AdaptiveLocalTransformSmoother.cs.meta b/Assets/FishNet/Runtime/Utility/AdaptiveLocalTransformSmoother.cs.meta new file mode 100644 index 0000000..e5d1ae0 --- /dev/null +++ b/Assets/FishNet/Runtime/Utility/AdaptiveLocalTransformSmoother.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 50721ce3e3600754dbc3c6e2e5446728 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/FishNet/Runtime/Utility/Constants.cs b/Assets/FishNet/Runtime/Utility/Constants.cs similarity index 76% rename from Assets/Packages/FishNet/Runtime/Utility/Constants.cs rename to Assets/FishNet/Runtime/Utility/Constants.cs index 4732801..9187e95 100644 --- a/Assets/Packages/FishNet/Runtime/Utility/Constants.cs +++ b/Assets/FishNet/Runtime/Utility/Constants.cs @@ -7,6 +7,9 @@ internal static class UtilityConstants public const string DEMOS_ASSEMBLY_NAME = "FishNet.Demos"; public const string TEST_ASSEMBLY_NAME = "FishNet.Test"; public const string RUNTIME_ASSEMBLY_NAME = "FishNet.Runtime"; + + public const string GENERATED_WRITER_PREFIX = "GWrite___"; + public const string GENERATED_READER_PREFIX = "GRead___"; } } \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Utility/Constants.cs.meta b/Assets/FishNet/Runtime/Utility/Constants.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Constants.cs.meta rename to Assets/FishNet/Runtime/Utility/Constants.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Utility/Extension.meta b/Assets/FishNet/Runtime/Utility/Extension.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Extension.meta rename to Assets/FishNet/Runtime/Utility/Extension.meta diff --git a/Assets/Packages/FishNet/Runtime/Utility/Extension/Networks.cs b/Assets/FishNet/Runtime/Utility/Extension/Networks.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Extension/Networks.cs rename to Assets/FishNet/Runtime/Utility/Extension/Networks.cs diff --git a/Assets/Packages/FishNet/Runtime/Utility/Extension/Networks.cs.meta b/Assets/FishNet/Runtime/Utility/Extension/Networks.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Extension/Networks.cs.meta rename to Assets/FishNet/Runtime/Utility/Extension/Networks.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Utility/Extension/Scenes.cs b/Assets/FishNet/Runtime/Utility/Extension/Scenes.cs similarity index 95% rename from Assets/Packages/FishNet/Runtime/Utility/Extension/Scenes.cs rename to Assets/FishNet/Runtime/Utility/Extension/Scenes.cs index 7d557d8..e3c1bb9 100644 --- a/Assets/Packages/FishNet/Runtime/Utility/Extension/Scenes.cs +++ b/Assets/FishNet/Runtime/Utility/Extension/Scenes.cs @@ -42,6 +42,9 @@ public static void GetSceneNetworkObjects(Scene s, bool firstOnly, bool errorOnD * for effort and readability. */ foreach (NetworkObject nob in nobCacheA) { + if (!nob.IsSceneObject) + continue; + nob.GetComponentsInParent(true, nobCacheB); //No extra nobs, only this one. if (nobCacheB.Count == 1 && !TryDisplayDuplicateError(nob)) @@ -53,6 +56,8 @@ public static void GetSceneNetworkObjects(Scene s, bool firstOnly, bool errorOnD { foreach (NetworkObject item in nobCacheA) { + if (!item.IsSceneObject) + continue; if (!TryDisplayDuplicateError(item)) result.Add(item); } diff --git a/Assets/Packages/FishNet/Runtime/Utility/Extension/Scenes.cs.meta b/Assets/FishNet/Runtime/Utility/Extension/Scenes.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Extension/Scenes.cs.meta rename to Assets/FishNet/Runtime/Utility/Extension/Scenes.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Utility/Extension/Transforms.cs b/Assets/FishNet/Runtime/Utility/Extension/Transforms.cs similarity index 96% rename from Assets/Packages/FishNet/Runtime/Utility/Extension/Transforms.cs rename to Assets/FishNet/Runtime/Utility/Extension/Transforms.cs index cd2e101..ab57932 100644 --- a/Assets/Packages/FishNet/Runtime/Utility/Extension/Transforms.cs +++ b/Assets/FishNet/Runtime/Utility/Extension/Transforms.cs @@ -155,7 +155,7 @@ public static void SetLocalPositionRotationAndScale(this Transform t, Vector3? n /// /// Oututs properties to use for a transform. When a nullable property has value that value is used, otherwise the transforms current property is used. /// - internal static void OutLocalPropertyValues(this Transform t, Vector3? nullablePos, Quaternion? nullableRot, Vector3? nullableScale, out Vector3 pos, out Quaternion rot, out Vector3 scale) + public static void OutLocalPropertyValues(this Transform t, Vector3? nullablePos, Quaternion? nullableRot, Vector3? nullableScale, out Vector3 pos, out Quaternion rot, out Vector3 scale) { pos = (nullablePos == null) ? t.localPosition : nullablePos.Value; rot = (nullableRot == null) ? t.localRotation : nullableRot.Value; diff --git a/Assets/Packages/FishNet/Runtime/Utility/Extension/Transforms.cs.meta b/Assets/FishNet/Runtime/Utility/Extension/Transforms.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Extension/Transforms.cs.meta rename to Assets/FishNet/Runtime/Utility/Extension/Transforms.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/PredictionTickSmoother.cs b/Assets/FishNet/Runtime/Utility/LocalTransformTickSmoother.cs similarity index 80% rename from Assets/Packages/FishNet/Runtime/Object/Prediction/PredictionTickSmoother.cs rename to Assets/FishNet/Runtime/Utility/LocalTransformTickSmoother.cs index e9fba49..0da0034 100644 --- a/Assets/Packages/FishNet/Runtime/Object/Prediction/PredictionTickSmoother.cs +++ b/Assets/FishNet/Runtime/Utility/LocalTransformTickSmoother.cs @@ -5,19 +5,14 @@ namespace FishNet.Object.Prediction { - internal class PredictionTickSmoother + internal class LocalTransformTickSmoother : IResettable { -#if PREDICTION_V2 #region Private. /// /// Object to smooth. /// private Transform _graphicalObject; /// - /// NetworkObject graphical belongs to. - /// - private NetworkObject _networkObject; - /// /// When not MoveRatesCls.UNSET_VALUE the graphical object will teleport into it's next position if the move distance exceeds this value. /// private float _teleportThreshold; @@ -34,10 +29,6 @@ internal class PredictionTickSmoother /// private TransformProperties _gfxInitializedLocalValues; /// - /// World values of the NetworkObject during pretick. - /// - private TransformProperties _nobPreSimulateWorldValues; - /// /// World values of the graphical after it's been aligned to initialized values in PreTick. /// private TransformProperties _gfxPreSimulateWorldValues; @@ -54,26 +45,15 @@ internal class PredictionTickSmoother /// /// Initializes this smoother; should only be completed once. /// - internal void InitializeOnce(Transform graphicalObject, float teleportDistance, NetworkObject nob, byte interpolation) + internal void InitializeOnce(Transform graphicalObject, float teleportDistance, float tickDelta, byte interpolation) { _gfxInitializedLocalValues = graphicalObject.GetLocalProperties(); - _nobPreSimulateWorldValues = nob.transform.GetWorldProperties(); - _tickDelta = (float)nob.TimeManager.TickDelta; + _tickDelta = tickDelta; _graphicalObject = graphicalObject; _teleportThreshold = (teleportDistance * (float)interpolation); - _networkObject = nob; _interpolation = interpolation; } - /// - /// Keeps initialized values but unsets runtime values. - /// - internal void Deinitialize() - { - _graphicalObject.SetLocalProperties(_gfxInitializedLocalValues); - _preTicked = false; - } - /// /// Called every frame. /// @@ -95,8 +75,6 @@ internal void OnPreTick() return; _preTicked = true; - - _nobPreSimulateWorldValues = _networkObject.transform.GetWorldProperties(); _gfxPreSimulateWorldValues = _graphicalObject.GetWorldProperties(); } @@ -129,8 +107,6 @@ private bool CanSmooth() { if (_graphicalObject == null) return false; - if (_networkObject.IsServerOnlyStarted) - return false; return true; } @@ -146,7 +122,7 @@ private void SetMoveRates(TransformProperties prevValues, Transform t) * the smoothing does not complete before the next tick, * as this would result in jitter. */ if (_interpolation == 1) - duration += (1f / 50f); + duration += Mathf.Max(Time.deltaTime, (1f / 50f)); float teleportT = _teleportThreshold; _moveRates = MoveRates.GetLocalMoveRates(prevValues, t, duration, teleportT); } @@ -161,7 +137,23 @@ private void MoveToTarget() _moveRates.MoveLocalToTarget(_graphicalObject, _gfxInitializedLocalValues, Time.deltaTime); } -#endif + public void ResetState() + { + if (_graphicalObject != null) + { + _graphicalObject.SetLocalProperties(_gfxInitializedLocalValues); + _graphicalObject = null; + } + _teleportThreshold = default; + _moveRates = default; + _preTicked = default; + _gfxInitializedLocalValues = default; + _gfxPreSimulateWorldValues = default; + _tickDelta = default; + _interpolation = default; + } + + public void InitializeState() { } } diff --git a/Assets/FishNet/Runtime/Utility/LocalTransformTickSmoother.cs.meta b/Assets/FishNet/Runtime/Utility/LocalTransformTickSmoother.cs.meta new file mode 100644 index 0000000..9d005c2 --- /dev/null +++ b/Assets/FishNet/Runtime/Utility/LocalTransformTickSmoother.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: facff21f41a83964fb8c0dc195d94646 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance.meta b/Assets/FishNet/Runtime/Utility/Performance.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Performance.meta rename to Assets/FishNet/Runtime/Utility/Performance.meta diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance/BasicQueue.cs b/Assets/FishNet/Runtime/Utility/Performance/BasicQueue.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Performance/BasicQueue.cs rename to Assets/FishNet/Runtime/Utility/Performance/BasicQueue.cs diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance/BasicQueue.cs.meta b/Assets/FishNet/Runtime/Utility/Performance/BasicQueue.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Performance/BasicQueue.cs.meta rename to Assets/FishNet/Runtime/Utility/Performance/BasicQueue.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance/ByteArrayPool.cs b/Assets/FishNet/Runtime/Utility/Performance/ByteArrayPool.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Performance/ByteArrayPool.cs rename to Assets/FishNet/Runtime/Utility/Performance/ByteArrayPool.cs diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance/ByteArrayPool.cs.meta b/Assets/FishNet/Runtime/Utility/Performance/ByteArrayPool.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Performance/ByteArrayPool.cs.meta rename to Assets/FishNet/Runtime/Utility/Performance/ByteArrayPool.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance/DefaultObjectPool.cs b/Assets/FishNet/Runtime/Utility/Performance/DefaultObjectPool.cs similarity index 98% rename from Assets/Packages/FishNet/Runtime/Utility/Performance/DefaultObjectPool.cs rename to Assets/FishNet/Runtime/Utility/Performance/DefaultObjectPool.cs index 62695c8..be04852 100644 --- a/Assets/Packages/FishNet/Runtime/Utility/Performance/DefaultObjectPool.cs +++ b/Assets/FishNet/Runtime/Utility/Performance/DefaultObjectPool.cs @@ -113,7 +113,7 @@ public override void StoreObject(NetworkObject instantiated, bool asServer) } instantiated.gameObject.SetActive(false); - instantiated.ResetState(); + instantiated.ResetState(asServer); Stack cache = GetOrCreateCache(instantiated.SpawnableCollectionId, instantiated.PrefabId); cache.Push(instantiated); } @@ -185,7 +185,7 @@ public void ClearPool(int collectionId) /// /// /// - private Stack GetOrCreateCache(int collectionId, int prefabId) + public Stack GetOrCreateCache(int collectionId, int prefabId) { if (collectionId >= _cacheCount) { diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance/DefaultObjectPool.cs.meta b/Assets/FishNet/Runtime/Utility/Performance/DefaultObjectPool.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Performance/DefaultObjectPool.cs.meta rename to Assets/FishNet/Runtime/Utility/Performance/DefaultObjectPool.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance/ObjectPool.cs b/Assets/FishNet/Runtime/Utility/Performance/ObjectPool.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Performance/ObjectPool.cs rename to Assets/FishNet/Runtime/Utility/Performance/ObjectPool.cs diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance/ObjectPool.cs.meta b/Assets/FishNet/Runtime/Utility/Performance/ObjectPool.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Performance/ObjectPool.cs.meta rename to Assets/FishNet/Runtime/Utility/Performance/ObjectPool.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance/RingBuffer.cs b/Assets/FishNet/Runtime/Utility/Performance/RingBuffer.cs similarity index 99% rename from Assets/Packages/FishNet/Runtime/Utility/Performance/RingBuffer.cs rename to Assets/FishNet/Runtime/Utility/Performance/RingBuffer.cs index 8fd1b9d..22d1e37 100644 --- a/Assets/Packages/FishNet/Runtime/Utility/Performance/RingBuffer.cs +++ b/Assets/FishNet/Runtime/Utility/Performance/RingBuffer.cs @@ -1,4 +1,4 @@ -#if !PREDICTION_V2 +#if PREDICTION_1 using FishNet.Documenting; using FishNet.Managing; using System.Collections; diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance/RingBuffer.cs.meta b/Assets/FishNet/Runtime/Utility/Performance/RingBuffer.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Performance/RingBuffer.cs.meta rename to Assets/FishNet/Runtime/Utility/Performance/RingBuffer.cs.meta diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance/Transforms.cs b/Assets/FishNet/Runtime/Utility/Performance/Transforms.cs similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Performance/Transforms.cs rename to Assets/FishNet/Runtime/Utility/Performance/Transforms.cs diff --git a/Assets/Packages/FishNet/Runtime/Utility/Performance/Transforms.cs.meta b/Assets/FishNet/Runtime/Utility/Performance/Transforms.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Runtime/Utility/Performance/Transforms.cs.meta rename to Assets/FishNet/Runtime/Utility/Performance/Transforms.cs.meta diff --git a/Assets/Packages/FishNet/THIRD PARTY NOTICE.md b/Assets/FishNet/THIRD PARTY NOTICE.md similarity index 100% rename from Assets/Packages/FishNet/THIRD PARTY NOTICE.md rename to Assets/FishNet/THIRD PARTY NOTICE.md diff --git a/Assets/Packages/FishNet/THIRD PARTY NOTICE.md.meta b/Assets/FishNet/THIRD PARTY NOTICE.md.meta similarity index 100% rename from Assets/Packages/FishNet/THIRD PARTY NOTICE.md.meta rename to Assets/FishNet/THIRD PARTY NOTICE.md.meta diff --git a/Assets/Packages/FishNet/Upgrading.meta b/Assets/FishNet/Upgrading.meta similarity index 100% rename from Assets/Packages/FishNet/Upgrading.meta rename to Assets/FishNet/Upgrading.meta diff --git a/Assets/Packages/FishNet/Upgrading/MirrorUpgrade.cs b/Assets/FishNet/Upgrading/MirrorUpgrade.cs similarity index 100% rename from Assets/Packages/FishNet/Upgrading/MirrorUpgrade.cs rename to Assets/FishNet/Upgrading/MirrorUpgrade.cs diff --git a/Assets/Packages/FishNet/Upgrading/MirrorUpgrade.cs.meta b/Assets/FishNet/Upgrading/MirrorUpgrade.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Upgrading/MirrorUpgrade.cs.meta rename to Assets/FishNet/Upgrading/MirrorUpgrade.cs.meta diff --git a/Assets/Packages/FishNet/Upgrading/UpgradeFromMirrorMenu.cs b/Assets/FishNet/Upgrading/UpgradeFromMirrorMenu.cs similarity index 93% rename from Assets/Packages/FishNet/Upgrading/UpgradeFromMirrorMenu.cs rename to Assets/FishNet/Upgrading/UpgradeFromMirrorMenu.cs index 5e2d6b8..268d30d 100644 --- a/Assets/Packages/FishNet/Upgrading/UpgradeFromMirrorMenu.cs +++ b/Assets/FishNet/Upgrading/UpgradeFromMirrorMenu.cs @@ -22,7 +22,7 @@ public class UpgradeFromMirrorMenu : MonoBehaviour /// /// Replaces all components. /// - [MenuItem("Fish-Networking/Upgrading/From Mirror/Replace Components", false, 2)] + [MenuItem("Fish-Networking/Utility/Upgrading/From Mirror/Replace Components", false, 1)] private static void ReplaceComponents() { #if MIRROR @@ -40,7 +40,7 @@ private static void ReplaceComponents() #endif } - [MenuItem("Fish-Networking/Upgrading/From Mirror/Remove Defines", false, 2)] + [MenuItem("Fish-Networking/Utility/Upgrading/From Mirror/Remove Defines", false, 2)] private static void RemoveDefines() { string currentDefines = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup); diff --git a/Assets/Packages/FishNet/Upgrading/UpgradeFromMirrorMenu.cs.meta b/Assets/FishNet/Upgrading/UpgradeFromMirrorMenu.cs.meta similarity index 100% rename from Assets/Packages/FishNet/Upgrading/UpgradeFromMirrorMenu.cs.meta rename to Assets/FishNet/Upgrading/UpgradeFromMirrorMenu.cs.meta diff --git a/Assets/FishNet/VERSION.txt b/Assets/FishNet/VERSION.txt new file mode 100644 index 0000000..078bf8b --- /dev/null +++ b/Assets/FishNet/VERSION.txt @@ -0,0 +1 @@ +4.2.2 \ No newline at end of file diff --git a/Assets/Packages/FishNet/VERSION.txt.meta b/Assets/FishNet/VERSION.txt.meta similarity index 100% rename from Assets/Packages/FishNet/VERSION.txt.meta rename to Assets/FishNet/VERSION.txt.meta diff --git a/Assets/Packages/FishNet/package.json b/Assets/FishNet/package.json similarity index 97% rename from Assets/Packages/FishNet/package.json rename to Assets/FishNet/package.json index a87a191..187d5c0 100644 --- a/Assets/Packages/FishNet/package.json +++ b/Assets/FishNet/package.json @@ -1,6 +1,6 @@ { "name": "com.firstgeargames.fishnet", - "version": "4.1.2", + "version": "4.2.2", "displayName": "FishNet: Networking Evolved", "description": "A feature-rich Unity networking solution aimed towards reliability, ease of use, efficiency, and flexibility.", "unity": "2021.3", diff --git a/Assets/Packages/FishNet/package.json.meta b/Assets/FishNet/package.json.meta similarity index 100% rename from Assets/Packages/FishNet/package.json.meta rename to Assets/FishNet/package.json.meta diff --git a/Assets/InputSystem.inputsettings.asset b/Assets/InputSystem.inputsettings.asset new file mode 100644 index 0000000..efeaac2 --- /dev/null +++ b/Assets/InputSystem.inputsettings.asset @@ -0,0 +1,37 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3} + m_Name: InputSystem.inputsettings + m_EditorClassIdentifier: + m_SupportedDevices: [] + m_UpdateMode: 1 + m_MaxEventBytesPerUpdate: 5242880 + m_MaxQueuedEventsPerUpdate: 1000 + m_CompensateForScreenOrientation: 1 + m_BackgroundBehavior: 0 + m_EditorInputBehaviorInPlayMode: 0 + m_InputActionPropertyDrawerMode: 0 + m_DefaultDeadzoneMin: 0.125 + m_DefaultDeadzoneMax: 0.925 + m_DefaultButtonPressPoint: 0.5 + m_ButtonReleaseThreshold: 0.75 + m_DefaultTapTime: 0.2 + m_DefaultSlowTapTime: 0.5 + m_DefaultHoldTime: 0.4 + m_TapRadius: 5 + m_MultiTapDelayTime: 0.75 + m_DisableRedundantEventsMerging: 0 + m_ShortcutKeysConsumeInputs: 0 + m_iOSSettings: + m_MotionUsage: + m_Enabled: 0 + m_Description: diff --git a/Assets/InputSystem.inputsettings.asset.meta b/Assets/InputSystem.inputsettings.asset.meta new file mode 100644 index 0000000..9c2db4a --- /dev/null +++ b/Assets/InputSystem.inputsettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2ce5eab3cc4aa7f4bb90ae5712a9c021 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/LeanTween/Examples/Material/AlphBumps.mat b/Assets/LeanTween/Examples/Material/AlphBumps.mat index 8e30640..9aca969 100644 --- a/Assets/LeanTween/Examples/Material/AlphBumps.mat +++ b/Assets/LeanTween/Examples/Material/AlphBumps.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -37,6 +37,7 @@ Material: RenderType: Transparent disabledShaderPasses: - DepthOnly + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -102,3 +103,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/LeanTween/Examples/Material/AlphaReadyMaterial.mat b/Assets/LeanTween/Examples/Material/AlphaReadyMaterial.mat index 13df7d2..65fdb8d 100644 --- a/Assets/LeanTween/Examples/Material/AlphaReadyMaterial.mat +++ b/Assets/LeanTween/Examples/Material/AlphaReadyMaterial.mat @@ -25,6 +25,7 @@ Material: RenderType: Transparent disabledShaderPasses: - DepthOnly + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -90,6 +91,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &6030565573209226532 MonoBehaviour: m_ObjectHideFlags: 11 @@ -102,4 +104,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Material/DirectionalArrowMaterial.mat b/Assets/LeanTween/Examples/Material/DirectionalArrowMaterial.mat index 18c40ec..825c567 100644 --- a/Assets/LeanTween/Examples/Material/DirectionalArrowMaterial.mat +++ b/Assets/LeanTween/Examples/Material/DirectionalArrowMaterial.mat @@ -21,7 +21,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -87,6 +88,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &1957075174494505355 MonoBehaviour: m_ObjectHideFlags: 11 @@ -99,4 +101,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Material/Futoro_PlanetMaterial.mat b/Assets/LeanTween/Examples/Material/Futoro_PlanetMaterial.mat index 047fe6f..930b95a 100644 --- a/Assets/LeanTween/Examples/Material/Futoro_PlanetMaterial.mat +++ b/Assets/LeanTween/Examples/Material/Futoro_PlanetMaterial.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -35,7 +35,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -111,3 +112,4 @@ Material: - _ReflectColor: {r: 0, g: 0, b: 0, a: 0.5019608} - _SpecColor: {r: 0.05799573, g: 0.04163062, b: 0.25735295, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/LeanTween/Examples/Material/Graph.mat b/Assets/LeanTween/Examples/Material/Graph.mat index ff9d372..350a6dc 100644 --- a/Assets/LeanTween/Examples/Material/Graph.mat +++ b/Assets/LeanTween/Examples/Material/Graph.mat @@ -22,7 +22,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -89,6 +90,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &4613038751364543447 MonoBehaviour: m_ObjectHideFlags: 11 @@ -101,4 +103,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Material/GridLines.mat b/Assets/LeanTween/Examples/Material/GridLines.mat index 75ce6c4..c92319d 100644 --- a/Assets/LeanTween/Examples/Material/GridLines.mat +++ b/Assets/LeanTween/Examples/Material/GridLines.mat @@ -22,7 +22,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -96,6 +97,7 @@ Material: - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} - _SpecColor: {r: 1, g: 1, b: 1, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &1558999799627338228 MonoBehaviour: m_ObjectHideFlags: 11 @@ -108,4 +110,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Material/Ground.mat b/Assets/LeanTween/Examples/Material/Ground.mat index 3d0afb3..ae5753d 100644 --- a/Assets/LeanTween/Examples/Material/Ground.mat +++ b/Assets/LeanTween/Examples/Material/Ground.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -34,7 +34,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -100,3 +101,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/LeanTween/Examples/Material/LineGlowMaterial.mat b/Assets/LeanTween/Examples/Material/LineGlowMaterial.mat index 36000be..f23f432 100644 --- a/Assets/LeanTween/Examples/Material/LineGlowMaterial.mat +++ b/Assets/LeanTween/Examples/Material/LineGlowMaterial.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -35,7 +35,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -103,3 +104,4 @@ Material: - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} - _TintColor: {r: 0.41106036, g: 0.75850374, b: 0.9029851, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/LeanTween/Examples/Material/Mock2d.mat b/Assets/LeanTween/Examples/Material/Mock2d.mat index ead51c4..b61309e 100644 --- a/Assets/LeanTween/Examples/Material/Mock2d.mat +++ b/Assets/LeanTween/Examples/Material/Mock2d.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -34,7 +34,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -100,3 +101,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/LeanTween/Examples/Material/PointMark.mat b/Assets/LeanTween/Examples/Material/PointMark.mat index 6b6e5c9..cca4455 100644 --- a/Assets/LeanTween/Examples/Material/PointMark.mat +++ b/Assets/LeanTween/Examples/Material/PointMark.mat @@ -21,7 +21,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -87,6 +88,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &194112180848095527 MonoBehaviour: m_ObjectHideFlags: 11 @@ -99,4 +101,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Material/TrackCar.mat b/Assets/LeanTween/Examples/Material/TrackCar.mat index 47f4fcd..cd414fa 100644 --- a/Assets/LeanTween/Examples/Material/TrackCar.mat +++ b/Assets/LeanTween/Examples/Material/TrackCar.mat @@ -22,7 +22,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -119,6 +120,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &2201852866239367343 MonoBehaviour: m_ObjectHideFlags: 11 @@ -131,4 +133,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Material/WalkingStick.mat b/Assets/LeanTween/Examples/Material/WalkingStick.mat index a24094e..24979bd 100644 --- a/Assets/LeanTween/Examples/Material/WalkingStick.mat +++ b/Assets/LeanTween/Examples/Material/WalkingStick.mat @@ -19,7 +19,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -85,6 +86,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &8015321075434694585 MonoBehaviour: m_ObjectHideFlags: 11 @@ -97,4 +99,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Models/Materials/LMaterial.mat b/Assets/LeanTween/Examples/Models/Materials/LMaterial.mat index 8ae5c83..44a5f9b 100644 --- a/Assets/LeanTween/Examples/Models/Materials/LMaterial.mat +++ b/Assets/LeanTween/Examples/Models/Materials/LMaterial.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -37,6 +37,7 @@ Material: RenderType: Transparent disabledShaderPasses: - DepthOnly + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -102,3 +103,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/LeanTween/Examples/Models/Materials/LineMaterial.mat b/Assets/LeanTween/Examples/Models/Materials/LineMaterial.mat index 9fdd585..6a7b126 100644 --- a/Assets/LeanTween/Examples/Models/Materials/LineMaterial.mat +++ b/Assets/LeanTween/Examples/Models/Materials/LineMaterial.mat @@ -21,7 +21,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -87,6 +88,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &9043558471132092618 MonoBehaviour: m_ObjectHideFlags: 11 @@ -99,4 +101,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Models/Materials/Material.001.mat b/Assets/LeanTween/Examples/Models/Materials/Material.001.mat index 248503b..2388228 100644 --- a/Assets/LeanTween/Examples/Models/Materials/Material.001.mat +++ b/Assets/LeanTween/Examples/Models/Materials/Material.001.mat @@ -21,7 +21,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -87,6 +88,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &7420515346537725566 MonoBehaviour: m_ObjectHideFlags: 11 @@ -99,4 +101,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Models/Materials/Material.mat b/Assets/LeanTween/Examples/Models/Materials/Material.mat index 8c265c0..b08ede6 100644 --- a/Assets/LeanTween/Examples/Models/Materials/Material.mat +++ b/Assets/LeanTween/Examples/Models/Materials/Material.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -34,7 +34,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -100,3 +101,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/LeanTween/Examples/Models/Materials/Material_001.mat b/Assets/LeanTween/Examples/Models/Materials/Material_001.mat index babf978..f8eec40 100644 --- a/Assets/LeanTween/Examples/Models/Materials/Material_001.mat +++ b/Assets/LeanTween/Examples/Models/Materials/Material_001.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -34,7 +34,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -100,3 +101,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/LeanTween/Examples/Models/Materials/No Name.mat b/Assets/LeanTween/Examples/Models/Materials/No Name.mat index 7112ea8..f6c036b 100644 --- a/Assets/LeanTween/Examples/Models/Materials/No Name.mat +++ b/Assets/LeanTween/Examples/Models/Materials/No Name.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -35,7 +35,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -101,3 +102,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarAlphaBlue.mat b/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarAlphaBlue.mat index ebc735a..1849f8d 100644 --- a/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarAlphaBlue.mat +++ b/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarAlphaBlue.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -37,6 +37,7 @@ Material: RenderType: Transparent disabledShaderPasses: - DepthOnly + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -102,3 +103,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarBlue.mat b/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarBlue.mat index 2190d9c..c077185 100644 --- a/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarBlue.mat +++ b/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarBlue.mat @@ -21,7 +21,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -87,6 +88,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &5336196303657017966 MonoBehaviour: m_ObjectHideFlags: 11 @@ -99,4 +101,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarHat.mat b/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarHat.mat index 8ba92ae..573d912 100644 --- a/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarHat.mat +++ b/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarHat.mat @@ -21,7 +21,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -89,6 +90,7 @@ Material: - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0} - _TintColor: {r: 1, g: 1, b: 1, a: 0.5019608} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &8163978053633728052 MonoBehaviour: m_ObjectHideFlags: 11 @@ -101,4 +103,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarMat.mat b/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarMat.mat index d3b857e..c00dabe 100644 --- a/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarMat.mat +++ b/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarMat.mat @@ -21,7 +21,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -87,6 +88,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &1001121489474824866 MonoBehaviour: m_ObjectHideFlags: 11 @@ -99,4 +101,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarSpace.mat b/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarSpace.mat index 7ddd5da..04c56ed 100644 --- a/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarSpace.mat +++ b/Assets/LeanTween/Examples/Models/Materials/SimpleAvatarSpace.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -32,7 +32,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -133,3 +134,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/LeanTween/Examples/Models/Materials/SubTitleText.mat b/Assets/LeanTween/Examples/Models/Materials/SubTitleText.mat index 56a5b7a..62248c2 100644 --- a/Assets/LeanTween/Examples/Models/Materials/SubTitleText.mat +++ b/Assets/LeanTween/Examples/Models/Materials/SubTitleText.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -34,7 +34,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -100,3 +101,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/LeanTween/Examples/Models/Materials/eanTween.mat b/Assets/LeanTween/Examples/Models/Materials/eanTween.mat index f6f53e4..c35da31 100644 --- a/Assets/LeanTween/Examples/Models/Materials/eanTween.mat +++ b/Assets/LeanTween/Examples/Models/Materials/eanTween.mat @@ -21,7 +21,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -98,6 +99,7 @@ Material: - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0} - _TintColor: {r: 1, g: 1, b: 1, a: 0.5019608} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &1280848048635676569 MonoBehaviour: m_ObjectHideFlags: 11 @@ -110,4 +112,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/LeanTween/Examples/Prefabs/EndlessPiece.prefab b/Assets/LeanTween/Examples/Prefabs/EndlessPiece.prefab deleted file mode 100644 index af5c8cc..0000000 Binary files a/Assets/LeanTween/Examples/Prefabs/EndlessPiece.prefab and /dev/null differ diff --git a/Assets/LeanTween/Examples/Prefabs/EndlessPiece.prefab.meta b/Assets/LeanTween/Examples/Prefabs/EndlessPiece.prefab.meta deleted file mode 100644 index dc92316..0000000 --- a/Assets/LeanTween/Examples/Prefabs/EndlessPiece.prefab.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 9c73e0cec0a374576a4b47fbb49921d5 diff --git a/Assets/MiningEvent.cs b/Assets/MiningEvent.cs new file mode 100644 index 0000000..1a12bac --- /dev/null +++ b/Assets/MiningEvent.cs @@ -0,0 +1,112 @@ +using System.Collections; +using UnityEditor.PackageManager; +using UnityEngine; +using static TreeCuttingEvent; + +public class MiningEvent : MonoBehaviour +{ + public static MiningEvent instance; + private bool isMining = false; + public int circles = 1; + public int maxScore; + public int passingScore; + public int currentScore = 0; + + [SerializeField] private GameObject actionCirclesPrefab; + public enum MiningScore + { + Perfect, + Excellent, + Good, + Poor, + Bad, + Failed + } + public MiningScore miningScore; + + private void Update() + { + } + + public void StartMiningEvent(OreHealth oreHealth, ResourceNode resourceNode, GameObject objectToAction, RaycastHit HitInfo, FishNet.Connection.NetworkConnection localConnection, GameObject player) + { + Debug.Log("In StartMiningEvent"); + circles = 1; + // Instantiate actionCriclesPrefab GameObject + GameObject actionCircles = Instantiate(actionCirclesPrefab); + actionCircles.GetComponent().enabled = true; + + isMining = true; + StartCoroutine(Mining(oreHealth, resourceNode, objectToAction, HitInfo, localConnection, player)); + Debug.Log("Mining Coroutine stopped."); + //this.gameObject.SetActive(false); + } + + private void Awake() + { + if (instance != null) + { + Destroy(gameObject); + } + else + { + DontDestroyOnLoad(gameObject); + instance = this; + } + } + + public IEnumerator Mining(OreHealth oreHealth, ResourceNode resourceNode, GameObject objectToAction, RaycastHit HitInfo, FishNet.Connection.NetworkConnection localConnection, GameObject player) + { + while (isMining) + { + Debug.Log("Inside Mining() function. Circles count = " + circles); + if (circles <= 0) + { + Debug.LogError("Circles is less than or equal to 0."); + isMining = false; + CompleteMining(oreHealth, resourceNode, objectToAction, HitInfo, localConnection, player); + //yield return null; + } + yield return null; + } + Debug.Log("Inside Mining() AFTERRRRRRRRRRRRRR function. Circles count = " + circles); + //Debug.Log("Mining Coroutine ending."); + //this.gameObject.SetActive(false); + //CompleteMining(oreHealth, resourceNode, objectToAction, HitInfo, localConnection); + yield return null; + } + + private void CompleteMining(OreHealth oreHealth, ResourceNode resourceNode, GameObject objectToAction, RaycastHit HitInfo, FishNet.Connection.NetworkConnection localConnection, GameObject player) + { + Debug.LogError("Current score = " + currentScore); + Debug.LogError("Circle count= " + circles); + if (currentScore >= passingScore + 2) + { + Debug.LogError("Mining complete. Score of Excellent."); + miningScore = MiningScore.Excellent; + currentScore = 0; + OreCutting.DamageOre(oreHealth, resourceNode, objectToAction, HitInfo, miningScore, localConnection, player); + return; + } + else if (currentScore >= passingScore) + { + Debug.LogError("Mining complete. Score of Good."); + miningScore = MiningScore.Excellent; + currentScore = 0; + OreCutting.DamageOre(oreHealth, resourceNode, objectToAction, HitInfo, miningScore, localConnection, player); + return; + } + else + { + Debug.LogError("Mining failed."); + currentScore = 0; + miningScore = MiningScore.Failed; + OreCutting.DamageOre(oreHealth, resourceNode, objectToAction, HitInfo, miningScore, localConnection, player); + } + } + + void Start() + { + //StartCoroutine(Mining()); + } +} diff --git a/Assets/MiningEvent.cs.meta b/Assets/MiningEvent.cs.meta new file mode 100644 index 0000000..88e4034 --- /dev/null +++ b/Assets/MiningEvent.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 3a0e0f2cf045ac749a9a762ec7e463d5 \ No newline at end of file diff --git a/Assets/New Terrain 2.asset b/Assets/New Terrain 2.asset new file mode 100644 index 0000000..c05cfce Binary files /dev/null and b/Assets/New Terrain 2.asset differ diff --git a/Assets/New Terrain 2.asset.meta b/Assets/New Terrain 2.asset.meta new file mode 100644 index 0000000..a45f62a --- /dev/null +++ b/Assets/New Terrain 2.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 05722cbd4a09c3b46a462869f54ca478 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 15600000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/New Terrain 3.asset b/Assets/New Terrain 3.asset new file mode 100644 index 0000000..1bd29d4 Binary files /dev/null and b/Assets/New Terrain 3.asset differ diff --git a/Assets/New Terrain 3.asset.meta b/Assets/New Terrain 3.asset.meta new file mode 100644 index 0000000..d0971a6 --- /dev/null +++ b/Assets/New Terrain 3.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0e83a40fbcc97a84592a9fe6d7116c69 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 15600000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/New Terrain 4.asset b/Assets/New Terrain 4.asset new file mode 100644 index 0000000..50d7906 Binary files /dev/null and b/Assets/New Terrain 4.asset differ diff --git a/Assets/New Terrain 4.asset.meta b/Assets/New Terrain 4.asset.meta new file mode 100644 index 0000000..cc3a822 --- /dev/null +++ b/Assets/New Terrain 4.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8056e5ac2bd709249925a4a7a22ba61b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 15600000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/New Terrain.asset b/Assets/New Terrain.asset index 8279825..79ef5b6 100644 Binary files a/Assets/New Terrain.asset and b/Assets/New Terrain.asset differ diff --git a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/Fire.cs b/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/Fire.cs deleted file mode 100644 index 8783e36..0000000 --- a/Assets/Packages/FishNet/Demos/ColliderRollback/Scripts/Player/Fire.cs +++ /dev/null @@ -1,197 +0,0 @@ -using FishNet.Component.ColliderRollback; -using FishNet.Managing.Timing; -using FishNet.Object; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - - -namespace FishNet.Example.ColliderRollbacks -{ - - /// - /// DEMO. CODE IS NOT OPTIMIZED. - /// Fires at objects. - /// - public class Fire : NetworkBehaviour - { - //PROSTART - /// - /// Layer hitboxes are on. - /// - [Tooltip("Layer hitboxes are on.")] - [SerializeField] - private LayerMask _hitboxLayer; - /// - /// Audio to play when firing. - /// - [Tooltip("Audio to play when firing.")] - [SerializeField] - private AudioClip _audio; - /// - /// Muzzle flash to spawn. - /// - [Tooltip("Muzzle flash to spawn.")] - [SerializeField] - private GameObject _muzzleFlashPrefab; - /// - /// Next time player may fire. - /// - private float _nextFire = 0f; - /// - /// How often the player can fire. - /// - private const float FIRE_RATE = 0.2f; - - /// - /// Aim component on this object. - /// - private Aim _aim; - /// - /// Differences in hit registration. - /// - private List _differences = new List(); - - public override void OnStartClient() - { - if (base.IsOwner) - _aim = GetComponent(); - } - - private void Update() - { - if (base.IsOwner) - { - //CheckFire(); - CheckFireDemo(); - } - } - - #region Real usage example. - /// - /// A demonstration of what firing in your game may look like. - /// - private void CheckFire() - { - if (Time.time < _nextFire) - return; - //Only fire on mouse0 down. - if (!Input.GetKeyDown(KeyCode.Mouse0)) - return; - - _nextFire = Time.time + FIRE_RATE; - - Vector3 direction = _aim.PlayerCamera.transform.forward; - Vector3 start = _aim.PlayerCamera.transform.position; - ServerFire(base.TimeManager.GetPreciseTick(base.TimeManager.LastPacketTick.Value()), start, direction); - } - - /// - /// Fires using a specified fixed frame. - /// - /// - [ServerRpc] - private void ServerFire(PreciseTick pt, Vector3 start, Vector3 direction) - { - /* IMPORTANT. - * base.IsOwner is passed into the Rollback - * to indicate that this is being performed - * on a host object. EG: If this object is owned by - * the server then it must be the clientHost object. */ - - //Notes - /* Rollback using the frame sent in while - * also including the interpolated reduction value. */ - base.RollbackManager.Rollback(pt, RollbackPhysicsType.Physics, base.IsOwner); - - /* Perform your raycast here using typical values. - * EG: Trace from start, to direction, on whatever hit - * layers you would normally use. Process hit results normally. */ - - /* After performing your trace it's important to call RollbackManager.ReturnForward(). */ - base.RollbackManager.Return(); - } - #endregion - - #region Demo. - /// - /// Only sends fire command if an object is hit locally to test accuracy. - /// - private void CheckFireDemo() - { - if (Time.time < _nextFire) - return; - //Only fire on mouse0 down. - if (!Input.GetKeyDown(KeyCode.Mouse0)) - return; - - _nextFire = Time.time + FIRE_RATE; - //Audio and muzzle flash effects. - AudioSource.PlayClipAtPoint(_audio, _aim.PlayerCamera.transform.position); - Instantiate(_muzzleFlashPrefab, _aim.PlayerCamera.MuzzleFlash.position, _aim.PlayerCamera.MuzzleFlash.rotation); - Vector3 direction = _aim.PlayerCamera.transform.forward; - Vector3 start = _aim.PlayerCamera.transform.position; - - Ray ray = new Ray(start, direction); - RaycastHit hit; - //If raycast hit. - if (Physics.Raycast(ray, out hit, float.PositiveInfinity, _hitboxLayer)) - { - //If moving enemy was hit. - if (hit.transform.root.GetComponent() != null) - { - PreciseTick pt = base.TimeManager.GetPreciseTick(base.TimeManager.LastPacketTick.Value()); - //Send the frame, start, and direction. - /* The remaining arguments are used to calculate - * the accuracy between where client hit and where - * shot will register on server. There is no reason to - * really know these results other than for testing. */ - ServerFireDemo(pt, start, direction, - hit.transform.root.GetComponent(), hit.transform.position); - } - } - } - - /// - /// Fires using a specified fixed frame. - /// - /// - [ServerRpc] - private void ServerFireDemo(PreciseTick pt, Vector3 start, Vector3 direction, NetworkObject hitObject, Vector3 hitIdentityPosition) - { - Transform hitChild = hitObject.transform.GetChild(0); - /* Rollback using the frame sent in - * while subtracting frames for interpolation, such - * as a NetworkTransform moving an object into position. */ - base.RollbackManager.Rollback(pt, RollbackPhysicsType.Physics, base.IsOwner); - /* This is where you would use the start - * and direction to fire your raycast. This method is - * only used to show accuracy so I won't be using those here. */ - - //The hitbox is hard set to first child for demo. - Vector3 rollbackPosition = hitChild.position; - float difference = Vector3.Distance(hitIdentityPosition, rollbackPosition); - if (difference <= 0.00001f) - difference = 0f; - //if (canRollback) - base.RollbackManager.Return(); - - //Distance object root is after rollback, in comparison to where it was when client hit it. - //Only print if also not client. - if (!base.IsClientStarted) - { - _differences.Add(difference); - if (_differences.Count > 20) - _differences.RemoveAt(0); - float averageDifference = (_differences.Sum() / _differences.Count); - Debug.Log($"Difference {difference.ToString("0.000")}m. Average difference {averageDifference.ToString("0.000")}m."); - } - RollbackVisualizer med = hitObject.GetComponent(); - med.ShowDifference(base.NetworkObject, hitIdentityPosition, rollbackPosition); - } - #endregion - //PROEND - - } -} - diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Prefabs/CharacterControllerPrediction.prefab b/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Prefabs/CharacterControllerPrediction.prefab deleted file mode 100644 index d60031d..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Prefabs/CharacterControllerPrediction.prefab +++ /dev/null @@ -1,311 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &50058147544064912 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 8274935638305073705} - - component: {fileID: 5937955550093657123} - - component: {fileID: 8512892203317417748} - m_Layer: 0 - m_Name: Capsule - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &8274935638305073705 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 50058147544064912} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 9117857247562382215} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &5937955550093657123 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 50058147544064912} - m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &8512892203317417748 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 50058147544064912} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!1 &9117857247562382221 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 9117857247562382215} - - component: {fileID: 9117857247562382208} - - component: {fileID: 9117857247562382210} - - component: {fileID: 9144896207351220584} - - component: {fileID: 9144896207351220583} - - component: {fileID: 4742920392281400910} - - component: {fileID: -947403508163804576} - m_Layer: 0 - m_Name: CharacterControllerPrediction - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &9117857247562382215 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9117857247562382221} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 8274935638305073705} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!136 &9117857247562382208 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9117857247562382221} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &9117857247562382210 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9117857247562382221} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - k__BackingField: 0 - k__BackingField: {fileID: 0} - _networkBehaviours: - - {fileID: 9144896207351220584} - - {fileID: 4742920392281400910} - - {fileID: -947403508163804576} - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: 0, y: 1, z: -10} - Rotation: {x: 0, y: 0, z: 0, w: 1} - LocalScale: {x: 1, y: 1, z: 1} - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - k__BackingField: 5 - k__BackingField: 0 - _scenePathHash: 0 - k__BackingField: 0 - k__BackingField: 5677638399403299043 ---- !u!114 &9144896207351220584 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9117857247562382221} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6bb7bd88fd11b5d4aa7fca3d42172ab8, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 9117857247562382210} - _networkObjectCache: {fileID: 9117857247562382210} - _moveRate: 5 ---- !u!143 &9144896207351220583 -CharacterController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9117857247562382221} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Height: 2 - m_Radius: 0.5 - m_SlopeLimit: 45 - m_StepOffset: 0.3 - m_SkinWidth: 0.08 - m_MinMoveDistance: 0.001 - m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &4742920392281400910 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9117857247562382221} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 402926ef33e0a894d9fec352693988ac, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 1 - _addedNetworkObject: {fileID: 9117857247562382210} - _networkObjectCache: {fileID: 9117857247562382210} - _implementsPredictionMethods: 1 - _graphicalObject: {fileID: 8274935638305073705} - _enableTeleport: 0 - _teleportThreshold: 1 - _ownerSmoothPosition: 1 - _ownerSmoothRotation: 1 - _ownerInterpolation: 1 - _predictionType: 0 - _rigidbody: {fileID: 0} - _rigidbody2d: {fileID: 0} - _spectatorSmoothPosition: 1 - _spectatorSmoothRotation: 1 - _spectatorSmoothingType: 1 - _customSmoothingData: - InterpolationPercent: 1 - CollisionInterpolationPercent: 0.1 - InterpolationDecreaseStep: 1 - InterpolationIncreaseStep: 3 - _preconfiguredSmoothingDataPreview: - InterpolationPercent: 1 - CollisionInterpolationPercent: 0.1 - InterpolationDecreaseStep: 1 - InterpolationIncreaseStep: 3 - _maintainedVelocity: 0 - _resendType: 0 - _resendInterval: 30 - _networkTransform: {fileID: -947403508163804576} ---- !u!114 &-947403508163804576 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9117857247562382221} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a2836e36774ca1c4bbbee976e17b649c, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 2 - _addedNetworkObject: {fileID: 9117857247562382210} - _networkObjectCache: {fileID: 9117857247562382210} - _componentConfiguration: 0 - _synchronizeParent: 0 - _packing: - Position: 1 - Rotation: 1 - Scale: 0 - _interpolation: 2 - _extrapolation: 2 - _enableTeleport: 0 - _teleportThreshold: 1 - _scaleThreshold: 1 - _clientAuthoritative: 1 - _sendToOwner: 1 - _enableNetworkLod: 1 - _interval: 1 - _synchronizePosition: 1 - _positionSnapping: - X: 0 - Y: 0 - Z: 0 - _synchronizeRotation: 1 - _rotationSnapping: - X: 0 - Y: 0 - Z: 0 - _synchronizeScale: 1 - _scaleSnapping: - X: 0 - Y: 0 - Z: 0 diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scenes/CharacterControllerPrediction.unity b/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scenes/CharacterControllerPrediction.unity deleted file mode 100644 index a3fbdf9..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scenes/CharacterControllerPrediction.unity +++ /dev/null @@ -1,1308 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!114 &192429404 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3fdaae44044276a49a52229c1597e33b, type: 3} - m_Name: - m_EditorClassIdentifier: - _updateOrder: 0 - _timingType: 0 - _allowTickDropping: 0 - _maximumFrameTicks: 2 - _tickRate: 15 - _pingInterval: 1 - _physicsMode: 1 ---- !u!1 &555580081 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 555580085} - - component: {fileID: 555580084} - - component: {fileID: 555580083} - - component: {fileID: 555580082} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!135 &555580082 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &555580083 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 49a3799e31595ea478b5dd6fa163fcbd, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &555580084 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &555580085 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -9.16, y: -3.4, z: 13.1} - m_LocalScale: {x: 15, y: 15, z: 15} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &872683029 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 872683031} - - component: {fileID: 872683030} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &872683030 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 872683029} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &872683031 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 872683029} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &1112005912 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1112005916} - - component: {fileID: 1112005915} - - component: {fileID: 1112005914} - - component: {fileID: 1112005913} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1112005913 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1112005914 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 0bb31cf72dfcef449a1a4a5aab857f63, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1112005915 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1112005916 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -2, z: 0} - m_LocalScale: {x: 100, y: 1, z: 100} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1470934487 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1470934491} - - component: {fileID: 1470934490} - - component: {fileID: 1470934489} - - component: {fileID: 1470934488} - m_Layer: 0 - m_Name: Cube (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1470934488 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1470934489 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 49a3799e31595ea478b5dd6fa163fcbd, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1470934490 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1470934491 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 12.11, y: -0.08, z: 0} - m_LocalScale: {x: 1, y: 5, z: 20} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1784594014 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1784594015} - m_Layer: 0 - m_Name: Level - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1784594015 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1784594014} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1112005916} - - {fileID: 1470934491} - - {fileID: 1852016427} - - {fileID: 872683031} - - {fileID: 555580085} - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1852016424 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1852016427} - - component: {fileID: 1852016426} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!20 &1852016426 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1852016427 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1424052073902602981 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2480283714093027852} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.25490198, g: 0.25490198, b: 0.25490198, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 2b3dca501a9d8c8479dc71dd068aa8b8, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!1 &2480283714093027852 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 9139860295689780510} - - component: {fileID: 6745855428745291286} - - component: {fileID: 1424052073902602981} - m_Layer: 5 - m_Name: Indicator - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &3965864432699664111 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4808982256744730386} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.25490198, g: 0.25490198, b: 0.25490198, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 2b3dca501a9d8c8479dc71dd068aa8b8, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &4393252310837120370 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252310837120383} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 2d50394614f8feb4eb0567fb7618d84d, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &4393252310837120371 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252310837120383} - m_CullTransparentMesh: 0 ---- !u!224 &4393252310837120380 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252310837120383} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 9139860295689780510} - m_Father: {fileID: 4393252311378272345} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 16, y: -96} - m_SizeDelta: {x: 256, y: 64} - m_Pivot: {x: 0, y: 1} ---- !u!114 &4393252310837120381 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252310837120383} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 4393252310837120370} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 4393252311378272325} - m_TargetAssemblyTypeName: - m_MethodName: OnClick_Client - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!1 &4393252310837120383 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4393252310837120380} - - component: {fileID: 4393252310837120371} - - component: {fileID: 4393252310837120370} - - component: {fileID: 4393252310837120381} - m_Layer: 5 - m_Name: Client - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &4393252311222810866 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311222810879} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 1b187e63031bf7849b249c8212440c3b, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &4393252311222810867 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311222810879} - m_CullTransparentMesh: 0 ---- !u!224 &4393252311222810876 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311222810879} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 7233259200132978428} - m_Father: {fileID: 4393252311378272345} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 16, y: -16} - m_SizeDelta: {x: 256, y: 64} - m_Pivot: {x: 0, y: 1} ---- !u!114 &4393252311222810877 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311222810879} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 4393252311222810866} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 4393252311378272325} - m_TargetAssemblyTypeName: - m_MethodName: OnClick_Server - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!1 &4393252311222810879 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4393252311222810876} - - component: {fileID: 4393252311222810867} - - component: {fileID: 4393252311222810866} - - component: {fileID: 4393252311222810877} - m_Layer: 5 - m_Name: Server - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &4393252311378272324 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4393252311378272345} - - component: {fileID: 4393252311378272325} - - component: {fileID: 4393252311378272344} - - component: {fileID: 4393252311378272347} - - component: {fileID: 4393252311378272346} - m_Layer: 5 - m_Name: NetworkHudCanvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &4393252311378272325 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6d3606bfdac5a4743890fc1a5ecd8f24, type: 3} - m_Name: - m_EditorClassIdentifier: - _autoStartType: 1 - _stoppedColor: {r: 0.25490198, g: 0.25490198, b: 0.25490198, a: 1} - _changingColor: {r: 0.78431374, g: 0.6862745, b: 0, a: 1} - _startedColor: {r: 0, g: 0.5882353, b: 0.64705884, a: 1} - _serverIndicator: {fileID: 3965864432699664111} - _clientIndicator: {fileID: 1424052073902602981} ---- !u!223 &4393252311378272344 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &4393252311378272345 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 4393252311222810876} - - {fileID: 4393252310837120380} - m_Father: {fileID: 7443408886491487332} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!114 &4393252311378272346 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &4393252311378272347 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 1 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 1920, y: 1080} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0.5 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!1 &4808982256744730386 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7233259200132978428} - - component: {fileID: 5104387649508117141} - - component: {fileID: 3965864432699664111} - m_Layer: 5 - m_Name: Indicator - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!222 &5104387649508117141 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4808982256744730386} - m_CullTransparentMesh: 0 ---- !u!222 &6745855428745291286 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2480283714093027852} - m_CullTransparentMesh: 0 ---- !u!224 &7233259200132978428 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4808982256744730386} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4393252311222810876} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!4 &7443408886491487332 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 4393252311378272345} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &7443408886491487334 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7443408886491487332} - - component: {fileID: 7443408886491487335} - - component: {fileID: 7443408886491487337} - - component: {fileID: 192429404} - - component: {fileID: 7443408886491487336} - - component: {fileID: 7443408886491487339} - - component: {fileID: 7443408886491487338} - m_Layer: 0 - m_Name: NetworkManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &7443408886491487335 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d2c95dfde7d73b54dbbdc23155d35d36, type: 3} - m_Name: - m_EditorClassIdentifier: - _refreshDefaultPrefabs: 0 - _runInBackground: 1 - _dontDestroyOnLoad: 1 - _objectPool: {fileID: 0} - _persistence: 0 - _logging: {fileID: 0} - _spawnablePrefabs: {fileID: 11400000, guid: e6dd3b3c563e29d48a7713686d8ddc3f, type: 2} ---- !u!114 &7443408886491487336 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f9b6b565cd9533c4ebc18003f0fc18a2, type: 3} - m_Name: - m_EditorClassIdentifier: - _color: {r: 1, g: 1, b: 1, a: 1} - _placement: 1 - _hideTickRate: 1 ---- !u!114 &7443408886491487337 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 211a9f6ec51ddc14f908f5acc0cd0423, type: 3} - m_Name: - m_EditorClassIdentifier: - _playerPrefab: {fileID: 9117857247562382210, guid: b2991431a5f893e49937d01b6da44ff8, - type: 3} - _addToDefaultScene: 1 - Spawns: [] ---- !u!114 &7443408886491487338 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6f48f002b825cbd45a19bd96d90f9edb, type: 3} - m_Name: - m_EditorClassIdentifier: - _unreliableMTU: 1023 - _ipv4BindAddress: - _ipv6BindAddress: - _port: 7771 - _maximumClients: 9999 - _clientAddress: localhost - _timeout: 15 ---- !u!114 &7443408886491487339 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 34e4a322dca349547989b14021da4e23, type: 3} - m_Name: - m_EditorClassIdentifier: - Transport: {fileID: 7443408886491487338} - _intermediateLayer: {fileID: 0} - _latencySimulator: - _enabled: 0 - _simulateHost: 1 - _latency: 0 - _outOfOrder: 0 - _packetLoss: 0 ---- !u!224 &9139860295689780510 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2480283714093027852} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4393252310837120380} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scripts/CharacterControllerPrediction.cs b/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scripts/CharacterControllerPrediction.cs deleted file mode 100644 index 8497b47..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/CharacterController/Scripts/CharacterControllerPrediction.cs +++ /dev/null @@ -1,127 +0,0 @@ -using FishNet; -using FishNet.Object; -using FishNet.Object.Prediction; -using FishNet.Transporting; -using UnityEngine; - -/* -* -* See TransformPrediction.cs for more detailed notes. -* -*/ - -namespace FishNet.Example.Prediction.CharacterControllers -{ - - public class CharacterControllerPrediction : NetworkBehaviour - { -#if !PREDICTION_V2 - #region Types. - public struct MoveData : IReplicateData - { - public float Horizontal; - public float Vertical; - - private uint _tick; - public void Dispose() { } - public uint GetTick() => _tick; - public void SetTick(uint value) => _tick = value; - } - public struct ReconcileData : IReconcileData - { - public Vector3 Position; - public Quaternion Rotation; - public ReconcileData(Vector3 position, Quaternion rotation) - { - Position = position; - Rotation = rotation; - _tick = 0; - } - - private uint _tick; - public void Dispose() { } - public uint GetTick() => _tick; - public void SetTick(uint value) => _tick = value; - } - #endregion - - #region Serialized. - [SerializeField] - private float _moveRate = 5f; - #endregion - - #region Private. - private CharacterController _characterController; - #endregion - - private void Awake() - { - InstanceFinder.TimeManager.OnTick += TimeManager_OnTick; - _characterController = GetComponent(); - } - - public override void OnStartClient() - { - _characterController.enabled = (base.IsServerStarted || base.IsOwner); - } - - private void OnDestroy() - { - if (InstanceFinder.TimeManager != null) - { - InstanceFinder.TimeManager.OnTick -= TimeManager_OnTick; - } - } - - private void TimeManager_OnTick() - { - if (base.IsOwner) - { - Reconciliation(default, false); - CheckInput(out MoveData md); - Move(md, false); - } - if (base.IsServerStarted) - { - Move(default, true); - ReconcileData rd = new ReconcileData(transform.position, transform.rotation); - Reconciliation(rd, true); - } - } - - private void CheckInput(out MoveData md) - { - md = default; - - float horizontal = Input.GetAxisRaw("Horizontal"); - float vertical = Input.GetAxisRaw("Vertical"); - - if (horizontal == 0f && vertical == 0f) - return; - - md = new MoveData() - { - Horizontal = horizontal, - Vertical = vertical - }; - } - - [Replicate] - private void Move(MoveData md, bool asServer, Channel channel = Channel.Unreliable, bool replaying = false) - { - Vector3 move = new Vector3(md.Horizontal, 0f, md.Vertical).normalized + new Vector3(0f, Physics.gravity.y, 0f); - _characterController.Move(move * _moveRate * (float)base.TimeManager.TickDelta); - } - - [Reconcile] - private void Reconciliation(ReconcileData rd, bool asServer, Channel channel = Channel.Unreliable) - { - transform.position = rd.Position; - transform.rotation = rd.Rotation; - } - -#endif - } - - -} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Materials/BlueMat.mat b/Assets/Packages/FishNet/Demos/Prediction V1/Materials/BlueMat.mat deleted file mode 100644 index 406f0fd..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Materials/BlueMat.mat +++ /dev/null @@ -1,136 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: BlueMat - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 0 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 1 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 0.15970981, g: 0.50941044, b: 0.9150943, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] ---- !u!114 &8099846670137614177 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Materials/GroundMat.mat b/Assets/Packages/FishNet/Demos/Prediction V1/Materials/GroundMat.mat deleted file mode 100644 index c995d87..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Materials/GroundMat.mat +++ /dev/null @@ -1,136 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: GroundMat - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 0 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 1 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 0.36792448, g: 0.362718, b: 0.362718, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] ---- !u!114 &4879482358073642728 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Materials/PurpleMat.mat b/Assets/Packages/FishNet/Demos/Prediction V1/Materials/PurpleMat.mat deleted file mode 100644 index db1b83a..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Materials/PurpleMat.mat +++ /dev/null @@ -1,136 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: PurpleMat - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 0 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 1 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 0.33643538, g: 0.09905658, b: 0.39622638, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] ---- !u!114 &875720862086089588 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Materials/YellowishMat.mat b/Assets/Packages/FishNet/Demos/Prediction V1/Materials/YellowishMat.mat deleted file mode 100644 index be81308..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Materials/YellowishMat.mat +++ /dev/null @@ -1,136 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-2136956394891844189 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: YellowishMat - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 0 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 1 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 0.62352943, g: 0.55040056, b: 0.17254898, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody.meta b/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody.meta deleted file mode 100644 index b5c0bb8..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d3e420c9d7809064bacdeadf6fd55795 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Materials.meta b/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Materials.meta deleted file mode 100644 index fd18168..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Materials.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d319bd1348fbe5c4983293a851d61762 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Materials/New Physic Material.physicMaterial b/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Materials/New Physic Material.physicMaterial deleted file mode 100644 index 32e5794..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Materials/New Physic Material.physicMaterial +++ /dev/null @@ -1,14 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!134 &13400000 -PhysicMaterial: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: New Physic Material - dynamicFriction: 0.1 - staticFriction: 0.1 - bounciness: 0.9 - frictionCombine: 1 - bounceCombine: 0 diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Materials/New Physic Material.physicMaterial.meta b/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Materials/New Physic Material.physicMaterial.meta deleted file mode 100644 index c98b07f..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Materials/New Physic Material.physicMaterial.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2315b89c915a21c40982b5867ff7d343 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 13400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/PredictedBullet.prefab b/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/PredictedBullet.prefab deleted file mode 100644 index 8b6d13f..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/PredictedBullet.prefab +++ /dev/null @@ -1,281 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &3624261834906416581 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 3624261834906416580} - - component: {fileID: 3624261834906416603} - - component: {fileID: 3624261834906416600} - - component: {fileID: 3624261834906416601} - - component: {fileID: 3624261834906416602} - - component: {fileID: -6246116784124330627} - - component: {fileID: 7850526870340082268} - m_Layer: 0 - m_Name: PredictedBullet - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &3624261834906416580 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3624261834906416581} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 15.312408, y: 6.390984, z: 25.2406} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 3624261835462115340} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!135 &3624261834906416603 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3624261834906416581} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &3624261834906416600 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3624261834906416581} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 402926ef33e0a894d9fec352693988ac, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 3624261834906416601} - _networkObjectCache: {fileID: 3624261834906416601} - _implementsPredictionMethods: 1 - _graphicalObject: {fileID: 0} - _enableTeleport: 0 - _teleportThreshold: 1 - _ownerSmoothPosition: 1 - _ownerSmoothRotation: 1 - _ownerInterpolation: 1 - _predictionType: 0 - _rigidbody: {fileID: 0} - _rigidbody2d: {fileID: 0} - _spectatorSmoothPosition: 1 - _spectatorSmoothRotation: 1 - _spectatorSmoothingType: 1 - _customSmoothingData: - InterpolationPercent: 1 - CollisionInterpolationPercent: 0.1 - InterpolationDecreaseStep: 1 - InterpolationIncreaseStep: 3 - _preconfiguredSmoothingDataPreview: - InterpolationPercent: 1 - CollisionInterpolationPercent: 0.1 - InterpolationDecreaseStep: 1 - InterpolationIncreaseStep: 3 - _maintainedVelocity: 0 - _resendType: 0 - _resendInterval: 30 - _networkTransform: {fileID: 0} ---- !u!114 &3624261834906416601 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3624261834906416581} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - k__BackingField: 0 - k__BackingField: {fileID: 7850526870340082268} - _networkBehaviours: - - {fileID: 3624261834906416600} - - {fileID: -6246116784124330627} - - {fileID: 7850526870340082268} - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: 0, y: 0, z: 0} - Rotation: {x: 0, y: 0, z: 0, w: 0} - LocalScale: {x: 0, y: 0, z: 0} - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - k__BackingField: 13 - k__BackingField: 0 - _scenePathHash: 0 - k__BackingField: 0 - k__BackingField: 10875865877689018015 ---- !u!54 &3624261834906416602 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3624261834906416581} - serializedVersion: 4 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 0 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 3 ---- !u!114 &-6246116784124330627 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3624261834906416581} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fc7792d9dc338aa4dbc8a2f0533cf6ec, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 1 - _addedNetworkObject: {fileID: 3624261834906416601} - _networkObjectCache: {fileID: 3624261834906416601} ---- !u!114 &7850526870340082268 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3624261834906416581} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e2b597e1828355a4d994a69cbb11ef85, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 2 - _addedNetworkObject: {fileID: 3624261834906416601} - _networkObjectCache: {fileID: 3624261834906416601} - _allowSpawning: 1 - _allowDespawning: 1 ---- !u!1 &3624261835462115341 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 3624261835462115340} - - component: {fileID: 3624261835462115330} - - component: {fileID: 3624261835462115331} - m_Layer: 0 - m_Name: Graphics - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &3624261835462115340 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3624261835462115341} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 3624261834906416580} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &3624261835462115330 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3624261835462115341} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &3624261835462115331 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3624261835462115341} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/RigidbodyPrediction.prefab b/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/RigidbodyPrediction.prefab deleted file mode 100644 index baca80b..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/RigidbodyPrediction.prefab +++ /dev/null @@ -1,517 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &303449597948771942 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 303449597948771941} - - component: {fileID: 303449597948771939} - - component: {fileID: 303449597948771940} - m_Layer: 0 - m_Name: Cube (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &303449597948771941 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449597948771942} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.5, y: 0.25, z: 0.25} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 303449599178274091} - m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} ---- !u!33 &303449597948771939 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449597948771942} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &303449597948771940 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449597948771942} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!1 &303449598114786579 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 303449598114786577} - - component: {fileID: 303449598114786578} - - component: {fileID: 201277551} - - component: {fileID: 201277550} - - component: {fileID: 201277549} - - component: {fileID: 1565754455094126377} - m_Layer: 0 - m_Name: RigidbodyPrediction - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &303449598114786577 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -4.80351, y: 0.18147132, z: 5.430528} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 303449599178274091} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!135 &303449598114786578 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &201277551 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9e123f937d4b4f94c9cb6cc03944f786, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 201277550} - _networkObjectCache: {fileID: 201277550} - _jumpForce: 15 - _moveRate: 15 - BulletPrefab: {fileID: 0} ---- !u!114 &201277550 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - k__BackingField: 0 - k__BackingField: {fileID: 0} - _networkBehaviours: - - {fileID: 201277551} - - {fileID: 1565754455094126377} - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: -4.80351, y: 0.18147132, z: 5.430528} - Rotation: {x: 0, y: 0, z: 0, w: 1} - LocalScale: {x: 1, y: 1, z: 1} - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - k__BackingField: 11 - k__BackingField: 0 - _scenePathHash: 0 - k__BackingField: 0 - k__BackingField: 10860385910568138747 ---- !u!54 &201277549 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - serializedVersion: 4 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 1 ---- !u!114 &1565754455094126377 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 402926ef33e0a894d9fec352693988ac, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 1 - _addedNetworkObject: {fileID: 201277550} - _networkObjectCache: {fileID: 201277550} - _implementsPredictionMethods: 1 - _graphicalObject: {fileID: 303449599178274091} - _enableTeleport: 0 - _teleportThreshold: 1 - _ownerSmoothPosition: 1 - _ownerSmoothRotation: 1 - _ownerInterpolation: 1 - _predictionType: 1 - _rigidbody: {fileID: 201277549} - _rigidbody2d: {fileID: 0} - _spectatorSmoothPosition: 1 - _spectatorSmoothRotation: 1 - _spectatorSmoothingType: 1 - _customSmoothingData: - InterpolationPercent: 1 - CollisionInterpolationPercent: 0.1 - InterpolationDecreaseStep: 1 - InterpolationIncreaseStep: 3 - _preconfiguredSmoothingDataPreview: - InterpolationPercent: 1 - CollisionInterpolationPercent: 0.1 - InterpolationDecreaseStep: 1 - InterpolationIncreaseStep: 3 - _maintainedVelocity: 0 - _resendType: 0 - _resendInterval: 30 - _networkTransform: {fileID: 0} ---- !u!1 &303449598207636365 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 303449598207636364} - - component: {fileID: 303449598207636362} - - component: {fileID: 303449598207636363} - m_Layer: 0 - m_Name: Cube (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &303449598207636364 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598207636365} - serializedVersion: 2 - m_LocalRotation: {x: 0.5, y: 0.5, z: 0.5, w: 0.5} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.5, y: 0.25, z: 0.25} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 303449599178274091} - m_LocalEulerAnglesHint: {x: 0, y: 90, z: 90} ---- !u!33 &303449598207636362 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598207636365} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &303449598207636363 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598207636365} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!1 &303449598691742042 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 303449598691742041} - - component: {fileID: 303449598691742039} - - component: {fileID: 303449598691742040} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &303449598691742041 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598691742042} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.5, y: 0.25, z: 0.25} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 303449599178274091} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &303449598691742039 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598691742042} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &303449598691742040 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598691742042} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!1 &303449599178274092 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 303449599178274091} - - component: {fileID: 303449599178274088} - - component: {fileID: 303449599178274089} - m_Layer: 0 - m_Name: Sphere (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &303449599178274091 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449599178274092} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 303449598691742041} - - {fileID: 303449597948771941} - - {fileID: 303449598207636364} - m_Father: {fileID: 303449598114786577} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &303449599178274088 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449599178274092} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &303449599178274089 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449599178274092} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/RigidbodyPrediction.unity b/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/RigidbodyPrediction.unity deleted file mode 100644 index 0f19219..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/RigidbodyPrediction.unity +++ /dev/null @@ -1,1745 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1001 &105371645 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 2387209758060490959, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: _networkObjectCache - value: - objectReference: {fileID: 105371646} - - target: {fileID: 2387209758063665604, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2387209758063665604, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: m_LocalPosition.x - value: 1.0381001 - objectReference: {fileID: 0} - - target: {fileID: 2387209758063665604, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: m_LocalPosition.y - value: -1.5000001 - objectReference: {fileID: 0} - - target: {fileID: 2387209758063665604, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: m_LocalPosition.z - value: 10.917868 - objectReference: {fileID: 0} - - target: {fileID: 2387209758063665604, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2387209758063665604, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2387209758063665604, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2387209758063665604, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2387209758063665604, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2387209758063665604, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2387209758063665604, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2387209758063665607, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: m_Name - value: SpringBoard - objectReference: {fileID: 0} - - target: {fileID: 3877900074675986621, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: _scenePathHash - value: 3619396456 - objectReference: {fileID: 0} - - target: {fileID: 3877900074675986621, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: k__BackingField - value: 15545189412398578836 - objectReference: {fileID: 0} - - target: {fileID: 3877900074675986621, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: _networkBehaviours.Array.size - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3877900074675986621, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - propertyPath: _networkBehaviours.Array.data[0] - value: - objectReference: {fileID: 105371647} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 64d8f6dfe00367c478a1854ae037a860, type: 3} ---- !u!114 &105371646 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 3877900074675986621, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - m_PrefabInstance: {fileID: 105371645} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &105371647 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2387209758060490959, guid: 64d8f6dfe00367c478a1854ae037a860, - type: 3} - m_PrefabInstance: {fileID: 105371645} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 026366ce57064ab429b976f32c179b40, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &192429403 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 7443408887813606051, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - m_PrefabInstance: {fileID: 1364334277} - m_PrefabAsset: {fileID: 0} ---- !u!114 &192429404 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3fdaae44044276a49a52229c1597e33b, type: 3} - m_Name: - m_EditorClassIdentifier: - _updateOrder: 0 - _timingType: 0 - _allowTickDropping: 0 - _maximumFrameTicks: 2 - _tickRate: 50 - _pingInterval: 1 - _physicsMode: 1 ---- !u!114 &192429405 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6f48f002b825cbd45a19bd96d90f9edb, type: 3} - m_Name: - m_EditorClassIdentifier: - _timeout: 15 - _dontRoute: 0 - _unreliableMtu: 1023 - _ipv4BindAddress: - _enableIpv6: 1 - _ipv6BindAddress: - _port: 7770 - _maximumClients: 5000 - _clientAddress: localhost ---- !u!114 &192429406 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f9b6b565cd9533c4ebc18003f0fc18a2, type: 3} - m_Name: - m_EditorClassIdentifier: - _color: {r: 1, g: 1, b: 1, a: 1} - _placement: 1 - _hideTickRate: 1 ---- !u!114 &192429407 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 34e4a322dca349547989b14021da4e23, type: 3} - m_Name: - m_EditorClassIdentifier: - Transport: {fileID: 192429405} - _intermediateLayer: {fileID: 0} - _latencySimulator: - _enabled: 0 - _simulateHost: 1 - _latency: 5 - _outOfOrder: 0 - _packetLoss: 0 ---- !u!114 &192429408 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 68828c85278210948b9d50a8db3aab74, type: 3} - m_Name: - m_EditorClassIdentifier: - _authenticator: {fileID: 0} - _remoteClientTimeout: 2 - _remoteClientTimeoutDuration: 60 - _syncTypeRate: 0.1 - SpawnPacking: - Position: 0 - Rotation: 2 - Scale: 2 - _changeFrameRate: 1 - _frameRate: 100 - _shareIds: 1 - _startOnHeadless: 1 ---- !u!114 &192429409 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e08bb003fce297d4086cf8cba5aa459a, type: 3} - m_Name: - m_EditorClassIdentifier: - _queuedInputs: 1 - _dropExcessiveReplicates: 1 - _maximumServerReplicates: 15 - _redundancyCount: 3 - _allowPredictedSpawning: 1 - _reservedObjectIds: 15 ---- !u!114 &192429410 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: aca43cf6f20e77c4f8fcc078fd85081f, type: 3} - m_Name: - m_EditorClassIdentifier: - _remoteServerTimeout: 2 - _remoteServerTimeoutDuration: 60 - _changeFrameRate: 1 - _frameRate: 100 ---- !u!1 &212039606 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 212039607} - - component: {fileID: 212039608} - m_Layer: 0 - m_Name: View - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &212039607 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 212039606} - m_LocalRotation: {x: 0.37959778, y: -0.5981522, z: 0.3830318, w: 0.5927952} - m_LocalPosition: {x: 10.585218, y: 24.346329, z: 20.032343} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 40, y: -90, z: 0} ---- !u!114 &212039608 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 212039606} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - k__BackingField: 0 - k__BackingField: {fileID: 0} - _networkBehaviours: [] - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: 0, y: 0, z: 0} - Rotation: {x: 0, y: 0, z: 0, w: 0} - LocalScale: {x: 0, y: 0, z: 0} - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - _enablePrediction: 0 - _predictionType: 0 - _graphicalObject: {fileID: 0} - _enableStateForwarding: 1 - _ownerInterpolation: 1 - _enableTeleport: 0 - _teleportThreshold: 1 - k__BackingField: 0 - k__BackingField: 0 - _scenePathHash: 3619396456 - k__BackingField: 15545189413070411619 - k__BackingField: 0 ---- !u!1 &555580081 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 555580085} - - component: {fileID: 555580084} - - component: {fileID: 555580083} - - component: {fileID: 555580082} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!135 &555580082 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &555580083 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 6273444b68d517449aadb36abebaf561, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &555580084 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &555580085 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -9.16, y: -3.4, z: 13.1} - m_LocalScale: {x: 15, y: 15, z: 15} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &587483120 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 587483126} - - component: {fileID: 587483125} - - component: {fileID: 587483124} - - component: {fileID: 587483123} - - component: {fileID: 587483122} - - component: {fileID: 587483121} - m_Layer: 0 - m_Name: OfflineCapsule - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!54 &587483121 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!114 &587483122 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b749f90d4c9961c4991179db1130fa4d, type: 3} - m_Name: - m_EditorClassIdentifier: - _rigidbodyType: 0 - _getInChildren: 0 ---- !u!136 &587483123 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &587483124 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &587483125 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &587483126 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 6.0329375, y: 0.01036527, z: 8.858636} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &872683029 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 872683031} - - component: {fileID: 872683030} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &872683030 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 872683029} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &872683031 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 872683029} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &967467089 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 967467090} - - component: {fileID: 967467093} - - component: {fileID: 967467092} - - component: {fileID: 967467091} - m_Layer: 0 - m_Name: Wall - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &967467090 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 967467089} - m_LocalRotation: {x: 0, y: 0.82565534, z: 0, w: 0.56417483} - m_LocalPosition: {x: 8.24, y: -0.08, z: 15.86} - m_LocalScale: {x: 1, y: 5, z: 5} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 111.31, z: 0} ---- !u!65 &967467091 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 967467089} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &967467092 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 967467089} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 6273444b68d517449aadb36abebaf561, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &967467093 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 967467089} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1112005912 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1112005916} - - component: {fileID: 1112005915} - - component: {fileID: 1112005914} - - component: {fileID: 1112005913} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1112005913 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1112005914 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 0bb31cf72dfcef449a1a4a5aab857f63, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1112005915 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1112005916 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -2, z: 0} - m_LocalScale: {x: 100, y: 1, z: 100} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1256183191 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1256183192} - - component: {fileID: 1256183195} - - component: {fileID: 1256183194} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1256183192 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1256183191} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1560902884} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &1256183194 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1256183191} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1256183195 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1256183191} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1001 &1364334277 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 4393252310584637056, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: AutoStart - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4393252310584637056, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: _autoStartType - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606050, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: _spawnablePrefabs - value: - objectReference: {fileID: 11400000, guid: 8b2d830335dadc34d8691d8402179638, - type: 2} - - target: {fileID: 7443408887813606050, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: _refreshDefaultPrefabs - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606051, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_Name - value: NetworkManager - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606060, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: _playerPrefab - value: - objectReference: {fileID: 201277550, guid: d904f93bc171bb144ba33c5155282f6f, - type: 3} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 0b650fca685f2eb41a86538aa883e4c1, type: 3} ---- !u!1 &1377211188 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1377211192} - - component: {fileID: 1377211191} - - component: {fileID: 1377211190} - - component: {fileID: 1377211189} - - component: {fileID: 1377211194} - - component: {fileID: 1377211193} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!135 &1377211189 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1377211188} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1377211190 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1377211188} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1377211191 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1377211188} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1377211192 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1377211188} - m_LocalRotation: {x: 0, y: 0, z: 0.9122505, w: -0.40963268} - m_LocalPosition: {x: 10.983304, y: -0.99999994, z: 5.430528} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1377211193 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1377211188} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - k__BackingField: 0 - k__BackingField: {fileID: 0} - _networkBehaviours: - - {fileID: 1377211194} - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: 10.983304, y: -0.99999994, z: 5.430528} - Rotation: {x: 0, y: 0, z: 0.9122505, w: -0.40963268} - LocalScale: {x: 1, y: 1, z: 1} - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - _enablePrediction: 0 - _predictionType: 0 - _graphicalObject: {fileID: 0} - _enableStateForwarding: 1 - _ownerInterpolation: 1 - _enableTeleport: 0 - _teleportThreshold: 1 - k__BackingField: 0 - k__BackingField: 0 - _scenePathHash: 3619396456 - k__BackingField: 15545189410498122499 - k__BackingField: 0 ---- !u!114 &1377211194 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1377211188} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 925aa23d31def3d4285128924301132d, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 1377211193} - _networkObjectCache: {fileID: 1377211193} - UseOnStartServer: 1 - UseContinuous: 0 - UseOnSpawn: 1 - UseClientSet: 0 - SendRate: 0.1 ---- !u!1 &1470934487 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1470934491} - - component: {fileID: 1470934490} - - component: {fileID: 1470934489} - - component: {fileID: 1470934488} - m_Layer: 0 - m_Name: Wall - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1470934488 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1470934489 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 6273444b68d517449aadb36abebaf561, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1470934490 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1470934491 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 12.11, y: -0.08, z: 0} - m_LocalScale: {x: 1, y: 5, z: 20} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1560902877 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1560902884} - - component: {fileID: 1560902881} - - component: {fileID: 1560902878} - - component: {fileID: 1560902880} - - component: {fileID: 1560902879} - m_Layer: 0 - m_Name: OnlineSphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!54 &1560902878 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 1 ---- !u!114 &1560902879 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 402926ef33e0a894d9fec352693988ac, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 1560902880} - _networkObjectCache: {fileID: 1560902880} ---- !u!114 &1560902880 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - k__BackingField: 0 - k__BackingField: {fileID: 0} - _networkBehaviours: - - {fileID: 1560902879} - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: 0, y: 0, z: 0} - Rotation: {x: 0, y: 0, z: 0, w: 0} - LocalScale: {x: 0, y: 0, z: 0} - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - _enablePrediction: 0 - _predictionType: 0 - _graphicalObject: {fileID: 0} - _enableStateForwarding: 1 - _ownerInterpolation: 1 - _enableTeleport: 0 - _teleportThreshold: 1 - k__BackingField: 65535 - k__BackingField: 0 - _scenePathHash: 3619396456 - k__BackingField: 15545189410959160324 - k__BackingField: 0 ---- !u!135 &1560902881 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - m_Material: {fileID: 13400000, guid: 2315b89c915a21c40982b5867ff7d343, type: 2} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!4 &1560902884 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1.1, y: 0, z: 5.430528} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1256183192} - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1784594014 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1784594015} - m_Layer: 0 - m_Name: Level - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1784594015 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1784594014} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1112005916} - - {fileID: 1470934491} - - {fileID: 555580085} - - {fileID: 1852016427} - - {fileID: 872683031} - - {fileID: 967467090} - - {fileID: 1883869627} - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1852016424 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1852016427} - - component: {fileID: 1852016426} - - component: {fileID: 1852016425} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1852016425 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_Enabled: 1 ---- !u!20 &1852016426 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1852016427 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1883869626 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1883869627} - - component: {fileID: 1883869630} - - component: {fileID: 1883869629} - - component: {fileID: 1883869628} - m_Layer: 0 - m_Name: Cube (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1883869627 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1883869626} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -48.62, y: -0.08, z: 0} - m_LocalScale: {x: 1, y: 5, z: 20} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &1883869628 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1883869626} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1883869629 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1883869626} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 6273444b68d517449aadb36abebaf561, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1883869630 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1883869626} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Scripts/PredictedBullet.cs b/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Scripts/PredictedBullet.cs deleted file mode 100644 index df31e5e..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Scripts/PredictedBullet.cs +++ /dev/null @@ -1,116 +0,0 @@ -using FishNet.Component.Prediction; -using FishNet.Managing.Timing; -using FishNet.Object; -using FishNet.Object.Synchronizing; -using System.Collections; -using UnityEngine; - -namespace FishNet.Example.Prediction.Rigidbodies -{ - - public class PredictedBullet : NetworkBehaviour - { - //SyncVar to set spawn force. This is set by predicted spawner and sent to the server. - private readonly SyncVar _startingForce = new SyncVar(); - //Tick to set rb to kinematic. - private uint _stopTick = TimeManager.UNSET_TICK; - - private void Awake() - { - _startingForce.OnChange += _startingForce_OnChange; - } - - public void SetStartingForce(Vector3 value) - { - /* If the object is not yet initialized then - * this is being set prior to network spawning. - * Such a scenario occurs because the client which is - * predicted spawning sets the synctype value before network - * spawning to ensure the server receives the value. - * Just as when the server sets synctypes, if they are set - * before the object is spawned it's gauranteed clients will - * get the value in the spawn packet; same practice is used here. */ - if (!base.IsSpawned) - SetVelocity(value); - - _startingForce.Value = value; - } - - //Simple delay destroy so object does not exist forever. - public override void OnStartServer() - { - - StartCoroutine(__DelayDestroy(3f)); - } - - public override void OnStartNetwork() - { - uint timeToTicks = base.TimeManager.TimeToTicks(0.65f); - /* If server or predicted spawner then add the kinematic - * tick onto local. Predicted spawner and server should behave - * as though no time has elapsed since this spawned. */ - if (base.IsServerStarted || base.Owner.IsLocalClient) - { - _stopTick = base.TimeManager.LocalTick + timeToTicks; - } - /* If not server or a client that did not predicted spawn this - * then calculate time passed and set kinematic tick to the same - * amount in the future while subtracting already passed ticks. */ - else - { - uint passed = (uint)Mathf.Max(1, base.TimeManager.Tick - base.TimeManager.LastPacketTick.LastRemoteTick); - long stopTick = (base.TimeManager.Tick + timeToTicks - passed - 1); - if (stopTick > 0) - _stopTick = (uint)stopTick; - //Time already passed, set to stop next tick. - else - _stopTick = 1; - } - - base.TimeManager.OnTick += TimeManager_OnTick; - } - - public override void OnStopNetwork() - { - base.TimeManager.OnTick -= TimeManager_OnTick; - } - private void TimeManager_OnTick() - { - if (_stopTick > 0 && base.TimeManager.LocalTick >= _stopTick) - { - Rigidbody rb = GetComponent(); - rb.isKinematic = true; - } - } - - /// - /// When starting force changes set that velocity to the rigidbody. - /// This is an example as how a predicted spawn can modify sync types for server and other clients. - /// - private void _startingForce_OnChange(Vector3 prev, Vector3 next, bool asServer) - { - SetVelocity(next); - } - - /// - /// Sets velocity of the rigidbody. - /// - public void SetVelocity(Vector3 value) - { - Rigidbody rb = GetComponent(); - rb.velocity = value; - } - - /// - /// Destroy object after time. - /// - private IEnumerator __DelayDestroy(float time) - { - yield return new WaitForSeconds(time); - base.Despawn(); - } - - } - - -} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Scripts/RigidbodyPrediction.cs b/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Scripts/RigidbodyPrediction.cs deleted file mode 100644 index 5d44221..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Scripts/RigidbodyPrediction.cs +++ /dev/null @@ -1,283 +0,0 @@ -using FishNet; -using FishNet.Object; -using FishNet.Object.Prediction; -using FishNet.Transporting; -using UnityEngine; - -/* -* -* See TransformPrediction.cs for more detailed notes. -* -*/ - -namespace FishNet.Example.Prediction.Rigidbodies -{ - - public class RigidbodyPrediction : NetworkBehaviour - { -#if !PREDICTION_V2 - #region Types. - public struct MoveData : IReplicateData - { - public bool Jump; - public float Horizontal; - public float Vertical; - public MoveData(bool jump, float horizontal, float vertical) - { - Jump = jump; - Horizontal = horizontal; - Vertical = vertical; - _tick = 0; - } - - private uint _tick; - public void Dispose() { } - public uint GetTick() => _tick; - public void SetTick(uint value) => _tick = value; - } - public struct ReconcileData : IReconcileData - { - public Vector3 Position; - public Quaternion Rotation; - public Vector3 Velocity; - public Vector3 AngularVelocity; - public ReconcileData(Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 angularVelocity) - { - Position = position; - Rotation = rotation; - Velocity = velocity; - AngularVelocity = angularVelocity; - _tick = 0; - } - - private uint _tick; - public void Dispose() { } - public uint GetTick() => _tick; - public void SetTick(uint value) => _tick = value; - } - #endregion - - #region Serialized. - [SerializeField] - private float _jumpForce = 15f; - [SerializeField] - private float _moveRate = 15f; - #endregion - - #region Private. - /// - /// Rigidbody on this object. - /// - private Rigidbody _rigidbody; - /// - /// Next time a jump is allowed. - /// - private float _nextJumpTime; - /// - /// True to jump next frame. - /// - private bool _jump; - #endregion - - #region Predicted spawning. - /// - /// Prefab to spawn for predicted spawning. - /// - public NetworkObject BulletPrefab; - /// - /// True if a spawn is queued from input. - /// - private bool _spawnBullet; - /// - /// True if a despawn is queued from input. - /// - private bool _despawnBullet; - /// - /// Last spawned bullet. Used to test predicted despawn. - /// - private NetworkObject _lastSpawnedBullet; - #endregion - - private void Awake() - { - - _rigidbody = GetComponent(); - InstanceFinder.TimeManager.OnTick += TimeManager_OnTick; - InstanceFinder.TimeManager.OnPostTick += TimeManager_OnPostTick; - } - - private void OnDestroy() - { - if (InstanceFinder.TimeManager != null) - { - InstanceFinder.TimeManager.OnTick -= TimeManager_OnTick; - InstanceFinder.TimeManager.OnPostTick -= TimeManager_OnPostTick; - } - } - - public override void OnStartClient() - { - base.PredictionManager.OnPreReplicateReplay += PredictionManager_OnPreReplicateReplay; - } - public override void OnStopClient() - { - base.PredictionManager.OnPreReplicateReplay -= PredictionManager_OnPreReplicateReplay; - } - - private void Update() - { - if (base.IsOwner) - { - if (Input.GetKeyDown(KeyCode.RightAlt)) - { - _rigidbody.velocity = Vector3.zero; - _rigidbody.angularVelocity = Vector3.zero; - } - if (Input.GetKeyDown(KeyCode.Space) && Time.time > _nextJumpTime) - { - _nextJumpTime = Time.time + 1f; - _jump = true; - } - else if (Input.GetKeyDown(KeyCode.LeftShift)) - { - _spawnBullet = true; - } - //else if (Input.GetKeyDown(KeyCode.LeftAlt)) - //{ - // _despawnBullet = true; - //} - } - } - - /// - /// Called every time any predicted object is replaying. Replays only occur for owner. - /// Currently owners may only predict one object at a time. - /// - private void PredictionManager_OnPreReplicateReplay(uint arg1, PhysicsScene arg2, PhysicsScene2D arg3) - { - /* Server does not replay so it does - * not need to add gravity. */ - if (!base.IsServerInitialized) - AddGravity(); - } - - - private void TimeManager_OnTick() - { - if (base.IsOwner) - { - Reconciliation(default, false); - BuildMoveData(out MoveData md); - Move(md, false); - //Predicted spawning example. - TryDespawnBullet(); - TrySpawnBullet(); - } - if (base.IsServerInitialized) - { - Move(default, true); - } - - /* Server and all clients must add the additional gravity. - * Adding gravity is not necessarily required in general but - * to make jumps more snappy extra gravity is added per tick. - * All clients and server need to simulate the gravity to keep - * prediction equal across the network. */ - AddGravity(); - } - - private void TimeManager_OnPostTick() - { - /* Reconcile is sent during PostTick because we - * want to send the rb data AFTER the simulation. */ - if (base.IsServerInitialized) - { - ReconcileData rd = new ReconcileData(transform.position, transform.rotation, _rigidbody.velocity, _rigidbody.angularVelocity); - Reconciliation(rd, true); - } - } - - - /// - /// Builds a MoveData to use within replicate. - /// - /// - private void BuildMoveData(out MoveData md) - { - md = default; - - float horizontal = Input.GetAxisRaw("Horizontal"); - float vertical = Input.GetAxisRaw("Vertical"); - - if (horizontal == 0f && vertical == 0f && !_jump) - return; - - md = new MoveData(_jump, horizontal, vertical); - _jump = false; - } - - - /// - /// PredictedObject example (unpolished) - /// - private void TrySpawnBullet() - { - if (_spawnBullet) - { - _spawnBullet = false; - - NetworkObject nob = Instantiate(BulletPrefab, transform.position + (transform.forward * 1f), transform.rotation); - //Set last spawned to test destroy with ALT key. - _lastSpawnedBullet = nob; - - //Set force to 100f at current forward. - PredictedBullet bt = nob.GetComponent(); - bt.SetStartingForce(transform.forward * 20f); - //Spawn client side, which will send the predicted spawn to server. - base.Spawn(nob, base.Owner); - } - } - - /// - /// PredictedObject example (unpolished) - /// - private void TryDespawnBullet() - { - if (_despawnBullet) - { - _despawnBullet = false; - _lastSpawnedBullet?.Despawn(); - } - } - - /// - /// Adds gravity to the rigidbody. - /// - private void AddGravity() - { - _rigidbody.AddForce(Physics.gravity * 2f); - } - - [Replicate] - private void Move(MoveData md, bool asServer, Channel channel = Channel.Unreliable, bool replaying = false) - { - Vector3 forces = new Vector3(md.Horizontal, 0f, md.Vertical) * _moveRate; - _rigidbody.AddForce(forces); - - if (md.Jump) - _rigidbody.AddForce(new Vector3(0f, _jumpForce, 0f), ForceMode.Impulse); - } - - [Reconcile] - private void Reconciliation(ReconcileData rd, bool asServer, Channel channel = Channel.Unreliable) - { - transform.position = rd.Position; - transform.rotation = rd.Rotation; - _rigidbody.velocity = rd.Velocity; - _rigidbody.angularVelocity = rd.AngularVelocity; - } - -#endif - } - -} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Transform.meta b/Assets/Packages/FishNet/Demos/Prediction V1/Transform.meta deleted file mode 100644 index 35f88c4..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Transform.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 61560a2833a923e47bbab61430c5530c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Prefabs.meta b/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Prefabs.meta deleted file mode 100644 index 12de546..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Prefabs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3fd547fb92ab83b4c99f47f0fbe1098c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Prefabs/TransformPrediction.prefab b/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Prefabs/TransformPrediction.prefab deleted file mode 100644 index a6157bb..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Prefabs/TransformPrediction.prefab +++ /dev/null @@ -1,284 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &27039729695437544 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 27039729695437538} - - component: {fileID: 27039729695437541} - - component: {fileID: 27039729695437542} - - component: {fileID: 27039729695437543} - - component: {fileID: 8399567158492483659} - - component: {fileID: -4118712540632748398} - m_Layer: 0 - m_Name: TransformPrediction - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &27039729695437538 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 27039729695437544} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 7846666075604890595} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!136 &27039729695437541 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 27039729695437544} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &27039729695437542 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 27039729695437544} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 13cad243fdfd7294e8a6a393735726eb, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 27039729695437543} - _networkObjectCache: {fileID: 27039729695437543} - _moveRate: 5 ---- !u!114 &27039729695437543 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 27039729695437544} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - k__BackingField: 0 - k__BackingField: {fileID: 0} - _networkBehaviours: - - {fileID: 27039729695437542} - - {fileID: 8399567158492483659} - - {fileID: -4118712540632748398} - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: 0, y: 0, z: 0} - Rotation: {x: 0, y: 0, z: 0, w: 0} - LocalScale: {x: 0, y: 0, z: 0} - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - k__BackingField: 1 - k__BackingField: 0 - _scenePathHash: 0 - k__BackingField: 0 - k__BackingField: 324774039849520742 ---- !u!114 &8399567158492483659 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 27039729695437544} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 402926ef33e0a894d9fec352693988ac, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 1 - _addedNetworkObject: {fileID: 27039729695437543} - _networkObjectCache: {fileID: 27039729695437543} - _implementsPredictionMethods: 1 - _graphicalObject: {fileID: 0} - _enableTeleport: 0 - _teleportThreshold: 1 - _ownerSmoothPosition: 1 - _ownerSmoothRotation: 1 - _ownerInterpolation: 1 - _predictionType: 0 - _rigidbody: {fileID: 0} - _rigidbody2d: {fileID: 0} - _spectatorSmoothPosition: 1 - _spectatorSmoothRotation: 1 - _spectatorSmoothingType: 1 - _customSmoothingData: - InterpolationPercent: 1 - CollisionInterpolationPercent: 0.1 - InterpolationDecreaseStep: 1 - InterpolationIncreaseStep: 3 - _preconfiguredSmoothingDataPreview: - InterpolationPercent: 1 - CollisionInterpolationPercent: 0.1 - InterpolationDecreaseStep: 1 - InterpolationIncreaseStep: 3 - _maintainedVelocity: 0 - _resendType: 0 - _resendInterval: 30 - _networkTransform: {fileID: 0} ---- !u!114 &-4118712540632748398 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 27039729695437544} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a2836e36774ca1c4bbbee976e17b649c, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 2 - _addedNetworkObject: {fileID: 27039729695437543} - _networkObjectCache: {fileID: 27039729695437543} - _componentConfiguration: 0 - _synchronizeParent: 0 - _packing: - Position: 1 - Rotation: 1 - Scale: 0 - _interpolation: 2 - _extrapolation: 2 - _enableTeleport: 0 - _teleportThreshold: 1 - _scaleThreshold: 1 - _clientAuthoritative: 1 - _sendToOwner: 1 - _enableNetworkLod: 1 - _interval: 1 - _synchronizePosition: 1 - _positionSnapping: - X: 0 - Y: 0 - Z: 0 - _synchronizeRotation: 1 - _rotationSnapping: - X: 0 - Y: 0 - Z: 0 - _synchronizeScale: 1 - _scaleSnapping: - X: 0 - Y: 0 - Z: 0 ---- !u!1 &907868826061293566 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7846666075604890595} - - component: {fileID: 3240451035359699034} - - component: {fileID: 85305618895715439} - m_Layer: 0 - m_Name: Capsule - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &7846666075604890595 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 907868826061293566} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 27039729695437538} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &3240451035359699034 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 907868826061293566} - m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &85305618895715439 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 907868826061293566} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Scripts.meta b/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Scripts.meta deleted file mode 100644 index 89eaf9b..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8fe2f549652c32746915ce1cfd6deaef -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Scripts/TransformPrediction.cs b/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Scripts/TransformPrediction.cs deleted file mode 100644 index 1788ad5..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Scripts/TransformPrediction.cs +++ /dev/null @@ -1,223 +0,0 @@ -using FishNet.Object; -using FishNet.Object.Prediction; -using FishNet.Transporting; -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace FishNet.Example.Prediction.Transforms -{ - public class TransformPrediction : NetworkBehaviour - { -#if !PREDICTION_V2 - /// - /// Data on how to move. - /// This is processed locally as well sent to the server for processing. - /// Any inputs or values which may affect your move should be placed in your own MoveData. - /// The structure type may be named anything. Classes can also be used but will generate garbage, so structures - /// are recommended. - /// - public struct TestStruct - { - public int Two; - } - public class TestClass - { - public int One; - } - public struct MoveData : IReplicateData - { - public Vector2 Movement; - //public TestStruct _testStruct; - //public TestClass _testClass; - public float Horizontal; - public float Vertical; - private uint _tick; - - public MoveData(float horizontal, float vertical) - { - Movement = new Vector2(horizontal, vertical); - Horizontal = horizontal; - Vertical = vertical; - _tick = 0; - //_testStruct = default; - //_testClass = null; - } - - public void Dispose() { } - public uint GetTick() => _tick; - public void SetTick(uint value) => _tick = value; - } - - /// - /// Data on how to reconcile. - /// Server sends this back to the client. Once the client receives this they - /// will reset their object using this information. Like with MoveData anything that may - /// affect your movement should be reset. Since this is just a transform only position and - /// rotation would be reset. But a rigidbody would include velocities as well. If you are using - /// an asset it's important to know what systems in that asset affect movement and need - /// to be reset as well. - /// - public struct ReconcileData : IReconcileData - { - public Vector3 Position; - public Quaternion Rotation; - private uint _tick; - - public ReconcileData(Vector3 position, Quaternion rotation) - { - Position = position; - Rotation = rotation; - _tick = 0; - } - - public void Dispose() { } - public uint GetTick() => _tick; - public void SetTick(uint value) => _tick = value; - } - -#region Serialized. - /// - /// How many units to move per second. - /// - [Tooltip("How many units to move per second.")] - [SerializeField] - private float _moveRate = 5f; -#endregion - - private void Awake() - { - /* Prediction is tick based so you must - * send datas during ticks. You can use whichever - * tick best fits your need, such as PreTick, Tick, or PostTick. - * In most cases you will send/move using Tick. For rigidbodies - * you will send using PostTick. I subscribe to ticks using - * the InstanceFinder class, which finds the first NetworkManager - * loaded. If you are using several NetworkManagers you would want - * to subscrube in OnStartServer/Client using base.TimeManager. */ - InstanceFinder.TimeManager.OnTick += TimeManager_OnTick; - } - - private void OnDestroy() - { - //Unsubscribe as well. - if (InstanceFinder.TimeManager != null) - { - InstanceFinder.TimeManager.OnTick -= TimeManager_OnTick; - } - } - - private void TimeManager_OnTick() - { - if (base.IsOwner) - { - /* Call reconcile using default, and false for - * asServer. This will reset the client to the latest - * values from server and replay cached inputs. */ - Reconciliation(default, false); - /* CheckInput builds MoveData from user input. When there - * is no input CheckInput returns default. You can handle this - * however you like but Move should be called when default if - * there is no input which needs to be sent to the server. */ - CheckInput(out MoveData md); - /* Move using the input, and false for asServer. - * Inputs are automatically sent with redundancy. How many past - * inputs will be configurable at a later time. - * When a default value is used the most recent past inputs - * are sent a predetermined amount of times. It's important you - * call Move whether your data is default or not. FishNet will - * automatically determine how to send the data, and run the logic. */ - Move(md, false); - } - if (base.IsServerStarted) - { - /* Move using default data with true for asServer. - * The server will use stored data from the client automatically. - * You may also run any sanity checks on the input as demonstrated - * in the method. */ - Move(default, true); - /* After the server has processed input you will want to send - * the result back to clients. You are welcome to skip - * a few sends if you like, eg only send every few ticks. - * Generate data required on how the client will reset and send it by calling your Reconcile - * method with the data, again using true for asServer. Like the - * Replicate method (Move) this will send with redundancy a certain - * amount of times. If there is no input to process from the client this - * will not continue to send data. */ - ReconcileData rd = new ReconcileData(transform.position, transform.rotation); - Reconciliation(rd, true); - } - } - - - /// - /// A simple method to get input. This doesn't have any relation to the prediction. - /// - private void CheckInput(out MoveData md) - { - md = default; - - float horizontal = Input.GetAxisRaw("Horizontal"); - float vertical = Input.GetAxisRaw("Vertical"); - - //No input to send. - if (horizontal == 0f && vertical == 0f) - return; - - //Make movedata with input. - md = new MoveData(horizontal, vertical); - } - - /// - /// Replicate attribute indicates the data is being sent from the client to the server. - /// When Replicate is present data is automatically sent with redundancy. - /// The replay parameter becomes true automatically when client inputs are - /// being replayed after a reconcile. This is useful for a variety of things, - /// such as if you only want to show effects the first time input is run you will - /// do so when replaying is false. - /// - [Replicate(AllowServerControl = true)] - private void Move(MoveData md, bool asServer, Channel channel = Channel.Unreliable, bool replaying = false) - { - /* You can check if being run as server to - * add security checks such as normalizing - * the inputs. */ - if (asServer) - { - //Sanity check! - } - /* You may also use replaying to know - * if a client is replaying inputs rather - * than running them for the first time. This can - * be useful because you may only want to run - * VFX during the first input and not during - * replayed inputs. */ - if (!replaying) - { - //VFX! - } - - Vector3 move = new Vector3(md.Horizontal, 0f, md.Vertical); - transform.position += (move * _moveRate * (float)base.TimeManager.TickDelta); - } - - /// - /// A Reconcile attribute indicates the client will reconcile - /// using the data and logic within the method. When asServer - /// is true the data is sent to the client with redundancy, - /// and the server will not run the logic. - /// When asServer is false the client will reset using the logic - /// you supply then replay their inputs. - /// - [Reconcile] - private void Reconciliation(ReconcileData rd, bool asServer, Channel channel = Channel.Unreliable) - { - transform.position = rd.Position; - transform.rotation = rd.Rotation; - } - -#endif - } - - -} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/TransformPrediction.unity b/Assets/Packages/FishNet/Demos/Prediction V1/Transform/TransformPrediction.unity deleted file mode 100644 index 1f6db18..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/TransformPrediction.unity +++ /dev/null @@ -1,830 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &192429403 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 7443408887813606051, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - m_PrefabInstance: {fileID: 1364334277} - m_PrefabAsset: {fileID: 0} ---- !u!114 &192429404 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3fdaae44044276a49a52229c1597e33b, type: 3} - m_Name: - m_EditorClassIdentifier: - _updateOrder: 0 - _timingType: 0 - _allowTickDropping: 0 - _maximumFrameTicks: 2 - _tickRate: 50 - _pingInterval: 1 - _timingInterval: 1 - _physicsMode: 1 ---- !u!114 &192429405 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6f48f002b825cbd45a19bd96d90f9edb, type: 3} - m_Name: - m_EditorClassIdentifier: - _unreliableMTU: 1023 - _ipv4BindAddress: - _ipv6BindAddress: - _port: 7770 - _maximumClients: 4095 - _clientAddress: localhost - _timeout: 15 ---- !u!114 &192429406 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 756c28cd3141c4140ae776188ee26729, type: 3} - m_Name: - m_EditorClassIdentifier: - NetworkTraffic: - _updateInteval: 1 - _updateClient: 1 - _updateServer: 1 ---- !u!114 &192429407 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8bc8f0363ddc75946a958043c5e49a83, type: 3} - m_Name: - m_EditorClassIdentifier: - _color: {r: 0, g: 0, b: 0, a: 1} - _placement: 2 - _showOutgoing: 1 - _showIncoming: 1 ---- !u!114 &192429408 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 34e4a322dca349547989b14021da4e23, type: 3} - m_Name: - m_EditorClassIdentifier: - Transport: {fileID: 192429405} - _intermediateLayer: {fileID: 0} - _latencySimulator: - _enabled: 1 - _simulateHost: 1 - _latency: 100 - _outOfOrder: 0 - _packetLoss: 0 ---- !u!114 &192429409 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e08bb003fce297d4086cf8cba5aa459a, type: 3} - m_Name: - m_EditorClassIdentifier: - _queuedInputs: 1 - _reconcileInterval: 0.1 - _dropExcessiveReplicates: 1 - _maximumServerReplicates: 15 - _maximumConsumeCount: 4 - _redundancyCount: 3 - _allowPredictedSpawning: 0 - _reservedObjectIds: 15 ---- !u!114 &192429410 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192429403} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f9b6b565cd9533c4ebc18003f0fc18a2, type: 3} - m_Name: - m_EditorClassIdentifier: - _color: {r: 1, g: 1, b: 1, a: 1} - _placement: 1 - _hideTickRate: 1 ---- !u!1 &555580081 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 555580085} - - component: {fileID: 555580084} - - component: {fileID: 555580083} - - component: {fileID: 555580082} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!135 &555580082 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &555580083 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: ea31fef5ca1bc7344a72c71a5f9a0cd2, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &555580084 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &555580085 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -9.16, y: -3.4, z: 13.1} - m_LocalScale: {x: 15, y: 15, z: 15} - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &872683029 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 872683031} - - component: {fileID: 872683030} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &872683030 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 872683029} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &872683031 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 872683029} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &1112005912 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1112005916} - - component: {fileID: 1112005915} - - component: {fileID: 1112005914} - - component: {fileID: 1112005913} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1112005913 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1112005914 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 0bb31cf72dfcef449a1a4a5aab857f63, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &1112005915 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1112005916 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -2, z: 0} - m_LocalScale: {x: 100, y: 1, z: 100} - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &1364334277 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 4393252310584637056, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: _autoStartType - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606049, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606050, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: _spawnablePrefabs - value: - objectReference: {fileID: 11400000, guid: 3a54436bdb916194f99da0d17231e617, - type: 2} - - target: {fileID: 7443408887813606051, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: m_Name - value: NetworkManager - objectReference: {fileID: 0} - - target: {fileID: 7443408887813606060, guid: 0b650fca685f2eb41a86538aa883e4c1, - type: 3} - propertyPath: _playerPrefab - value: - objectReference: {fileID: 27039729695437543, guid: f820efff6a2871447b961fc755212ba3, - type: 3} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 0b650fca685f2eb41a86538aa883e4c1, type: 3} ---- !u!1 &1470934487 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1470934491} - - component: {fileID: 1470934490} - - component: {fileID: 1470934489} - - component: {fileID: 1470934488} - m_Layer: 0 - m_Name: Cube (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1470934488 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1470934489 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: ea31fef5ca1bc7344a72c71a5f9a0cd2, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &1470934490 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1470934491 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 12.11, y: -0.08, z: 0} - m_LocalScale: {x: 1, y: 5, z: 20} - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1784594014 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1784594015} - m_Layer: 0 - m_Name: Level - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1784594015 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1784594014} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1112005916} - - {fileID: 1470934491} - - {fileID: 555580085} - - {fileID: 1852016427} - - {fileID: 872683031} - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1852016424 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1852016427} - - component: {fileID: 1852016426} - - component: {fileID: 1852016425} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1852016425 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_Enabled: 1 ---- !u!20 &1852016426 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1852016427 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental).meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental).meta deleted file mode 100644 index 93248ba..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental).meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7e04426ec3811c4439a20fc6f21abb62 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController.meta deleted file mode 100644 index efba932..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: accc5b93ebf3b0040baaec2298c7d394 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Materials.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Materials.meta deleted file mode 100644 index 945b291..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Materials.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bdae6fa333d2d94449c27856e21d936a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Materials/BlueMat.mat b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Materials/BlueMat.mat deleted file mode 100644 index c28cb84..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Materials/BlueMat.mat +++ /dev/null @@ -1,135 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-7157249968233000657 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: BlueMat - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _UVSec: 0 - - _WorkflowMode: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 0, g: 0.36344597, b: 0.5471698, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Materials/BlueMat.mat.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Materials/BlueMat.mat.meta deleted file mode 100644 index 39a6c0a..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Materials/BlueMat.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a2ca0973c8f8a4846bb7f3894c3bc5cf -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/PredictionV2_CC.unity b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/PredictionV2_CC.unity deleted file mode 100644 index ba2ebbe..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/PredictionV2_CC.unity +++ /dev/null @@ -1,2001 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!114 &192429404 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3fdaae44044276a49a52229c1597e33b, type: 3} - m_Name: - m_EditorClassIdentifier: - _updateOrder: 0 - _timingType: 0 - _allowTickDropping: 0 - _maximumFrameTicks: 2 - _tickRate: 20 - _pingInterval: 1 - _physicsMode: 1 ---- !u!114 &192429405 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6f48f002b825cbd45a19bd96d90f9edb, type: 3} - m_Name: - m_EditorClassIdentifier: - _unreliableMTU: 1023 - _ipv4BindAddress: - _ipv6BindAddress: - _port: 7770 - _maximumClients: 5000 - _clientAddress: localhost - _timeout: 15 ---- !u!114 &192429406 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f9b6b565cd9533c4ebc18003f0fc18a2, type: 3} - m_Name: - m_EditorClassIdentifier: - _color: {r: 1, g: 1, b: 1, a: 1} - _placement: 1 - _hideTickRate: 1 ---- !u!114 &192429407 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 34e4a322dca349547989b14021da4e23, type: 3} - m_Name: - m_EditorClassIdentifier: - Transport: {fileID: 192429405} - _intermediateLayer: {fileID: 0} - _latencySimulator: - _enabled: 0 - _simulateHost: 1 - _latency: 70 - _outOfOrder: 0 - _packetLoss: 0 ---- !u!114 &192429408 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 68828c85278210948b9d50a8db3aab74, type: 3} - m_Name: - m_EditorClassIdentifier: - _authenticator: {fileID: 0} - _remoteClientTimeout: 0 - _remoteClientTimeoutDuration: 60 - _syncTypeRate: 0.1 - SpawnPacking: - Position: 0 - Rotation: 2 - Scale: 2 - _changeFrameRate: 1 - _frameRate: 100 - _shareIds: 1 - _startOnHeadless: 1 - _limitClientMTU: 1 ---- !u!114 &192429409 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e08bb003fce297d4086cf8cba5aa459a, type: 3} - m_Name: - m_EditorClassIdentifier: - _queuedInputs: 1 - _dropExcessiveReplicates: 1 - _maximumServerReplicates: 15 - _maximumConsumeCount: 4 - _redundancyCount: 2 - _allowPredictedSpawning: 0 - _reservedObjectIds: 15 ---- !u!114 &192429410 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: aca43cf6f20e77c4f8fcc078fd85081f, type: 3} - m_Name: - m_EditorClassIdentifier: - _remoteServerTimeout: 2 - _remoteServerTimeoutDuration: 60 - _changeFrameRate: 1 - _frameRate: 100 ---- !u!1 &212039606 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 212039607} - - component: {fileID: 212039608} - m_Layer: 0 - m_Name: View - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &212039607 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 212039606} - m_LocalRotation: {x: 0.37959778, y: -0.5981522, z: 0.3830318, w: 0.5927952} - m_LocalPosition: {x: 10.585218, y: 24.346329, z: 20.032343} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 40, y: -90, z: 0} ---- !u!114 &212039608 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 212039606} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - _enablePrediction: 0 - _predictionType: 0 - _graphicalObject: {fileID: 0} - _enableStateForwarding: 1 - _ownerInterpolation: 1 - _enableTeleport: 0 - _ownerTeleportThreshold: 1 - _spectatorAdaptiveInterpolation: 1 - _spectatorInterpolation: 1 - k__BackingField: 0 - k__BackingField: {fileID: 0} - _networkBehaviours: [] - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: 10.585218, y: 24.346329, z: 20.032343} - Rotation: {x: 0.37959778, y: -0.5981522, z: 0.3830318, w: 0.5927952} - LocalScale: {x: 1, y: 1, z: 1} - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - k__BackingField: 0 - k__BackingField: 0 - _scenePathHash: 2478811136 - k__BackingField: 10646412763218034985 - k__BackingField: 0 ---- !u!1 &555580081 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 555580085} - - component: {fileID: 555580084} - - component: {fileID: 555580083} - - component: {fileID: 555580082} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!135 &555580082 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &555580083 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: a2ca0973c8f8a4846bb7f3894c3bc5cf, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &555580084 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &555580085 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -9.16, y: -3.4, z: 13.1} - m_LocalScale: {x: 15, y: 15, z: 15} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &587483120 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 587483126} - - component: {fileID: 587483125} - - component: {fileID: 587483124} - - component: {fileID: 587483123} - - component: {fileID: 587483122} - - component: {fileID: 587483121} - m_Layer: 0 - m_Name: OfflineCapsule - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!54 &587483121 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!114 &587483122 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b749f90d4c9961c4991179db1130fa4d, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!136 &587483123 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &587483124 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &587483125 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &587483126 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 6.0329375, y: 0.01036527, z: 8.858636} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &872683029 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 872683031} - - component: {fileID: 872683030} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &872683030 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 872683029} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &872683031 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 872683029} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &967467089 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 967467090} - - component: {fileID: 967467093} - - component: {fileID: 967467092} - - component: {fileID: 967467091} - m_Layer: 0 - m_Name: Wall - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &967467090 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 967467089} - m_LocalRotation: {x: 0, y: 0.82565534, z: 0, w: 0.56417483} - m_LocalPosition: {x: 8.24, y: -0.08, z: 15.86} - m_LocalScale: {x: 1, y: 5, z: 5} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 111.31, z: 0} ---- !u!65 &967467091 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 967467089} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &967467092 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 967467089} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: a2ca0973c8f8a4846bb7f3894c3bc5cf, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &967467093 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 967467089} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1112005912 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1112005916} - - component: {fileID: 1112005915} - - component: {fileID: 1112005914} - - component: {fileID: 1112005913} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1112005913 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1112005914 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 0bb31cf72dfcef449a1a4a5aab857f63, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1112005915 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1112005916 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -2, z: 0} - m_LocalScale: {x: 100, y: 1, z: 100} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1256183191 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1256183192} - - component: {fileID: 1256183195} - - component: {fileID: 1256183194} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1256183192 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1256183191} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1560902884} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &1256183194 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1256183191} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1256183195 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1256183191} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1470934487 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1470934491} - - component: {fileID: 1470934490} - - component: {fileID: 1470934489} - - component: {fileID: 1470934488} - m_Layer: 0 - m_Name: Wall - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1470934488 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1470934489 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: a2ca0973c8f8a4846bb7f3894c3bc5cf, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1470934490 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1470934491 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 12.11, y: -0.08, z: 0} - m_LocalScale: {x: 1, y: 5, z: 20} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1560902877 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1560902884} - - component: {fileID: 1560902881} - - component: {fileID: 1560902878} - - component: {fileID: 1560902880} - - component: {fileID: 1560902879} - m_Layer: 0 - m_Name: OnlineSphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!54 &1560902878 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 1 ---- !u!114 &1560902879 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 402926ef33e0a894d9fec352693988ac, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 1560902880} - _networkObjectCache: {fileID: 1560902880} ---- !u!114 &1560902880 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - _enablePrediction: 0 - _predictionType: 0 - _graphicalObject: {fileID: 0} - _enableStateForwarding: 1 - _ownerInterpolation: 1 - _enableTeleport: 0 - _ownerTeleportThreshold: 1 - _spectatorAdaptiveInterpolation: 1 - _spectatorInterpolation: 1 - k__BackingField: 0 - k__BackingField: {fileID: 0} - _networkBehaviours: - - {fileID: 1560902879} - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: 0, y: 0, z: 0} - Rotation: {x: 0, y: 0, z: 0, w: 0} - LocalScale: {x: 0, y: 0, z: 0} - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - k__BackingField: 65535 - k__BackingField: 0 - _scenePathHash: 2478811136 - k__BackingField: 10646412763343888858 - k__BackingField: 0 ---- !u!135 &1560902881 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - m_Material: {fileID: 13400000, guid: 2315b89c915a21c40982b5867ff7d343, type: 2} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!4 &1560902884 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1.1, y: 0, z: 5.430528} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1256183192} - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1726381377 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7d331f979d46e8e4a9fc90070c596d44, type: 3} - m_Name: - m_EditorClassIdentifier: - _enableNetworkLod: 0 - _levelOfDetailDistances: [] - _updateHostVisibility: 1 - _defaultConditions: - - {fileID: 11400000, guid: 2033f54fd2794464bae08fa5a55c8996, type: 2} ---- !u!1 &1784594014 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1784594015} - m_Layer: 0 - m_Name: Level - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1784594015 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1784594014} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1112005916} - - {fileID: 1470934491} - - {fileID: 555580085} - - {fileID: 1852016427} - - {fileID: 872683031} - - {fileID: 967467090} - - {fileID: 1883869627} - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1852016424 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1852016427} - - component: {fileID: 1852016426} - - component: {fileID: 1852016425} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1852016425 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_Enabled: 1 ---- !u!20 &1852016426 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1852016427 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1883869626 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1883869627} - - component: {fileID: 1883869630} - - component: {fileID: 1883869629} - - component: {fileID: 1883869628} - m_Layer: 0 - m_Name: Cube (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1883869627 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1883869626} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -48.62, y: -0.08, z: 0} - m_LocalScale: {x: 1, y: 5, z: 20} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &1883869628 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1883869626} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1883869629 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1883869626} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 6273444b68d517449aadb36abebaf561, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1883869630 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1883869626} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1424052073902602981 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2480283714093027852} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.25490198, g: 0.25490198, b: 0.25490198, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 2b3dca501a9d8c8479dc71dd068aa8b8, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!1 &2480283714093027852 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 9139860295689780510} - - component: {fileID: 6745855428745291286} - - component: {fileID: 1424052073902602981} - m_Layer: 5 - m_Name: Indicator - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &3965864432699664111 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4808982256744730386} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.25490198, g: 0.25490198, b: 0.25490198, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 2b3dca501a9d8c8479dc71dd068aa8b8, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &4393252310837120370 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252310837120383} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 2d50394614f8feb4eb0567fb7618d84d, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &4393252310837120371 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252310837120383} - m_CullTransparentMesh: 0 ---- !u!224 &4393252310837120380 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252310837120383} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 9139860295689780510} - m_Father: {fileID: 4393252311378272345} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 16, y: -96} - m_SizeDelta: {x: 256, y: 64} - m_Pivot: {x: 0, y: 1} ---- !u!114 &4393252310837120381 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252310837120383} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 4393252310837120370} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 4393252311378272325} - m_TargetAssemblyTypeName: - m_MethodName: OnClick_Client - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!1 &4393252310837120383 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4393252310837120380} - - component: {fileID: 4393252310837120371} - - component: {fileID: 4393252310837120370} - - component: {fileID: 4393252310837120381} - m_Layer: 5 - m_Name: Client - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &4393252311222810866 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311222810879} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 1b187e63031bf7849b249c8212440c3b, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &4393252311222810867 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311222810879} - m_CullTransparentMesh: 0 ---- !u!224 &4393252311222810876 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311222810879} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 7233259200132978428} - m_Father: {fileID: 4393252311378272345} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 16, y: -16} - m_SizeDelta: {x: 256, y: 64} - m_Pivot: {x: 0, y: 1} ---- !u!114 &4393252311222810877 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311222810879} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 4393252311222810866} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 4393252311378272325} - m_TargetAssemblyTypeName: - m_MethodName: OnClick_Server - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!1 &4393252311222810879 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4393252311222810876} - - component: {fileID: 4393252311222810867} - - component: {fileID: 4393252311222810866} - - component: {fileID: 4393252311222810877} - m_Layer: 5 - m_Name: Server - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &4393252311378272324 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4393252311378272345} - - component: {fileID: 4393252311378272325} - - component: {fileID: 4393252311378272344} - - component: {fileID: 4393252311378272347} - - component: {fileID: 4393252311378272346} - m_Layer: 5 - m_Name: NetworkHudCanvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &4393252311378272325 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6d3606bfdac5a4743890fc1a5ecd8f24, type: 3} - m_Name: - m_EditorClassIdentifier: - _autoStartType: 2 - _stoppedColor: {r: 0.25490198, g: 0.25490198, b: 0.25490198, a: 1} - _changingColor: {r: 0.78431374, g: 0.6862745, b: 0, a: 1} - _startedColor: {r: 0, g: 0.5882353, b: 0.64705884, a: 1} - _serverIndicator: {fileID: 3965864432699664111} - _clientIndicator: {fileID: 1424052073902602981} ---- !u!223 &4393252311378272344 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &4393252311378272345 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 4393252311222810876} - - {fileID: 4393252310837120380} - m_Father: {fileID: 7443408886491487332} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!114 &4393252311378272346 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &4393252311378272347 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 1 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 1920, y: 1080} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0.5 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!1 &4808982256744730386 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7233259200132978428} - - component: {fileID: 5104387649508117141} - - component: {fileID: 3965864432699664111} - m_Layer: 5 - m_Name: Indicator - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!222 &5104387649508117141 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4808982256744730386} - m_CullTransparentMesh: 0 ---- !u!222 &6745855428745291286 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2480283714093027852} - m_CullTransparentMesh: 0 ---- !u!224 &7233259200132978428 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4808982256744730386} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4393252311222810876} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!4 &7443408886491487332 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 4393252311378272345} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &7443408886491487334 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7443408886491487332} - - component: {fileID: 7443408886491487335} - - component: {fileID: 1726381377} - - component: {fileID: 7443408886491487337} - - component: {fileID: 192429409} - - component: {fileID: 192429404} - - component: {fileID: 192429405} - - component: {fileID: 192429406} - - component: {fileID: 192429407} - - component: {fileID: 192429408} - - component: {fileID: 192429410} - m_Layer: 0 - m_Name: NetworkManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &7443408886491487335 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d2c95dfde7d73b54dbbdc23155d35d36, type: 3} - m_Name: - m_EditorClassIdentifier: - _refreshDefaultPrefabs: 1 - _runInBackground: 1 - _dontDestroyOnLoad: 1 - _objectPool: {fileID: 0} - _persistence: 0 - _logging: {fileID: 0} - _spawnablePrefabs: {fileID: 11400000, guid: 3a54436bdb916194f99da0d17231e617, type: 2} ---- !u!114 &7443408886491487337 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 211a9f6ec51ddc14f908f5acc0cd0423, type: 3} - m_Name: - m_EditorClassIdentifier: - _playerPrefab: {fileID: 201277550, guid: 5b712878ecece354ba4ffb026c0a221c, type: 3} - _addToDefaultScene: 1 - Spawns: [] ---- !u!224 &9139860295689780510 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2480283714093027852} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4393252310837120380} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Prefabs.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Prefabs.meta deleted file mode 100644 index e0abc32..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Prefabs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 50d54accc2af0c746b0729b097981b93 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Prefabs/CharacterControllerPrediction.prefab b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Prefabs/CharacterControllerPrediction.prefab deleted file mode 100644 index 2f8b7eb..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Prefabs/CharacterControllerPrediction.prefab +++ /dev/null @@ -1,219 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &303449598114786579 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 303449598114786577} - - component: {fileID: -2060332294883903109} - - component: {fileID: 201277550} - - component: {fileID: 4148834954576211901} - m_Layer: 0 - m_Name: CharacterControllerPrediction - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &303449598114786577 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -4.80351, y: 0.18147132, z: 5.430528} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 6952090537135875148} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &-2060332294883903109 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 53a6d84aa5d214e48a7308646e5d20da, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 201277550} - _networkObjectCache: {fileID: 201277550} ---- !u!114 &201277550 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - k__BackingField: 0 - k__BackingField: {fileID: 0} - _networkBehaviours: - - {fileID: -2060332294883903109} - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: -4.80351, y: 0.18147132, z: 5.430528} - Rotation: {x: 0, y: 0, z: 0, w: 1} - LocalScale: {x: 1, y: 1, z: 1} - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - k__BackingField: 5 - k__BackingField: 0 - _scenePathHash: 0 - k__BackingField: 0 - k__BackingField: 14842192110859722105 ---- !u!143 &4148834954576211901 -CharacterController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Height: 2 - m_Radius: 0.5 - m_SlopeLimit: 45 - m_StepOffset: 0.3 - m_SkinWidth: 0.08 - m_MinMoveDistance: 0.001 - m_Center: {x: 0, y: 0, z: 0} ---- !u!1 &5873068582516782542 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 6952090537135875148} - - component: {fileID: 6605329024375725182} - - component: {fileID: 9006911641345807741} - - component: {fileID: 4946798872430241371} - m_Layer: 0 - m_Name: Capsule - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &6952090537135875148 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5873068582516782542} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.01, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 303449598114786577} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &6605329024375725182 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5873068582516782542} - m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &9006911641345807741 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5873068582516782542} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!136 &4946798872430241371 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5873068582516782542} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Prefabs/CharacterControllerPrediction.prefab.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Prefabs/CharacterControllerPrediction.prefab.meta deleted file mode 100644 index 3ae3ba7..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Prefabs/CharacterControllerPrediction.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5b712878ecece354ba4ffb026c0a221c -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Scripts.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Scripts.meta deleted file mode 100644 index 6ddee3b..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: eaf414b899169f04bb4b0d65424a40bf -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Scripts/CharacterControllerPredictionV2.cs b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Scripts/CharacterControllerPredictionV2.cs deleted file mode 100644 index 4795f18..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Scripts/CharacterControllerPredictionV2.cs +++ /dev/null @@ -1,148 +0,0 @@ -using FishNet; -using FishNet.Object; -using FishNet.Object.Prediction; -using FishNet.Transporting; -using System.Collections.Generic; -using UnityEngine; -using static FishNet.PredictionV2.CharacterControllerPredictionV2; - -namespace FishNet.PredictionV2 -{ - - public class CharacterControllerPredictionV2 : NetworkBehaviour - { -#if PREDICTION_V2 - - - public struct MoveData : IReplicateData - { - public uint SentTick; - public bool Jump; - public float Horizontal; - public float Vertical; - public MoveData(bool jump, float horizontal, float vertical, uint sentTick) - { - Jump = jump; - Horizontal = horizontal; - Vertical = vertical; - SentTick = sentTick; - _tick = 0; - } - - private uint _tick; - public void Dispose() { } - public uint GetTick() => _tick; - public void SetTick(uint value) => _tick = value; - } - - public struct ReconcileData : IReconcileData - { - public Vector3 Position; - public float VerticalVelocity; - public ReconcileData(Vector3 position, float verticalVelocity) - { - Position = position; - VerticalVelocity = verticalVelocity; - _tick = 0; - } - - private uint _tick; - public void Dispose() { } - public uint GetTick() => _tick; - public void SetTick(uint value) => _tick = value; - } - - [SerializeField] - private float _jumpForce = 15f; - [SerializeField] - private float _moveRate = 4f; - - private CharacterController _characterController; - private bool _jump; - private float _verticalVelocity; - - private void Update() - { - if (base.IsOwner) - { - if (Input.GetKeyDown(KeyCode.Space)) - _jump = true; - } - } - - public override void OnStartNetwork() - { - _characterController = GetComponent(); - base.TimeManager.OnTick += TimeManager_OnTick; - } - - public override void OnStopNetwork() - { - base.TimeManager.OnTick -= TimeManager_OnTick; - } - - - private void TimeManager_OnTick() - { - Move(BuildMoveData()); - /* The base.IsServer check is not required but does save a little - * performance by not building the reconcileData if not server. */ - if (base.IsServerStarted) - { - ReconcileData rd = new ReconcileData(transform.position, _verticalVelocity); - Reconciliation(rd); - } - } - - private MoveData BuildMoveData() - { - if (!base.IsOwner) - return default; - - float horizontal = Input.GetAxisRaw("Horizontal"); - float vertical = Input.GetAxisRaw("Vertical"); - - MoveData md; - if (horizontal != 0 || vertical != 0) - md = new MoveData(_jump, horizontal, vertical, base.TimeManager.LocalTick); - else - md = new MoveData(_jump, horizontal, vertical, 0); - _jump = false; - - return md; - } - - - [Replicate] - private void Move(MoveData md, ReplicateState state = ReplicateState.Invalid, Channel channel = Channel.Unreliable) - { - if (state == ReplicateState.Future) - return; - - if (md.Jump) - _verticalVelocity = _jumpForce; - - float delta = (float)base.TimeManager.TickDelta; - _verticalVelocity += (Physics.gravity.y * delta); - if (_verticalVelocity < -20f) - _verticalVelocity = -20f; - - - Vector3 forces = new Vector3(md.Horizontal, _verticalVelocity, md.Vertical) * _moveRate; - _characterController.Move(forces * delta); - - - } - - [Reconcile] - private void Reconciliation(ReconcileData rd, Channel channel = Channel.Unreliable) - { - transform.position = rd.Position; - _verticalVelocity = rd.VerticalVelocity; - - } - -#endif - } - -} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Scripts/CharacterControllerPredictionV2.cs.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Scripts/CharacterControllerPredictionV2.cs.meta deleted file mode 100644 index 347ec1f..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/CharacterController/Scripts/CharacterControllerPredictionV2.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 53a6d84aa5d214e48a7308646e5d20da -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/README Prediction V2 Examples.txt b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/README Prediction V2 Examples.txt deleted file mode 100644 index a2dbccd..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/README Prediction V2 Examples.txt +++ /dev/null @@ -1,5 +0,0 @@ -Prediction V2 is a work in progress and so are the examples. - -The Rigidbody example may not smooth properly. - -The CharacterController example is expected to work. \ No newline at end of file diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody.meta deleted file mode 100644 index 9a1671a..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1603123a7ba837c4892564f087decd80 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/New Physic Material.physicMaterial b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/New Physic Material.physicMaterial deleted file mode 100644 index edda6af..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/New Physic Material.physicMaterial +++ /dev/null @@ -1,14 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!134 &13400000 -PhysicMaterial: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: New Physic Material - dynamicFriction: 0.1 - staticFriction: 0 - bounciness: 0 - frictionCombine: 1 - bounceCombine: 0 diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/New Physic Material.physicMaterial.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/New Physic Material.physicMaterial.meta deleted file mode 100644 index 9e61c6c..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/New Physic Material.physicMaterial.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b31539408c1f95d4281bb4484bb6b78e -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 13400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/PredictionV2_RB.unity b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/PredictionV2_RB.unity deleted file mode 100644 index 9500251..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/PredictionV2_RB.unity +++ /dev/null @@ -1,2063 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!114 &192429404 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3fdaae44044276a49a52229c1597e33b, type: 3} - m_Name: - m_EditorClassIdentifier: - _updateOrder: 0 - _timingType: 0 - _allowTickDropping: 0 - _maximumFrameTicks: 2 - _tickRate: 10 - _pingInterval: 1 - _physicsMode: 1 ---- !u!114 &192429405 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6f48f002b825cbd45a19bd96d90f9edb, type: 3} - m_Name: - m_EditorClassIdentifier: - _dontRoute: 0 - _unreliableMtu: 1023 - _ipv4BindAddress: - _enableIpv6: 1 - _ipv6BindAddress: - _port: 7770 - _maximumClients: 5000 - _clientAddress: localhost ---- !u!114 &192429406 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f9b6b565cd9533c4ebc18003f0fc18a2, type: 3} - m_Name: - m_EditorClassIdentifier: - _color: {r: 1, g: 1, b: 1, a: 1} - _placement: 1 - _hideTickRate: 1 ---- !u!114 &192429407 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 34e4a322dca349547989b14021da4e23, type: 3} - m_Name: - m_EditorClassIdentifier: - Transport: {fileID: 192429405} - _intermediateLayer: {fileID: 0} - _latencySimulator: - _enabled: 0 - _simulateHost: 1 - _latency: 5 - _outOfOrder: 0 - _packetLoss: 0 ---- !u!114 &192429408 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 68828c85278210948b9d50a8db3aab74, type: 3} - m_Name: - m_EditorClassIdentifier: - _authenticator: {fileID: 0} - _remoteClientTimeout: 2 - _remoteClientTimeoutDuration: 60 - _syncTypeRate: 0.1 - SpawnPacking: - Position: 0 - Rotation: 2 - Scale: 2 - _changeFrameRate: 1 - _frameRate: 100 - _shareIds: 1 - _startOnHeadless: 1 ---- !u!114 &192429409 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e08bb003fce297d4086cf8cba5aa459a, type: 3} - m_Name: - m_EditorClassIdentifier: - _queuedInputs: 0 - _dropExcessiveReplicates: 1 - _maximumServerReplicates: 15 - _redundancyCount: 2 - _allowPredictedSpawning: 0 - _reservedObjectIds: 15 ---- !u!114 &192429410 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: aca43cf6f20e77c4f8fcc078fd85081f, type: 3} - m_Name: - m_EditorClassIdentifier: - _remoteServerTimeout: 2 - _remoteServerTimeoutDuration: 60 - _changeFrameRate: 1 - _frameRate: 100 ---- !u!1 &212039606 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 212039607} - - component: {fileID: 212039608} - m_Layer: 0 - m_Name: View - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &212039607 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 212039606} - m_LocalRotation: {x: 0.37959778, y: -0.5981522, z: 0.3830318, w: 0.5927952} - m_LocalPosition: {x: 10.585218, y: 24.346329, z: 20.032343} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 40, y: -90, z: 0} ---- !u!114 &212039608 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 212039606} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - k__BackingField: 0 - k__BackingField: {fileID: 0} - _networkBehaviours: [] - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: 10.585218, y: 24.346329, z: 20.032343} - Rotation: {x: 0.37959778, y: -0.5981522, z: 0.3830318, w: 0.5927952} - LocalScale: {x: 1, y: 1, z: 1} - _isNetworked: 1 - _isSpawnable: 0 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - _enablePrediction: 0 - _predictionType: 0 - _graphicalObject: {fileID: 0} - _enableStateForwarding: 1 - _ownerInterpolation: 1 - _enableTeleport: 0 - _teleportThreshold: 1 - k__BackingField: 0 - k__BackingField: 0 - _scenePathHash: 1828152806 - k__BackingField: 7851856517478923898 - k__BackingField: 0 ---- !u!1 &555580081 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 555580085} - - component: {fileID: 555580084} - - component: {fileID: 555580083} - - component: {fileID: 555580082} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!135 &555580082 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &555580083 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 6273444b68d517449aadb36abebaf561, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &555580084 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &555580085 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 555580081} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -9.16, y: -3.4, z: 26.49} - m_LocalScale: {x: 15, y: 15, z: 15} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &587483120 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 587483126} - - component: {fileID: 587483125} - - component: {fileID: 587483124} - - component: {fileID: 587483123} - - component: {fileID: 587483122} - - component: {fileID: 587483121} - m_Layer: 0 - m_Name: OfflineCapsule - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!54 &587483121 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!114 &587483122 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b749f90d4c9961c4991179db1130fa4d, type: 3} - m_Name: - m_EditorClassIdentifier: - _rigidbodyType: 0 - _getInChildren: 0 ---- !u!136 &587483123 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &587483124 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &587483125 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &587483126 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 587483120} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 6.0329375, y: 0.01036527, z: 8.858636} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &872683029 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 872683031} - - component: {fileID: 872683030} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &872683030 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 872683029} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &872683031 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 872683029} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &967467089 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 967467090} - - component: {fileID: 967467093} - - component: {fileID: 967467092} - - component: {fileID: 967467091} - m_Layer: 0 - m_Name: Wall - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &967467090 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 967467089} - m_LocalRotation: {x: 0, y: 0.82565534, z: 0, w: 0.56417483} - m_LocalPosition: {x: 8.24, y: -0.08, z: 15.86} - m_LocalScale: {x: 1, y: 5, z: 5} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 111.31, z: 0} ---- !u!65 &967467091 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 967467089} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 2, y: 2, z: 2} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &967467092 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 967467089} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 6273444b68d517449aadb36abebaf561, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &967467093 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 967467089} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1112005912 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1112005916} - - component: {fileID: 1112005915} - - component: {fileID: 1112005914} - - component: {fileID: 1112005913} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1112005913 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 2, y: 1, z: 2} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1112005914 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 0bb31cf72dfcef449a1a4a5aab857f63, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1112005915 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1112005916 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1112005912} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -2, z: 0} - m_LocalScale: {x: 100, y: 1, z: 100} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1256183191 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1256183192} - - component: {fileID: 1256183195} - - component: {fileID: 1256183194} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1256183192 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1256183191} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1560902884} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &1256183194 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1256183191} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1256183195 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1256183191} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1470934487 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1470934491} - - component: {fileID: 1470934490} - - component: {fileID: 1470934489} - - component: {fileID: 1470934488} - m_Layer: 0 - m_Name: Wall - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1470934488 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 2, y: 2, z: 2} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1470934489 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 6273444b68d517449aadb36abebaf561, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1470934490 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1470934491 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1470934487} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 12.11, y: -0.08, z: 0} - m_LocalScale: {x: 1, y: 5, z: 20} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1560902877 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1560902884} - - component: {fileID: 1560902881} - - component: {fileID: 1560902878} - - component: {fileID: 1560902880} - - component: {fileID: 1560902879} - m_Layer: 0 - m_Name: OnlineSphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!54 &1560902878 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 1 ---- !u!114 &1560902879 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 402926ef33e0a894d9fec352693988ac, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 1560902880} - _networkObjectCache: {fileID: 1560902880} ---- !u!114 &1560902880 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - k__BackingField: 0 - k__BackingField: {fileID: 0} - _networkBehaviours: - - {fileID: 1560902879} - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: 0, y: 0, z: 0} - Rotation: {x: 0, y: 0, z: 0, w: 0} - LocalScale: {x: 0, y: 0, z: 0} - _isNetworked: 1 - _isSpawnable: 0 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - _enablePrediction: 0 - _predictionType: 0 - _graphicalObject: {fileID: 0} - _enableStateForwarding: 1 - _ownerInterpolation: 1 - _enableTeleport: 0 - _teleportThreshold: 1 - k__BackingField: 65535 - k__BackingField: 0 - _scenePathHash: 1828152806 - k__BackingField: 7851856515000995197 - k__BackingField: 0 ---- !u!135 &1560902881 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - m_Material: {fileID: 13400000, guid: 2315b89c915a21c40982b5867ff7d343, type: 2} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!4 &1560902884 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560902877} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1.1, y: 0, z: 5.430528} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1256183192} - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1726381377 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7d331f979d46e8e4a9fc90070c596d44, type: 3} - m_Name: - m_EditorClassIdentifier: - _enableNetworkLod: 0 - _levelOfDetailDistances: [] - _updateHostVisibility: 1 - _defaultConditions: - - {fileID: 11400000, guid: 2033f54fd2794464bae08fa5a55c8996, type: 2} ---- !u!1 &1784594014 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1784594015} - m_Layer: 0 - m_Name: Level - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1784594015 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1784594014} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1112005916} - - {fileID: 1470934491} - - {fileID: 555580085} - - {fileID: 1852016427} - - {fileID: 872683031} - - {fileID: 967467090} - - {fileID: 1883869627} - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1852016424 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1852016427} - - component: {fileID: 1852016426} - - component: {fileID: 1852016425} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1852016425 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_Enabled: 1 ---- !u!20 &1852016426 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1852016427 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1852016424} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1883869626 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1883869627} - - component: {fileID: 1883869630} - - component: {fileID: 1883869629} - - component: {fileID: 1883869628} - m_Layer: 0 - m_Name: Cube (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1883869627 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1883869626} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -48.62, y: -0.08, z: 0} - m_LocalScale: {x: 1, y: 5, z: 20} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1784594015} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &1883869628 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1883869626} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 2, y: 2, z: 2} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1883869629 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1883869626} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 6273444b68d517449aadb36abebaf561, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1883869630 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1883869626} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1424052073902602981 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2480283714093027852} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.25490198, g: 0.25490198, b: 0.25490198, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 2b3dca501a9d8c8479dc71dd068aa8b8, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!1001 &1712874950459209376 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 1712874951232431508, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: m_Name - value: Sphere_A - objectReference: {fileID: 0} - - target: {fileID: 1712874951232431512, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: m_RootOrder - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 1712874951232431512, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: m_LocalPosition.x - value: 10.983304 - objectReference: {fileID: 0} - - target: {fileID: 1712874951232431512, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: m_LocalPosition.y - value: -0.99999994 - objectReference: {fileID: 0} - - target: {fileID: 1712874951232431512, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: m_LocalPosition.z - value: 11.61 - objectReference: {fileID: 0} - - target: {fileID: 1712874951232431512, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: m_LocalRotation.w - value: -0.40963268 - objectReference: {fileID: 0} - - target: {fileID: 1712874951232431512, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1712874951232431512, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1712874951232431512, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: m_LocalRotation.z - value: 0.9122505 - objectReference: {fileID: 0} - - target: {fileID: 1712874951232431512, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1712874951232431512, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1712874951232431512, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 9108174227488385262, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: _scenePathHash - value: 1828152806 - objectReference: {fileID: 0} - - target: {fileID: 9108174227488385262, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} - propertyPath: k__BackingField - value: 7851856514066328649 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: bcf416aedafd2ea4d9ed2cd8469dbf56, type: 3} ---- !u!1 &2480283714093027852 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 9139860295689780510} - - component: {fileID: 6745855428745291286} - - component: {fileID: 1424052073902602981} - m_Layer: 5 - m_Name: Indicator - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &3965864432699664111 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4808982256744730386} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.25490198, g: 0.25490198, b: 0.25490198, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 2b3dca501a9d8c8479dc71dd068aa8b8, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &4393252310837120370 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252310837120383} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 2d50394614f8feb4eb0567fb7618d84d, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &4393252310837120371 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252310837120383} - m_CullTransparentMesh: 0 ---- !u!224 &4393252310837120380 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252310837120383} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 9139860295689780510} - m_Father: {fileID: 4393252311378272345} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 16, y: -96} - m_SizeDelta: {x: 256, y: 64} - m_Pivot: {x: 0, y: 1} ---- !u!114 &4393252310837120381 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252310837120383} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 4393252310837120370} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 4393252311378272325} - m_TargetAssemblyTypeName: - m_MethodName: OnClick_Client - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!1 &4393252310837120383 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4393252310837120380} - - component: {fileID: 4393252310837120371} - - component: {fileID: 4393252310837120370} - - component: {fileID: 4393252310837120381} - m_Layer: 5 - m_Name: Client - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &4393252311222810866 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311222810879} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 1b187e63031bf7849b249c8212440c3b, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &4393252311222810867 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311222810879} - m_CullTransparentMesh: 0 ---- !u!224 &4393252311222810876 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311222810879} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 7233259200132978428} - m_Father: {fileID: 4393252311378272345} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 16, y: -16} - m_SizeDelta: {x: 256, y: 64} - m_Pivot: {x: 0, y: 1} ---- !u!114 &4393252311222810877 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311222810879} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 4393252311222810866} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 4393252311378272325} - m_TargetAssemblyTypeName: - m_MethodName: OnClick_Server - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!1 &4393252311222810879 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4393252311222810876} - - component: {fileID: 4393252311222810867} - - component: {fileID: 4393252311222810866} - - component: {fileID: 4393252311222810877} - m_Layer: 5 - m_Name: Server - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &4393252311378272324 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4393252311378272345} - - component: {fileID: 4393252311378272325} - - component: {fileID: 4393252311378272344} - - component: {fileID: 4393252311378272347} - - component: {fileID: 4393252311378272346} - m_Layer: 5 - m_Name: NetworkHudCanvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &4393252311378272325 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6d3606bfdac5a4743890fc1a5ecd8f24, type: 3} - m_Name: - m_EditorClassIdentifier: - _autoStartType: 1 - _stoppedColor: {r: 0.25490198, g: 0.25490198, b: 0.25490198, a: 1} - _changingColor: {r: 0.78431374, g: 0.6862745, b: 0, a: 1} - _startedColor: {r: 0, g: 0.5882353, b: 0.64705884, a: 1} - _serverIndicator: {fileID: 3965864432699664111} - _clientIndicator: {fileID: 1424052073902602981} ---- !u!223 &4393252311378272344 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &4393252311378272345 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 4393252311222810876} - - {fileID: 4393252310837120380} - m_Father: {fileID: 7443408886491487332} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!114 &4393252311378272346 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &4393252311378272347 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4393252311378272324} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 1 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 1920, y: 1080} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0.5 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!1 &4808982256744730386 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7233259200132978428} - - component: {fileID: 5104387649508117141} - - component: {fileID: 3965864432699664111} - m_Layer: 5 - m_Name: Indicator - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!222 &5104387649508117141 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4808982256744730386} - m_CullTransparentMesh: 0 ---- !u!222 &6745855428745291286 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2480283714093027852} - m_CullTransparentMesh: 0 ---- !u!224 &7233259200132978428 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4808982256744730386} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4393252311222810876} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!4 &7443408886491487332 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 4393252311378272345} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &7443408886491487334 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7443408886491487332} - - component: {fileID: 7443408886491487335} - - component: {fileID: 1726381377} - - component: {fileID: 7443408886491487337} - - component: {fileID: 192429404} - - component: {fileID: 192429405} - - component: {fileID: 192429406} - - component: {fileID: 192429407} - - component: {fileID: 192429408} - - component: {fileID: 192429409} - - component: {fileID: 192429410} - m_Layer: 0 - m_Name: NetworkManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &7443408886491487335 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d2c95dfde7d73b54dbbdc23155d35d36, type: 3} - m_Name: - m_EditorClassIdentifier: - _refreshDefaultPrefabs: 1 - _runInBackground: 1 - _dontDestroyOnLoad: 1 - _objectPool: {fileID: 0} - _persistence: 0 - _logging: {fileID: 0} - _spawnablePrefabs: {fileID: 11400000, guid: 68e79e63a16f2c74e81f070bd36822b8, type: 2} ---- !u!114 &7443408886491487337 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7443408886491487334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 211a9f6ec51ddc14f908f5acc0cd0423, type: 3} - m_Name: - m_EditorClassIdentifier: - _playerPrefab: {fileID: 201277550, guid: 8ef354bfc16ca8a459074c3fa9b6727e, type: 3} - _addToDefaultScene: 1 - Spawns: [] ---- !u!224 &9139860295689780510 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2480283714093027852} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4393252310837120380} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/PredictionV2_RB.unity.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/PredictionV2_RB.unity.meta deleted file mode 100644 index c11f8c5..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/PredictionV2_RB.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 7f31e665d963214449f27dc0ad466dfb -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Prefabs.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Prefabs.meta deleted file mode 100644 index d875209..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Prefabs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c147d08de81079a4c8f17246c4e49dc5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Prefabs/RigidbodyPrediction.prefab b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Prefabs/RigidbodyPrediction.prefab deleted file mode 100644 index 8064808..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Prefabs/RigidbodyPrediction.prefab +++ /dev/null @@ -1,470 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &303449597948771942 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 303449597948771941} - - component: {fileID: 303449597948771939} - - component: {fileID: 303449597948771940} - m_Layer: 0 - m_Name: Cube (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &303449597948771941 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449597948771942} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.5, y: 0.25, z: 0.25} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 303449599178274091} - m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} ---- !u!33 &303449597948771939 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449597948771942} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &303449597948771940 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449597948771942} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!1 &303449598114786579 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 303449598114786577} - - component: {fileID: 4875864441162262683} - - component: {fileID: 303449598114786578} - - component: {fileID: 201277550} - - component: {fileID: 201277549} - m_Layer: 0 - m_Name: RigidbodyPrediction - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &303449598114786577 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -4.80351, y: 0.18147132, z: 5.430528} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 303449599178274091} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &4875864441162262683 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1e66bfd8c92aad24e8526e7d3aae8b34, type: 3} - m_Name: - m_EditorClassIdentifier: - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 201277550} - _networkObjectCache: {fileID: 201277550} ---- !u!135 &303449598114786578 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - m_Material: {fileID: 13400000, guid: b31539408c1f95d4281bb4484bb6b78e, type: 2} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &201277550 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: 0 - k__BackingField: 0 - k__BackingField: {fileID: 0} - _networkBehaviours: - - {fileID: 4875864441162262683} - k__BackingField: {fileID: 0} - k__BackingField: [] - SerializedTransformProperties: - Position: {x: -4.80351, y: 0.18147132, z: 5.430528} - Rotation: {x: 0, y: 0, z: 0, w: 1} - LocalScale: {x: 1, y: 1, z: 1} - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _defaultDespawnType: 0 - NetworkObserver: {fileID: 0} - k__BackingField: 17 - k__BackingField: 0 - _scenePathHash: 0 - k__BackingField: 0 - k__BackingField: 7608784535491207777 ---- !u!54 &201277549 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598114786579} - serializedVersion: 4 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 1 ---- !u!1 &303449598207636365 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 303449598207636364} - - component: {fileID: 303449598207636362} - - component: {fileID: 303449598207636363} - m_Layer: 0 - m_Name: Cube (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &303449598207636364 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598207636365} - serializedVersion: 2 - m_LocalRotation: {x: 0.5, y: 0.5, z: 0.5, w: 0.5} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.5, y: 0.25, z: 0.25} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 303449599178274091} - m_LocalEulerAnglesHint: {x: 0, y: 90, z: 90} ---- !u!33 &303449598207636362 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598207636365} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &303449598207636363 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598207636365} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!1 &303449598691742042 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 303449598691742041} - - component: {fileID: 303449598691742039} - - component: {fileID: 303449598691742040} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &303449598691742041 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598691742042} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.5, y: 0.25, z: 0.25} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 303449599178274091} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &303449598691742039 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598691742042} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &303449598691742040 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449598691742042} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!1 &303449599178274092 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 303449599178274091} - - component: {fileID: 303449599178274088} - - component: {fileID: 303449599178274089} - m_Layer: 0 - m_Name: Sphere (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &303449599178274091 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449599178274092} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 303449598691742041} - - {fileID: 303449597948771941} - - {fileID: 303449598207636364} - m_Father: {fileID: 303449598114786577} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &303449599178274088 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449599178274092} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &303449599178274089 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 303449599178274092} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Prefabs/RigidbodyPrediction.prefab.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Prefabs/RigidbodyPrediction.prefab.meta deleted file mode 100644 index 9e75a80..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Prefabs/RigidbodyPrediction.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 8ef354bfc16ca8a459074c3fa9b6727e -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Scripts.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Scripts.meta deleted file mode 100644 index 3207c14..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bf02fdf4a8ce43c489e5b5d8e65cb87d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Scripts/RigidbodyPredictionV2.cs b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Scripts/RigidbodyPredictionV2.cs deleted file mode 100644 index 3d2d59b..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Scripts/RigidbodyPredictionV2.cs +++ /dev/null @@ -1,211 +0,0 @@ -using FishNet.Object; -using FishNet.Object.Prediction; -using FishNet.Transporting; -using UnityEngine; - -/* -* -* See TransformPrediction.cs for more detailed notes. -* -*/ - -namespace FishNet.PredictionV2 -{ - /* THIS CLASS IS CURRENTLY USED FOR TESTING AND IS NOT CONSIDERED - * AN EXAMPLE TO FOLLOW. */ - /* THIS CLASS IS CURRENTLY USED FOR TESTING AND IS NOT CONSIDERED - * AN EXAMPLE TO FOLLOW. */ - /* THIS CLASS IS CURRENTLY USED FOR TESTING AND IS NOT CONSIDERED - * AN EXAMPLE TO FOLLOW. */ - /* THIS CLASS IS CURRENTLY USED FOR TESTING AND IS NOT CONSIDERED - * AN EXAMPLE TO FOLLOW. */ - - public class RigidbodyPredictionV2 : NetworkBehaviour - { -#if PREDICTION_V2 - - public struct MoveData : IReplicateData - { - public bool Jump; - public float Horizontal; - public float Vertical; - public Vector3 OtherImpulseForces; - public MoveData(bool jump, float horizontal, float vertical, Vector3 otherImpulseForces) - { - Jump = jump; - Horizontal = horizontal; - Vertical = vertical; - OtherImpulseForces = otherImpulseForces; - _tick = 0; - } - - private uint _tick; - public void Dispose() { } - public uint GetTick() => _tick; - public void SetTick(uint value) => _tick = value; - } - - public struct ReconcileData : IReconcileData - { - public Vector3 Position; - public Quaternion Rotation; - public Vector3 Velocity; - public Vector3 AngularVelocity; - public ReconcileData(Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 angularVelocity) - { - Position = position; - Rotation = rotation; - Velocity = velocity; - AngularVelocity = angularVelocity; - _tick = 0; - } - - private uint _tick; - public void Dispose() { } - public uint GetTick() => _tick; - public void SetTick(uint value) => _tick = value; - } - - //[SerializeField] - //private float _jumpForce = 15f; - [SerializeField] - private float _moveRate = 15f; - - public Rigidbody Rigidbody { get; private set; } - private bool _jump; - - private void Update() - { - if (base.IsOwner) - { - if (Input.GetKeyDown(KeyCode.Space)) - _jump = true; - } - } - - public override void OnStartNetwork() - { - Rigidbody = GetComponent(); - base.TimeManager.OnTick += TimeManager_OnTick; - base.TimeManager.OnPostTick += TimeManager_OnPostTick; - } - - public override void OnStopNetwork() - { - - base.TimeManager.OnTick -= TimeManager_OnTick; - base.TimeManager.OnPostTick -= TimeManager_OnPostTick; - } - - - private void TimeManager_OnTick() - { - Move(BuildMoveData()); - } - - private MoveData BuildMoveData() - { - if (!IsOwner && Owner.IsValid) - return default; - - float horizontal = Input.GetAxisRaw("Horizontal"); - float vertical = Input.GetAxisRaw("Vertical"); - //MoveData md = new MoveData(_jump, horizontal, vertical, (SpringForces + RocketForces)); - MoveData md = new MoveData(_jump, horizontal, vertical, Vector3.zero); - - //SpringForces = Vector3.zero; - //RocketForces = Vector3.zero; - - _jump = false; - - return md; - } - - public uint LastMdTick; - - [Replicate] - private void Move(MoveData md, ReplicateState state = ReplicateState.Invalid, Channel channel = Channel.Unreliable) - { - LastMdTick = md.GetTick(); - //if (base.IsOwner) - // Debug.Log(PredictionManager.ClientReplayTick + " > " + md.GetTick()); - //if (state == ReplicateState.Future) - //{ - // /* Reduce velocity slightly. This will be slightly less accurate if - // * the object continues to move in the same direction but can drastically - // * reduce jarring visuals if the object changes path rather than predicted(future) - // * forward. */ - // _rigidbody.velocity *= 0.65f; - // _rigidbody.angularVelocity *= 0.65f; - // return; - //} - - //Vector3 forces = new Vector3(md.Horizontal, 0f, md.Vertical) * _moveRate; - //Rigidbody.AddForce(forces); - - //if (md.Jump) - // Rigidbody.AddForce(new Vector3(0f, _jumpForce, 0f), ForceMode.Impulse); - ////Add gravity to make the object fall faster. - //Rigidbody.AddForce(Physics.gravity * 3f); - - Vector3 forces = new Vector3(md.Horizontal, 0f, md.Vertical) * _moveRate; - //PRB.AddForce(forces); - forces += Physics.gravity * 3f; - //if (md.Jump) - // PRB.AddForce(new Vector3(0f, _jumpForce, 0f), ForceMode.Impulse); - ////Add gravity to make the object fall faster. - //PRB.AddForce(forces); - - - //if (IsOwner) - //{ - // if (state.IsReplayed()) - // Debug.Log($"{md.GetTick()} -> {transform.position.x} -> {Rigidbody.velocity.x}"); - // else - // Debug.LogWarning($"{md.GetTick()} -> {transform.position.x} -> {Rigidbody.velocity.x}"); - //} - - //if ((!base.IsServerStarted && base.IsOwner) || (base.IsServerStarted && !base.IsOwner)) - // Debug.LogWarning($"Frame {Time.frameCount}. State {state}, Horizontal {md.Horizontal}. MdTick {md.GetTick()}, PosX {transform.position.x.ToString("0.##")}. VelX {Rigidbody.velocity.x.ToString("0.###")}."); - } - - private void SendReconcile() - { - /* The base.IsServer check is not required but does save a little - * performance by not building the reconcileData if not server. */ - if (IsServerStarted) - { - ReconcileData rd = new ReconcileData(transform.position, transform.rotation, Rigidbody.velocity, Rigidbody.angularVelocity); - //if (!base.IsOwner) - // Debug.LogError($"Frame {Time.frameCount}. Reconcile, MdTick {LastMdTick}, PosX {transform.position.x.ToString("0.##")}. VelX {Rigidbody.velocity.x.ToString("0.###")}."); - Reconciliation(rd); - } - } - - private void TimeManager_OnPostTick() - { - SendReconcile(); - } - - [Reconcile] - private void Reconciliation(ReconcileData rd, Channel channel = Channel.Unreliable) - { - transform.position = rd.Position; - transform.rotation = rd.Rotation; - Rigidbody.velocity = rd.Velocity; - Rigidbody.angularVelocity = rd.AngularVelocity; - - //if (PrintForClient()) - //{ - // Debug.LogError($"Frame {Time.frameCount}. Reconcile, MdTick {rd.GetTick()}, PosX {transform.position.x.ToString("0.##")}. VelX {Rigidbody.velocity.x.ToString("0.###")}. RdPosX " + - // $"{rd.Position.x.ToString("0.##")}. RdVelX {Rigidbody.velocity.x.ToString("0.###")}"); - //} - - } - - private bool PrintForClient() => ((!base.IsServerStarted && base.IsOwner) || (base.IsServerStarted && !base.IsOwner)); - -#endif - } - -} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Scripts/RigidbodyPredictionV2.cs.meta b/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Scripts/RigidbodyPredictionV2.cs.meta deleted file mode 100644 index f0b87be..0000000 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/Rigidbody/Scripts/RigidbodyPredictionV2.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1e66bfd8c92aad24e8526e7d3aae8b34 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyState.cs b/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyState.cs deleted file mode 100644 index 5c366bf..0000000 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/Prediction/RigidbodyState.cs +++ /dev/null @@ -1,146 +0,0 @@ -using FishNet.Component.Prediction; -using FishNet.Serializing; -using UnityEngine; - -namespace FishNet.Component.Prediction -{ - public struct RigidbodyState - { - public uint LocalTick; - public Vector3 Position; - public Quaternion Rotation; - public bool IsKinematic; - public Vector3 Velocity; - public Vector3 AngularVelocity; - - public RigidbodyState(Rigidbody rb, bool isKinematic, uint tick) : this(rb, tick) - { - Position = rb.transform.position; - Rotation = rb.transform.rotation; - IsKinematic = isKinematic; - Velocity = rb.velocity; - AngularVelocity = rb.angularVelocity; - LocalTick = tick; - - } - - public RigidbodyState(Rigidbody rb, uint tick) - { - Position = rb.transform.position; - Rotation = rb.transform.rotation; - IsKinematic = rb.isKinematic; - Velocity = rb.velocity; - AngularVelocity = rb.angularVelocity; - LocalTick = tick; - } - } - - public struct Rigidbody2DState - { - public uint LocalTick; - public Vector3 Position; - public Quaternion Rotation; - public Vector2 Velocity; - public float AngularVelocity; - public bool Simulated; - public bool IsKinematic; - - public Rigidbody2DState(Rigidbody2D rb, bool simulated, uint tick) - { - Position = rb.transform.position; - Rotation = rb.transform.rotation; - Velocity = rb.velocity; - AngularVelocity = rb.angularVelocity; - Simulated = simulated; - IsKinematic = rb.isKinematic; - LocalTick = tick; - } - - public Rigidbody2DState(Rigidbody2D rb, uint tick) - { - Position = rb.transform.position; - Rotation = rb.transform.rotation; - Velocity = rb.velocity; - AngularVelocity = rb.angularVelocity; - Simulated = rb.simulated; - IsKinematic = rb.isKinematic; - LocalTick = tick; - } - } - - public static class RigidbodyStateSerializers - { - - public static void WriteRigidbodyState(this Writer writer, RigidbodyState value) - { - writer.WriteTickUnpacked(value.LocalTick); - writer.WriteVector3(value.Position); - writer.WriteQuaternion(value.Rotation); - writer.WriteBoolean(value.IsKinematic); - if (!value.IsKinematic) - { - writer.WriteVector3(value.Velocity); - writer.WriteVector3(value.AngularVelocity); - } - } - - public static RigidbodyState ReadRigidbodyState(this Reader reader) - { - RigidbodyState state = new RigidbodyState() - { - LocalTick = reader.ReadTickUnpacked(), - Position = reader.ReadVector3(), - Rotation = reader.ReadQuaternion(), - IsKinematic = reader.ReadBoolean() - }; - - if (!state.IsKinematic) - { - state.Velocity = reader.ReadVector3(); - state.AngularVelocity = reader.ReadVector3(); - } - - return state; - } - - - public static void WriteRigidbody2DState(this Writer writer, Rigidbody2DState value) - { - writer.WriteTickUnpacked(value.LocalTick); - writer.WriteVector3(value.Position); - writer.WriteQuaternion(value.Rotation); - writer.WriteBoolean(value.Simulated); - writer.WriteBoolean(value.IsKinematic); - - if (value.Simulated) - { - writer.WriteVector2(value.Velocity); - writer.WriteSingle(value.AngularVelocity); - } - } - - public static Rigidbody2DState ReadRigidbody2DState(this Reader reader) - { - Rigidbody2DState state = new Rigidbody2DState() - { - LocalTick = reader.ReadTickUnpacked(), - Position = reader.ReadVector3(), - Rotation = reader.ReadQuaternion(), - Simulated = reader.ReadBoolean(), - IsKinematic = reader.ReadBoolean() - }; - - if (state.Simulated) - { - state.Velocity = reader.ReadVector2(); - state.AngularVelocity = reader.ReadSingle(); - } - - return state; - } - - - } - - -} diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkCollider.cs b/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkCollider.cs deleted file mode 100644 index 3146110..0000000 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkCollider.cs +++ /dev/null @@ -1,491 +0,0 @@ -using FishNet.Managing; -using FishNet.Object; -using GameKit.Dependencies.Utilities; -using GameKit.Dependencies.Utilities.Types; -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using UnityEngine; -using TimeManagerCls = FishNet.Managing.Timing.TimeManager; - -public abstract class NetworkCollider : NetworkBehaviour -{ -#if PREDICTION_V2 - #region Types. - private struct ColliderData : IResettable - { - /// - /// Tick which the collisions happened. - /// - public uint Tick; - /// - /// Hits for Tick. - /// - public HashSet Hits; - - public ColliderData(uint tick, HashSet hits) - { - Tick = tick; - Hits = hits; - } - - public void InitializeState() { } - public void ResetState() - { - Tick = TimeManagerCls.UNSET_TICK; - CollectionCaches.StoreAndDefault(ref Hits); - } - } - #endregion - - /// - /// Called when another collider enters this collider. - /// - public event Action OnEnter; - /// - /// Called when another collider stays in this collider. - /// - public event Action OnStay; - /// - /// Called when another collider exits this collider. - /// - public event Action OnExit; - /// - /// True to run collisions for colliders which are triggers, false to run collisions for colliders which are not triggers. - /// - [HideInInspector] - protected bool IsTrigger; - /// - /// The maximum number of simultaneous hits to check for. - /// - [SerializeField] - private ushort _maximumSimultaneousHits = 16; - - /// - /// The duration of the history. - /// - [SerializeField] - private float _historyDuration = 0.5f; - - /// - /// The colliders on this object. - /// - private Collider[] _colliders; - /// - /// The hits from the last check. - /// - private Collider[] _hits; - /// - /// The history of collider data. - /// - private ResettableRingBuffer _colliderDataHistory; - /// - /// True if colliders have been searched for at least once. - /// We cannot check the null state on _colliders because Unity has a habit of initializing collections on it's own. - /// - private bool _collidersFound; - /// - /// True to cache collision histories for comparing start and exits. - /// - private bool _useCache => (OnEnter != null || OnExit != null); - - protected virtual void Awake() - { - _colliderDataHistory = ResettableCollectionCaches.RetrieveRingBuffer(); - _hits = CollectionCaches.RetrieveArray(); - if (_hits.Length < _maximumSimultaneousHits) - _hits = new Collider[_maximumSimultaneousHits]; - } - - private void OnDestroy() - { - ResettableCollectionCaches.StoreAndDefault(ref _colliderDataHistory); - CollectionCaches.StoreAndDefault(ref _hits, -_hits.Length); - } - - public override void OnStartNetwork() - { - FindColliders(); - - //Initialize the ringbuffer. Server only needs 1 tick worth of history. - uint historyTicks = (base.IsServerStarted) ? 1 : TimeManager.TimeToTicks(_historyDuration); - _colliderDataHistory.Initialize((int)historyTicks); - - //Events needed by server and client. - TimeManager.OnPostPhysicsSimulation += TimeManager_OnPostPhysicsSimulation; - } - - public override void OnStartClient() - { - //Events only needed by the client. - PredictionManager.OnPostPhysicsTransformSync += PredictionManager_OnPostPhysicsTransformSync; - PredictionManager.OnPostReplicateReplay += PredictionManager_OnPostReplicateReplay; - } - - public override void OnStopClient() - { - //Events only needed by the client. - PredictionManager.OnPostPhysicsTransformSync -= PredictionManager_OnPostPhysicsTransformSync; - PredictionManager.OnPostReplicateReplay -= PredictionManager_OnPostReplicateReplay; - - } - - public override void OnStopNetwork() - { - TimeManager.OnPostPhysicsSimulation -= TimeManager_OnPostPhysicsSimulation; - } - - /// - /// Called after Physics SyncTransforms are run after a reconcile. - /// This will only invoke if physics are set to TimeManager, within the TimeManager inspector. - /// - private void PredictionManager_OnPostPhysicsTransformSync(uint clientTick, uint serverTick) - { - /* This callback will only occur when client only. - * SInce this is the case remove histories prior - * to clientTick. */ - if (clientTick > 0) - CleanHistory(clientTick - 1); - CheckColliders(clientTick, true); - } - - /// - /// When using TimeManager for physics timing, this is called immediately after the physics simulation has occured for the tick. - /// While using Unity for physics timing, this is called during Update, only if a physics frame. - /// This may be useful if you wish to run physics differently for stacked scenes. - private void TimeManager_OnPostPhysicsSimulation(float delta) - { - CheckColliders(TimeManager.LocalTick, false); - } - - /// - /// Called after physics is simulated when replaying a replicate method. - /// - private void PredictionManager_OnPostReplicateReplay(uint clientTick, uint serverTick) - { - CheckColliders(clientTick, true); - } - - /// - /// Cleans history up to, while excluding tick. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void CleanHistory(uint tick) - { - if (_useCache) - { - int removeCount = 0; - int historyCount = _colliderDataHistory.Count; - for (int i = 0; i < historyCount; i++) - { - if (_colliderDataHistory[i].Tick >= tick) - break; - removeCount++; - } - - for (int i = 0; i < removeCount; i++) - _colliderDataHistory[i].ResetState(); - _colliderDataHistory.RemoveRange(true, removeCount); - } - //Cache is not used. - else - { - ClearColliderDataHistory(); - } - } - - /// - /// Checks for any trigger changes; - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void CheckColliders(uint tick, bool replay) - { - //Should not be possible as tick always starts on 1. - if (tick == TimeManagerCls.UNSET_TICK) - return; - - const int INVALID_HISTORY_VALUE = -1; - - HashSet current = CollectionCaches.RetrieveHashSet(); - HashSet previous = null; - - int previousHitsIndex = INVALID_HISTORY_VALUE; - /* Server only keeps 1 history so - * if server is started then - * simply clean one. When the server is - * started replay will never be true, so this - * will only call once per tick. */ - if (base.IsServerStarted && tick > 0) - CleanHistory(tick - 1); - - if (_useCache) - { - if (replay) - { - previousHitsIndex = GetHistoryIndex(tick - 1, false); - if (previousHitsIndex != -1) - previous = _colliderDataHistory[previousHitsIndex].Hits; - } - //Not replaying. - else - { - if (_colliderDataHistory.Count > 0) - { - ColliderData cd = _colliderDataHistory[_colliderDataHistory.Count - 1]; - /* If the hit tick one before current then it can be used, otherwise - * use a new collection for previous. */ - if (cd.Tick == (tick - 1)) - previous = cd.Hits; - } - } - } - //Not using history, clear it all. - else - { - ClearColliderDataHistory(); - } - - /* Previous may not be set here if there were - * no collisions during the previous tick. */ - - // The rotation of the object for box colliders. - Quaternion rotation = transform.rotation; - // The layer mask for this object. - int layerMask = 1 << gameObject.layer; - - // Check each collider for triggers. - foreach (Collider col in _colliders) - { - if (!col.enabled) - continue; - if (IsTrigger != col.isTrigger) - continue; - - //Number of hits from the checks. - int hits; - if (col is SphereCollider sphereCollider) - hits = GetSphereColliderHits(sphereCollider, layerMask); - else if (col is CapsuleCollider capsuleCollider) - hits = GetCapsuleColliderHits(capsuleCollider, layerMask); - else if (col is BoxCollider boxCollider) - hits = GetBoxColliderHits(boxCollider, rotation, layerMask); - else - hits = 0; - - // Check the hits for triggers. - for (int i = 0; i < hits; i++) - { - Collider hit = _hits[i]; - if (hit == null || hit == col) - continue; - - /* If not in previous then add and - * invoke enter. */ - if (previous == null || !previous.Contains(hit)) - OnEnter?.Invoke(hit); - - //Also add to current hits. - current.Add(hit); - OnStay?.Invoke(hit); - } - } - - if (previous != null) - { - //Check for stays and exits. - foreach (Collider col in previous) - { - //If it was in previous but not current, it has exited. - if (!current.Contains(col)) - OnExit?.Invoke(col); - } - } - - //If not using the cache then clean up collections. - if (_useCache) - { - //If not replaying add onto the end. */ - if (!replay) - { - AddToEnd(); - } - /* If a replay then set current colliders - * to one entry past historyIndex. If the next entry - * beyond historyIndex is for the right tick it can be - * updated, otherwise a result has to be inserted. */ - else - { - /* Previous hits was not found in history so we - * cannot assume current results go right after the previousIndex. - * Find whichever index is the closest to tick and return it. - * - * If an exact match is not found for tick then the entry just after - * tick will be returned. This will let us insert current hits right - * before that entry. */ - if (previousHitsIndex == -1) - { - int currentIndex = GetHistoryIndex(tick, true); - AddDataToIndex(currentIndex); - } - //If previous hits are known then the index to update is right after previous index. - else - { - int insertIndex = (previousHitsIndex + 1); - /* InsertIndex is out of bounds which means - * to add onto the end. */ - if (insertIndex >= _colliderDataHistory.Count) - AddToEnd(); - //Not the last entry to insert in the middle. - else - AddDataToIndex(insertIndex); - } - - /* Adds data to an index. If the tick - * matches on index with the current tick then - * replace the entry. Otherwise insert to the - * correct location. */ - void AddDataToIndex(int index) - { - ColliderData colliderData = new ColliderData(tick, current); - /* If insertIndex is the same tick then replace, otherwise - * put in front of. */ - //Replace. - if (_colliderDataHistory[index].Tick == tick) - { - _colliderDataHistory[index].ResetState(); - _colliderDataHistory[index] = colliderData; - } - //Insert before. - else - { - _colliderDataHistory.Insert(index, colliderData); - } - } - } - - void AddToEnd() - { - ColliderData colliderData = new ColliderData(tick, current); - _colliderDataHistory.Add(colliderData); - } - - } - /* If not using caching then store results from this run. */ - else - { - CollectionCaches.Store(current); - } - - //Returns history index for a tick. - /* GetClosest will return the closest match which is - * past lTick if lTick could not be found. */ - int GetHistoryIndex(uint lTick, bool getClosest) - { - for (int i = 0; i < _colliderDataHistory.Count; i++) - { - uint localTick = _colliderDataHistory[i].Tick; - if (localTick == lTick) - return i; - /* Tick is too high, any further results - * will also be too high. */ - if (localTick > tick) - { - if (getClosest) - return i; - else - return INVALID_HISTORY_VALUE; - } - } - - //Fall through. - return INVALID_HISTORY_VALUE; - } - } - - /// - /// Checks for Sphere collisions. - /// - /// Number of colliders hit. - private int GetSphereColliderHits(SphereCollider sphereCollider, int layerMask) - { - sphereCollider.GetSphereCastParams(out Vector3 center, out float radius); - return Physics.OverlapSphereNonAlloc(center, radius, _hits, layerMask); - } - - /// - /// Checks for Capsule collisions. - /// - /// Number of colliders hit. - private int GetCapsuleColliderHits(CapsuleCollider capsuleCollider, int layerMask) - { - Vector3 center = capsuleCollider.bounds.center; - float halfHeight = (capsuleCollider.height * 0.5f); - Vector3 offset; - - int direction = capsuleCollider.direction; - if (direction == 0) - { - offset = new Vector3(halfHeight, 0.0f, 0.0f); - } - else if (direction == 1) - { - offset = new Vector3(0.0f, halfHeight, 0.0f); - } - else if (direction == 2) - { - offset = new Vector3(0.0f, 0.0f, halfHeight); - } - else - { - base.NetworkManager.LogError("Invalid capsule collider direction."); - return 0; - } - - capsuleCollider.GetCapsuleCastParams(out Vector3 start, out Vector3 end, out float radius); - return Physics.OverlapCapsuleNonAlloc(start, end, radius, _hits, layerMask); - } - - /// - /// Checks for Box collisions. - /// - /// Number of colliders hit. - private int GetBoxColliderHits(BoxCollider boxCollider, Quaternion rotation, int layerMask) - { - boxCollider.GetBoxCastParams(out Vector3 center, out Vector3 halfExtents); - return Physics.OverlapBoxNonAlloc(center, halfExtents, _hits, rotation, layerMask); - } - - /// - /// Finds colliders to use. - /// True to rebuild the colliders even if they are already populated. - /// - public void FindColliders(bool rebuild = false) - { - if (_collidersFound && !rebuild) - return; - _collidersFound = true; - - _colliders = GetComponents(); - } - - /// - /// Resets this NetworkBehaviour so that it may be added to an object pool. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override void ResetState() - { - base.ResetState(); - ClearColliderDataHistory(); - } - - /// - /// Resets datas in collider data history and clears collection. - /// - private void ClearColliderDataHistory() - { - foreach (ColliderData cd in _colliderDataHistory) - cd.ResetState(); - _colliderDataHistory.Clear(); - } -#endif -} diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkCollision.cs b/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkCollision.cs deleted file mode 100644 index 2869334..0000000 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkCollision.cs +++ /dev/null @@ -1,11 +0,0 @@ -public sealed class NetworkCollision : NetworkCollider -{ - #if PREDICTION_V2 - protected override void Awake() - { - base.IsTrigger = false; - base.Awake(); - } -#endif - -} diff --git a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkTrigger.cs b/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkTrigger.cs deleted file mode 100644 index 3a7d23e..0000000 --- a/Assets/Packages/FishNet/Runtime/Generated/Component/Utility/NetworkTrigger.cs +++ /dev/null @@ -1,10 +0,0 @@ -public sealed class NetworkTrigger : NetworkCollider -{ -#if PREDICTION_V2 - protected override void Awake() - { - base.IsTrigger = true; - base.Awake(); - } -#endif -} diff --git a/Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.LOD.cs b/Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.LOD.cs deleted file mode 100644 index 26219c8..0000000 --- a/Assets/Packages/FishNet/Runtime/Managing/Client/ClientManager.LOD.cs +++ /dev/null @@ -1,211 +0,0 @@ -using FishNet.Connection; -using FishNet.Managing.Timing; -using FishNet.Object; -using FishNet.Serializing; -using FishNet.Transporting; -using GameKit.Dependencies.Utilities; -using System.Collections.Generic; -using UnityEngine; - -namespace FishNet.Managing.Client -{ - public sealed partial class ClientManager : MonoBehaviour - { - #region Internal. - /// - /// How many ticks between each LOD update. - /// - public uint LevelOfDetailInterval => NetworkManager.TimeManager.TimeToTicks(0.5d, TickRounding.RoundUp); - #endregion - - #region Private. - /// - /// Positions of the player objects. - /// - private List _objectsPositionsCache = new List(); - /// - /// Next index within Spawned to update the LOD on. - /// - private int _nextLodNobIndex; - #endregion - - /// - /// Sends a level of update if conditions are met. - /// - /// True to force send a full update immediately. - /// This may be useful when teleporting clients. - /// This must be called by on the server by using ServerManager.ForceLodUpdate(NetworkConnection). - /// - internal void TrySendLodUpdate(uint localTick, bool forceFullUpdate) - { - //PROSTART - if (!Connection.IsAuthenticated) - return; - NetworkManager nm = NetworkManager; - if (forceFullUpdate) - { - nm.LogError($"ForceFullUpdate is not yet implemented. Setting this true should not be possible."); - return; - } - if (!nm.ObserverManager.GetEnableNetworkLod()) - return; - - //Interval check. - uint intervalRequirement = LevelOfDetailInterval; - bool intervalMet = ((localTick - Connection.LastLevelOfDetailUpdate) >= intervalRequirement); - if (!forceFullUpdate && !intervalMet) - return; - - //Set next tick. - Connection.LastLevelOfDetailUpdate = localTick; - - PooledWriter tmpWriter = WriterPool.Retrieve(1000); - int written = 0; - - List localClientSpawned = nm.ClientManager.Objects.LocalClientSpawned; - int spawnedCount = localClientSpawned.Count; - if (spawnedCount != 0) - { - //Rebuild position cache for players objects. - _objectsPositionsCache.Clear(); - foreach (NetworkObject playerObject in Connection.Objects) - { - //Might be null under certain irregular conditions as clientHost. - if (playerObject != null) - _objectsPositionsCache.Add(playerObject.transform.position); - } - - /* Set the maximum number of entries per send. - * Each send is going to be approximately 3 bytes - * but sometimes can be 4. Calculate based off the maximum - * possible bytes. */ - //int mtu = NetworkManager.TransportManager.GetMTU((byte)Channel.Reliable); - const int estimatedMaximumIterations = (400 / 4); - /* Aim to process all objects over at most 10 seconds. - * To reduce the number of packets sent objects are - * calculated ~twice a second. This means if the client had - * 1000 objects visible to them they would need to process - * 100 objects a second, so 50 objects every half a second. - * This should be no problem even on slower mobile devices. */ - int iterations; - //Normal update. - if (!forceFullUpdate) - { - iterations = Mathf.Min(spawnedCount, estimatedMaximumIterations); - } - //Force does a full update. - else - { - _nextLodNobIndex = 0; - iterations = spawnedCount; - } - - //Cache a few more things. - Dictionary currentLods = Connection.LevelOfDetails; - List lodDistances = NetworkManager.ObserverManager.GetLevelOfDetailDistances(); - - //Index to use next is too high so reset it. - if (_nextLodNobIndex >= spawnedCount) - _nextLodNobIndex = 0; - int nobIndex = _nextLodNobIndex; - - //Only check if player has objects. - if (_objectsPositionsCache.Count > 0) - { - for (int i = 0; i < iterations; i++) - { - NetworkObject nob = localClientSpawned[nobIndex]; - //Somehow went null. Can occur perhaps if client destroys objects between ticks maybe. - if (nob == null) - { - IncreaseObjectIndex(); - continue; - } - //Only check objects not owned by the local client. - if (!nob.IsOwner && !nob.IsDeinitializing) - { - Vector3 nobPosition = nob.transform.position; - float closestDistance = float.MaxValue; - foreach (Vector3 objPosition in _objectsPositionsCache) - { - float dist = Vector3.SqrMagnitude(nobPosition - objPosition); - if (dist < closestDistance) - closestDistance = dist; - } - - //If not within any distances then max lod will be used, the value below. - byte lod = (byte)(lodDistances.Count - 1); - for (byte z = 0; z < lodDistances.Count; z++) - { - //Distance is within range of this lod. - if (closestDistance <= lodDistances[z]) - { - lod = z; - break; - } - } - - bool changed; - /* See if value changed. Value is changed - * if it's not the same of old or if - * the nob has not yet been added to the - * level of details collection. - * Even if a forced update only delta - * needs to send. */ - NetworkConnection.LevelOfDetailData cachedLod; - if (currentLods.TryGetValue(nob, out cachedLod)) - { - changed = (cachedLod.CurrentLevelOfDetail != lod); - } - else - { - cachedLod = ObjectCaches.Retrieve(); - currentLods[nob] = cachedLod; - changed = true; - } - - //If changed then set new value and write. - if (changed) - { - cachedLod.Update(lod); - tmpWriter.WriteNetworkObjectId(nob.ObjectId); - tmpWriter.WriteByte(lod); - written++; - } - } - - IncreaseObjectIndex(); - - void IncreaseObjectIndex() - { - nobIndex++; - if (nobIndex >= spawnedCount) - nobIndex = 0; - } - } - } - - //Set next lod index to current nob index. - _nextLodNobIndex = nobIndex; - } - /* Send using the reliable channel since - * we are using deltas. This is also why - * updates are sent larger chunked twice a second rather - * than smaller chunks regularly. */ - PooledWriter writer = WriterPool.Retrieve(1000); - writer.WritePacketId(PacketId.NetworkLODUpdate); - writer.WriteInt32(written); - writer.WriteArraySegment(tmpWriter.GetArraySegment()); - NetworkManager.TransportManager.SendToServer((byte)Channel.Reliable, writer.GetArraySegment(), true); - - //Dispose writers. - writer.StoreLength(); - tmpWriter.StoreLength(); - //PROEND - } - - - } - - -} diff --git a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.LOD.cs b/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.LOD.cs deleted file mode 100644 index 73752b8..0000000 --- a/Assets/Packages/FishNet/Runtime/Managing/Server/ServerManager.LOD.cs +++ /dev/null @@ -1,186 +0,0 @@ -using FishNet.Connection; -using FishNet.Managing.Logging; -using FishNet.Object; -using FishNet.Serializing; -using GameKit.Dependencies.Utilities; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using UnityEngine; - -namespace FishNet.Managing.Server -{ - public sealed partial class ServerManager : MonoBehaviour - { - #region Private. - /// - /// Cached expected level of detail value. - /// - private uint _cachedLevelOfDetailInterval; - /// - /// Cached value of UseLod. - /// - private bool _cachedUseLod; - #endregion - - /// - /// Parses a received network LOD update. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void ParseNetworkLODUpdate(PooledReader reader, NetworkConnection conn) - { - //PROSTART - if (!conn.IsAuthenticated) - return; - if (!_cachedUseLod) - { - conn.Kick(reader, KickReason.ExploitAttempt, LoggingType.Common, $"Connection [{conn.ClientId}] sent a level of detail update when the feature is not enabled."); - return; - } - - /* If local client then read out entries but do nothing. - * Local client doesn't technically have to send LOD because - * it's set on the client side but this code is kept in - * to simulate actual bandwidth. */ - if (conn.IsLocalClient) - { - int w = reader.ReadInt32(); - for (int i = 0; i < w; i++) - ReadLod(out _, out _); - return; - } - - uint packetTick = conn.PacketTick.LastRemoteTick; - //Check if conn can send LOD. - uint lastLod = conn.LastLevelOfDetailUpdate; - //If previously set see if client is potentially exploiting. - if (lastLod != 0) - { - if ((packetTick - lastLod) < _cachedLevelOfDetailInterval) - { - conn.Kick(reader, KickReason.ExploitAttempt, LoggingType.Common, $"Connection [{conn.ClientId}] sent excessive level of detail updates."); - return; - } - } - //Set last recv lod. - conn.LastLevelOfDetailUpdate = packetTick; - - //Get server objects to save calls. - Dictionary serverObjects = Objects.Spawned; - //Get level of details for this connection and reset them. - Dictionary currentLods = conn.LevelOfDetails; - - int written = reader.ReadInt32(); - //Only process if some are written. - if (written > 0) - { - //Maximum infractions before a kick. - const int maximumInfractions = 15; - int currentInfractions = conn.LevelOfDetailInfractions; - int infractionsCounted = 0; - - /* If the connection has no objects then LOD isn't capable - * of being calculated. It's possible the players object was destroyed after - * the LOD sent but we don't know for sure without adding extra checks. - * Rather than add recently destroyed player object checks if there are - * no player objects then just add an infraction. The odds of this happening regularly - * are pretty slim. */ - if (conn.Objects.Count == 0) - { - if (AddInfraction(3)) - { - conn.Kick(reader, KickReason.UnusualActivity, LoggingType.Common, $"Connection [{conn.ClientId}] has sent an excessive number of level of detail updates without having any player objects spawned."); - return; - } - } - - /* If written is more than spawned + recently despawned then - * the client is likely trying to exploit. */ - if (written > (Objects.Spawned.Count + Objects.RecentlyDespawnedIds.Count)) - { - conn.Kick(reader, KickReason.UnusualActivity, LoggingType.Common, $"Connection [{conn.ClientId}] sent a level of detail update for {written} items which exceeds spawned and recently despawned count."); - return; - } - - - List lodDistances = NetworkManager.ObserverManager.GetLevelOfDetailDistances(); - int lodDistancesCount = lodDistances.Count; - for (int i = 0; i < written; i++) - { - int objectId; - byte lod; - ReadLod(out objectId, out lod); - - //Lod is not possible. - if (lod >= lodDistancesCount) - { - conn.Kick(reader, KickReason.ExploitAttempt, LoggingType.Common, $"Connection [{conn.ClientId}] provided a level of detail index which is out of bounds."); - return; - } - - //Found in spawned, update lod. - if (serverObjects.TryGetValue(objectId, out NetworkObject nob)) - { - NetworkConnection.LevelOfDetailData cachedLod; - //Value is unchanged. - if (currentLods.TryGetValue(nob, out cachedLod)) - { - bool oldMatches = (cachedLod.CurrentLevelOfDetail == lod); - if (oldMatches && AddInfraction()) - { - conn.Kick(reader, KickReason.UnusualActivity, LoggingType.Common, $"Connection [{conn.ClientId}] has excessively sent unchanged LOD information."); - return; - } - } - else - { - cachedLod = ObjectCaches.Retrieve(); - currentLods[nob] = cachedLod; - } - - cachedLod.PreviousLevelOfDetail = cachedLod.CurrentLevelOfDetail; - cachedLod.CurrentLevelOfDetail = lod; - } - //Not found in spawn; validate that client isn't trying to exploit. - else - { - //Too many infractions. - if (AddInfraction()) - { - conn.Kick(reader, KickReason.UnusualActivity, LoggingType.Common, $"Connection [{conn.ClientId}] has accumulated excessive level of detail infractions."); - return; - } - } - } - - //Adds an infraction returning if maximum infractions have been exceeded. - bool AddInfraction(int count = 1) - { - /* Only increase infractions at most 3 per iteration. - * This is to prevent a kick if the client perhaps had - * a massive lag spike. */ - if (infractionsCounted < 3) - infractionsCounted += count; - - bool overLimit = ((currentInfractions + infractionsCounted) >= maximumInfractions); - return overLimit; - } - } - - //Reads a LOD. - void ReadLod(out int lObjectId, out byte lLod) - { - lObjectId = reader.ReadNetworkObjectId(); - lLod = reader.ReadByte(); - } - - //Remove an infraction. This will steadily remove infractions over time. - if (conn.LevelOfDetailInfractions > 0) - conn.LevelOfDetailInfractions--; - //PROEND - } - - - } - - -} diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/PredictonRigidbody.cs b/Assets/Packages/FishNet/Runtime/Object/Prediction/PredictonRigidbody.cs deleted file mode 100644 index 1e8463d..0000000 --- a/Assets/Packages/FishNet/Runtime/Object/Prediction/PredictonRigidbody.cs +++ /dev/null @@ -1,202 +0,0 @@ -using FishNet.CodeGenerating; -using FishNet.Serializing; -using GameKit.Dependencies.Utilities; -using System.Collections.Generic; -using UnityEngine; - -namespace FishNet.Object.Prediction -{ -#if PREDICTION_V2 - - public static class PredictionRigidbodySerializers - { - //public static void WritePredictionRigidbody(this Writer w, PredictionRigidbody pr) - //{ - // Debug.Log("Writing "); - // w.WriteList(pr.PendingForces); - //} - - //public static PredictionRigidbody ReadPredictionRigidbody(this Reader r) - //{ - // List lst = CollectionCaches.RetrieveList(); - // r.ReadList(ref lst); - // PredictionRigidbody pr = ResettableObjectCaches.Retrieve(); - // pr.PendingForces = lst; - // Debug.Log($"{lst == null}, {pr.PendingForces == null}"); - // return pr; - //} - } - - public class PredictionRigidbody : IResettable - { - #region Types. - internal struct ForceData - { - public Vector3 Force; - public ForceMode Mode; - public bool IsVelocity; - - public ForceData(ForceData fd) - { - Force = fd.Force; - Mode = fd.Mode; - IsVelocity = fd.IsVelocity; - } - public ForceData(Vector3 force, ForceMode mode, bool velocity) - { - Force = force; - Mode = mode; - IsVelocity = velocity; - } - } - #endregion - - #region Public. - /// - /// Rigidbody which force is applied. - /// - public Rigidbody Rigidbody { get; private set; } - #endregion - - #region Internal. - /// - /// Forces waiting to be applied. - /// - [ExcludeSerialization] - internal List PendingForces; - #endregion - - ~PredictionRigidbody() - { - if (PendingForces != null) - CollectionCaches.StoreAndDefault(ref PendingForces); - Rigidbody = null; - } - - /// - /// Rigidbody which force is applied. - /// - /// - public void Initialize(Rigidbody rb) - { - Debug.LogError($"This utility is a work in progress. Please do not use it at this time."); - Rigidbody = rb; - if (PendingForces == null) - PendingForces = CollectionCaches.RetrieveList(); - else - PendingForces.Clear(); - } - - /// - /// Adds Velocity force to the Rigidbody. - /// - public void AddForce(Vector3 force, ForceMode mode = ForceMode.Force) - { - PendingForces.Add(new ForceData(force, mode, true)); - } - - public void AddAngularForce(Vector3 force, ForceMode mode = ForceMode.Force) - { - PendingForces.Add(new ForceData(force, mode, false)); - } - - /// - /// Sets velocity while clearing pending forces. - /// Simulate should still be called normally. - /// - public void Velocity(Vector3 force) - { - Rigidbody.velocity = force; - RemoveForces(true); - } - - /// - /// Sets angularVelocity while clearning pending forces. - /// Simulate should still be called normally. - /// - public void AngularVelocity(Vector3 force) - { - Rigidbody.angularVelocity = force; - RemoveForces(false); - } - - /// - /// Applies pending forces to rigidbody in the order they were added. - /// - public void Simulate() - { - foreach (ForceData item in PendingForces) - { - if (item.IsVelocity) - Rigidbody.AddForce(item.Force, item.Mode); - else - Rigidbody.AddTorque(item.Force, item.Mode); - } - PendingForces.Clear(); - } - - /// - /// Manually clears pending forces. - /// - /// True to clear velocities, false to clear angular velocities. - public void ClearPendingForces(bool velocity) - { - RemoveForces(velocity); - } - /// - /// Clears pending velocity and angular velocity forces. - /// - public void ClearPendingForces() - { - PendingForces.Clear(); - } - - /// - /// Reconciles to a state. - /// - public void Reconcile(PredictionRigidbody pr) - { - PendingForces.Clear(); - foreach (ForceData item in pr.PendingForces) - PendingForces.Add(new ForceData(item)); - - ResettableObjectCaches.Store(pr); - } - - /// - /// Removes forces from pendingForces. - /// - /// True to remove if velocity. - private void RemoveForces(bool velocity) - { - if (PendingForces.Count > 0) - { - List newDatas = CollectionCaches.RetrieveList(); - foreach (ForceData item in PendingForces) - { - if (item.IsVelocity != velocity) - newDatas.Add(item); - } - //Add back to _pendingForces if changed. - if (newDatas.Count != PendingForces.Count) - { - PendingForces.Clear(); - foreach (ForceData item in newDatas) - PendingForces.Add(item); - } - CollectionCaches.Store(newDatas); - } - } - - public void ResetState() - { - CollectionCaches.StoreAndDefault(ref PendingForces); - Rigidbody = null; - } - - public void InitializeState() { } - } -#endif - -} - diff --git a/Assets/Packages/FishNet/Runtime/Object/Prediction/TransformTickSmoother.cs b/Assets/Packages/FishNet/Runtime/Object/Prediction/TransformTickSmoother.cs deleted file mode 100644 index 930a2fd..0000000 --- a/Assets/Packages/FishNet/Runtime/Object/Prediction/TransformTickSmoother.cs +++ /dev/null @@ -1,132 +0,0 @@ -using FishNet.Utility.Extension; -using System.Runtime.CompilerServices; -using UnityEngine; - -namespace FishNet.Object.Prediction -{ - internal class TransformTickSmoother - { - #region Private. - /// - /// Object to smooth. - /// - private Transform _transform; - /// - /// When not 0f the graphical object will teleport into it's next position if the move distance exceeds this value. - /// - private float _teleportThreshold; - /// - /// How quickly to move towards goal values. - /// - private MoveRates _moveRates; - /// - /// World values of the graphical during PreTick. - /// - private TransformProperties _preTickValues; - /// - /// World values of the graphical after PostTick. - /// - private TransformProperties? _postTickValues; - /// - /// Duration to move over. - /// - private float _tickDelta; - /// - /// True if a pretick occurred since last postTick. - /// - private bool _preTicked; - #endregion - - /// - /// Initializes this smoother; should only be completed once. - /// - internal void InitializeOnce(Transform t, float teleportDistance, float tickDelta) - { - //If current graphicalObject is set then snap it to postTick values. - if (_transform != null && _postTickValues.HasValue) - _transform.SetWorldProperties(_postTickValues.Value); - - _tickDelta = tickDelta; - _postTickValues = t.GetWorldProperties(); - _transform = t; - _teleportThreshold = teleportDistance; - } - - /// - /// Called every frame. - /// - internal void Update() - { - if (!CanSmooth()) - return; - - if (_postTickValues.HasValue) - MoveToTarget(_postTickValues.Value); - } - - - /// - /// Called when the TimeManager invokes OnPreTick. - /// - internal void OnPreTick() - { - if (!CanSmooth()) - return; - - _preTicked = true; - _preTickValues = _transform.GetWorldProperties(); - } - - /// - /// Called when TimeManager invokes OnPostTick. - /// - internal void OnPostTick() - { - if (!CanSmooth()) - return; - - //If preticked then previous transform values are known. - if (_preTicked) - { - SetMoveRates(_preTickValues, _transform); - _postTickValues = _transform.GetWorldProperties(); - _transform.SetWorldProperties(_preTickValues); - } - _preTicked = false; - } - - /// - /// Returns if prediction can be used on this rigidbody. - /// - /// - private bool CanSmooth() - { - if (_transform == null) - return false; - - return true; - } - - /// - /// Moves transform to target values. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void MoveToTarget(TransformProperties tp) - { - _moveRates.MoveLocalToTarget(_transform, tp, Time.deltaTime); - } - - /// - /// Sets Position and Rotation move rates to reach Target datas. - /// - private void SetMoveRates(TransformProperties prevValues, Transform t) - { - float duration = _tickDelta; - float teleportT = _teleportThreshold; - _moveRates = MoveRates.GetWorldMoveRates(prevValues, t, duration, teleportT); - } - - } - - -} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Object/ReplicateState.cs b/Assets/Packages/FishNet/Runtime/Object/ReplicateState.cs deleted file mode 100644 index f79a3cc..0000000 --- a/Assets/Packages/FishNet/Runtime/Object/ReplicateState.cs +++ /dev/null @@ -1,60 +0,0 @@ -using FishNet.Utility; -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo(UtilityConstants.CODEGEN_ASSEMBLY_NAME)] -namespace FishNet.Object -{ - - public enum ReplicateState : byte - { - /// - /// The default value of this state. - /// This value should never occur when a replicate runs. - /// - Invalid = 0, - /// - /// Data had been received for the current tick. - /// This occurs when a replicate is called on owner, or when receiving forwarded inputs. - /// - CurrentCreated = 1, - /// - /// Data was not received for the current tick. - /// Either no data was available to forward or their may be latency concerns resulting in late packets. - /// - CurrentPredicted = 2, - /// - /// Data was not received for the replayed tick. - /// This occurs when a replicate would be replaying past datas, triggered by a reconcile, but there is no user created data for the tick. - /// - ReplayedPredicted = 3, - /// - /// Data was received for the replayed tick. - /// This occurs when a replicate would be replaying past datas, triggered by a reconcile, and there is user created data for the tick. - /// - ReplayedCreated = 4, - /// - /// Client has not run the tick locally yet. This can be used to exit replicate early to not process actions, or create actions based on previous datas. - /// - Future = 5, - } - - public static class ReplicateStateExtensions - { - /// - /// Returns if value is valid. - /// - public static bool IsValid(this ReplicateState value) => (value != ReplicateState.Invalid); - /// - /// Returns if value is replayed. - /// - public static bool IsReplayed(this ReplicateState value) => (value == ReplicateState.ReplayedPredicted || value == ReplicateState.ReplayedCreated || value == ReplicateState.Future); - /// - /// Returns if value is user created. - /// - public static bool IsCreated(this ReplicateState value) => (value == ReplicateState.CurrentCreated || value == ReplicateState.ReplayedCreated); - /// - /// Returns if value is predicted. - /// - public static bool IsPredicted(this ReplicateState value) => (value == ReplicateState.Future || value == ReplicateState.CurrentPredicted || value == ReplicateState.ReplayedPredicted); - } -} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollback.cs b/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollback.cs deleted file mode 100644 index 398ab94..0000000 --- a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/ColliderRollback.cs +++ /dev/null @@ -1,450 +0,0 @@ -using FishNet.Managing; -using FishNet.Object; -using UnityEngine; - -namespace FishNet.Component.ColliderRollback -{ - - public class ColliderRollback : NetworkBehaviour - { - #region Types. - internal enum BoundingBoxType - { - /// - /// Disable this feature. - /// - Disabled, - /// - /// Manually specify the dimensions of a bounding box. - /// - Manual, - } - //PROSTART - internal enum FrameRollbackTypes - { - LerpFirst, - LerpMiddle, - Exact - } - /// - /// Used to store where colliders are during the snapshot. - /// - private struct ColliderSnapshot - { - public ColliderSnapshot(Transform t) - { - WorldPosition = t.position; - WorldRotation = t.rotation; - } - - /// - /// WorldPosition of transform during snapshot. - /// - public Vector3 WorldPosition; - /// - /// WorldRotation of transform during snapshot. - /// - public Quaternion WorldRotation; - - public void UpdateValues(Transform t) - { - WorldPosition = t.position; - WorldRotation = t.rotation; - } - } - - /// - /// Used to store where colliders start before rollbacks. - /// - internal class RollingCollider - { - public RollingCollider(Transform t, ColliderRollback colliderRollback) - { - Transform = t; - LocalPosition = t.localPosition; - LocalRotation = t.localRotation; - } - - /// - /// Received when ReturnForward is called on ColliderRollback. - /// - public void Return() - { - Transform.localPosition = LocalPosition; - Transform.localRotation = LocalRotation; - } - - /// - /// Received when Rollback is called on ColliderRollback. - /// - public void Rollback(FrameRollbackTypes rollbackType, int endFrame, float percent) - { - //Exact frame. - if (rollbackType == FrameRollbackTypes.Exact) - { - int index = GetSnapshotIndex(endFrame); - Transform.position = _snapshots[index].WorldPosition; - Transform.rotation = _snapshots[index].WorldRotation; - } - //Start frame. - else if (rollbackType == FrameRollbackTypes.LerpFirst) - { - //Lerp between actual position and the most recent snapshot. - int firstFrame = GetSnapshotIndex(0); - Transform.position = Vector3.Lerp(Transform.position, _snapshots[firstFrame].WorldPosition, percent); - Transform.rotation = Quaternion.Lerp(Transform.rotation, _snapshots[firstFrame].WorldRotation, percent); - } - //Middle frame. - else if (rollbackType == FrameRollbackTypes.LerpMiddle) - { - //Lerp between end frame and the one before it. - int firstFrame = GetSnapshotIndex(endFrame - 1); - int secondFrame = GetSnapshotIndex(endFrame); - - Transform.position = Vector3.Lerp(_snapshots[firstFrame].WorldPosition, _snapshots[secondFrame].WorldPosition, percent); - Transform.rotation = Quaternion.Lerp(_snapshots[firstFrame].WorldRotation, _snapshots[secondFrame].WorldRotation, percent); - } - } - - #region Public. - /// - /// Transform collider is for. - /// - public readonly Transform Transform; - /// - /// LocalPosition of transform at start. - /// - public readonly Vector3 LocalPosition; - /// - /// LocalRotation of transform at start. - /// - public readonly Quaternion LocalRotation; - #endregion - - #region Private. - /// - /// Current snapshots for this collider. - /// - private ColliderSnapshot[] _snapshots; - /// - /// Index to write a snapshot in. - /// - private int _writeIndex = 0; - /// - /// True if snapshots are being recycled rather than written for the first time. - /// - private bool _recycleSnapshots = false; - #endregion - - /// - /// Fills snapshots with current value. - /// - public void ResetSnapshots(int count) - { - if (count <= 0) - { - Debug.LogError("Cannot reset snapshots with count less than 1."); - return; - } - - _snapshots = new ColliderSnapshot[count]; - //Reset data as if new. - _writeIndex = 0; - _recycleSnapshots = false; - } - - /// - /// Adds a snapshot for this collider. - /// - public void AddSnapshot() - { - //Not yet recycling, make a new snapshot. - if (!_recycleSnapshots) - _snapshots[_writeIndex] = new ColliderSnapshot(Transform); - //Snapshot array traversed already, start recycling. - else - _snapshots[_writeIndex].UpdateValues(Transform); - - _writeIndex++; - if (_writeIndex >= _snapshots.Length) - { - _writeIndex = 0; - _recycleSnapshots = true; - } - } - - /// - /// Gets a snapshot on the specified index. - /// - /// - private int GetSnapshotIndex(int historyCount) - { - /* Since write index is increased after a write - * we must reduce it by 1 to get to the last - * write index, before removing history count. */ - int index = (_writeIndex - 1) - historyCount; - //If negative value start taking from the back. - if (index < 0) - { - /* Cannot take from back, snapshots aren't filled yet. - * Instead take the oldest snapshot, which in this case - * would be index 0. */ - if (!_recycleSnapshots) - return 0; - //Snapshots filled, take from back. - else - return (_snapshots.Length + index); - } - //Not a negative value, return as is. - else - { - return index; - } - } - } - //PROEND - #endregion - - #region Serialized. - /// - /// How to configure the bounding box check. - /// - [Tooltip("How to configure the bounding box check.")] - [SerializeField] - private BoundingBoxType _boundingBox = BoundingBoxType.Disabled; - /// - /// Physics type to generate a bounding box for. - /// - [Tooltip("Physics type to generate a bounding box for.")] - [SerializeField] - private RollbackPhysicsType _physicsType = RollbackPhysicsType.Physics; - /// - /// Size for the bounding box. This is only used when BoundingBox is set to Manual. - /// - [Tooltip("Size for the bounding box.. This is only used when BoundingBox is set to Manual.")] - [SerializeField] - private Vector3 _boundingBoxSize = new Vector3(3f, 3f, 3f); - /// - /// Objects holding colliders which can rollback. - /// - [Tooltip("Objects holding colliders which can rollback.")] - [SerializeField] - private GameObject[] _colliderParents = new GameObject[0]; - #endregion - - //PROSTART - #region Private. - /// - /// Rollback data about ColliderParents. - /// - private RollingCollider[] _rollingColliders = new RollingCollider[0]; - /// - /// True if rolled back. - /// - private bool _rolledBack = false; - /// - /// Maximum snapshots allowed. Generated at runtime using snapshot interval and max rollback time. - /// - private int _maxSnapshots = 0; - /// - /// True if initialized. - /// - private bool _initialized = false; - /// - /// Becomes true once bounding box is made. - /// - private bool _boundingBoxCreated; - #endregion - - public override void OnStartServer() - { - base.OnStartServer(); - CreateBoundingBox(); - ChangeEventSubscriptions(true); - Initialize(); - } - - public override void OnStopServer() - { - base.OnStopServer(); - ChangeEventSubscriptions(false); - } - - /// - /// Creates a bounding box collider around this object. - /// - private void CreateBoundingBox() - { - if (_boundingBoxCreated) - return; - //If here then mark created as true. - _boundingBoxCreated = true; - - if (_boundingBox == BoundingBoxType.Disabled) - return; - - int? layer = base.RollbackManager.BoundingBoxLayerNumber; - if (layer == null) - return; - - //Make go to add bounds to. - GameObject go = new GameObject("Rollback Bounding Box"); - go.transform.SetParent(transform); - go.transform.SetPositionAndRotation(transform.position, transform.rotation); - - if (_boundingBox == BoundingBoxType.Manual) - { - go.layer = layer.Value; - /* Flags check isn't working, not sure why yet. Maybe because enum is part - * of a different class? */ - if (_physicsType == RollbackPhysicsType.Physics) - go.AddComponent(); - else if (_physicsType == RollbackPhysicsType.Physics2D) - go.AddComponent(); - go.transform.localScale = _boundingBoxSize; - } - } - - /// - /// Subscribes or unsubscribes to events needed for rolling back. - /// - /// - private void ChangeEventSubscriptions(bool subscribe) - { - RollbackManager rm = base.RollbackManager; - if (rm == null) - return; - - if (subscribe) - rm.RegisterColliderRollback(this); - else - rm.UnregisterColliderRollback(this); - } - - /// - /// Called when a snapshot should be created. - /// - internal void CreateSnapshot() - { - //Can't generate a snapshot while rolled back. - if (_rolledBack) - return; - - for (int i = 0; i < _rollingColliders.Length; i++) - { - if (_rollingColliders[i] == null) - continue; - _rollingColliders[i].AddSnapshot(); - } - } - - - /// - /// Called when a rollback should occur. - /// - /// - internal void Rollback(float time) - { - //Already rolled back. - if (_rolledBack) - { - base.NetworkManager.LogWarning("Colliders are already rolled back. Returning colliders forward first."); - Return(); - } - - FrameRollbackTypes rollbackType; - int endFrame; - float percent; - - float decimalFrame = (time / (float)base.TimeManager.TickDelta); - //Out of frames. - if (decimalFrame >= (_maxSnapshots - 1)) - { - rollbackType = FrameRollbackTypes.LerpMiddle; - endFrame = (_maxSnapshots - 1); - percent = 1f; - } - //Within frames. - else - { - percent = (decimalFrame % 1); - - /* Rolling back at least 2 frames. - * If only rolling back one frame decimalFrame - * would be less than 1, since index of 0 would be - * the first frame. */ - if (decimalFrame > 1f) - { - rollbackType = FrameRollbackTypes.LerpMiddle; - endFrame = Mathf.CeilToInt(decimalFrame); - } - //Not rolling back more than 1 frame. - else - { - endFrame = 0; - rollbackType = FrameRollbackTypes.LerpFirst; - } - } - - int count = _rollingColliders.Length; - for (int i = 0; i < count; i++) - _rollingColliders[i].Rollback(rollbackType, endFrame, percent); - - _rolledBack = true; - } - - /// - /// Called when a specific collider should return. - /// - internal void Return() - { - if (!_rolledBack) - return; - - int count = _rollingColliders.Length; - for (int i = 0; i < count; i++) - _rollingColliders[i].Return(); - - _rolledBack = false; - } - - /// - /// Creates rolling collider values. - /// - private void Initialize() - { - //Not going to make an event for this since it only occurs OnEnable. - for (int i = 0; i < _rollingColliders.Length; i++) - _rollingColliders[i].ResetSnapshots(_maxSnapshots); - - if (_initialized) - return; - - _maxSnapshots = Mathf.CeilToInt(base.RollbackManager.MaximumRollbackTime / (float)base.TimeManager.TickDelta); - if (_maxSnapshots < 2) - _maxSnapshots = 2; - _rollingColliders = new RollingCollider[_colliderParents.Length]; - - /* Generate a rolling collider for each - * collider parent. */ - for (int i = 0; i < _colliderParents.Length; i++) - { - if (_colliderParents[i].gameObject == null) - continue; - - /* Creates a new rolling collider and fills the snapshots with it's current - * position. If you were to roll back before all snapshots could fill - * with new data an incorrect rollback position/rotation would be returned - * but the chances of this happening are slim to none, and impossible after - * the MAX_ROLLBACK_TIME duration has passed. */ - _rollingColliders[i] = new RollingCollider(_colliderParents[i].transform, this); - _rollingColliders[i].ResetSnapshots(_maxSnapshots); - } - - _initialized = true; - } - - //PROEND - } - -} diff --git a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackManager.cs b/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackManager.cs deleted file mode 100644 index 2133610..0000000 --- a/Assets/Packages/FishNet/Runtime/Plugins/ColliderRollback/Scripts/RollbackManager.cs +++ /dev/null @@ -1,433 +0,0 @@ -using FishNet.Connection; -using FishNet.Managing; -using FishNet.Managing.Scened; -using FishNet.Managing.Timing; -using FishNet.Transporting; -using GameKit.Dependencies.Utilities; -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using UnityEngine; -using UnityEngine.SceneManagement; - -namespace FishNet.Component.ColliderRollback -{ - public class RollbackManager : MonoBehaviour - { - #region Internal. - /// - /// Cached value for bounding box layermask. - /// - internal int? BoundingBoxLayerNumber - { - get - { - if (_boundingBoxLayerNumber == null) - { - for (int i = 0; i < 32; i++) - { - if ((1 << i) == BoundingBoxLayer.value) - { - _boundingBoxLayerNumber = i; - break; - } - } - } - - return _boundingBoxLayerNumber; - } - } - private int? _boundingBoxLayerNumber; - #endregion - - #region Serialized. - /// - /// - /// - [Tooltip("Layer to use when creating and checking against bounding boxes. This should be different from any layer used.")] - [SerializeField] - private LayerMask _boundingBoxLayer = 0; - /// - /// Layer to use when creating and checking against bounding boxes. This should be different from any layer used. - /// - internal LayerMask BoundingBoxLayer => _boundingBoxLayer; - /// - /// - /// - [Tooltip("Maximum time in the past colliders can be rolled back to.")] - [SerializeField] - private float _maximumRollbackTime = 1.25f; - /// - /// Maximum time in the past colliders can be rolled back to. - /// - internal float MaximumRollbackTime => _maximumRollbackTime; - /// - /// - /// - [Tooltip("Interpolation value for the NetworkTransforms or objects being rolled back.")] - [Range(0, 250)] - [SerializeField] - internal ushort Interpolation = 2; - #endregion - - //PROSTART - #region Private Pro. - /// - /// Physics used when rolling back. - /// - private RollbackPhysicsType _rollbackPhysics; - /// - /// NetworkManager on the same object as this script. - /// - private NetworkManager _networkManager; - /// - /// All active ColliderRollback scripts. - /// - private List _allRollbacks = new List(); - /// - /// Cache for raycast non-alloc hits. - /// - RaycastHit[] _hitsCache = new RaycastHit[50]; - /// - /// Cache for raycast2d non-alloc hits. - /// - RaycastHit2D[] _hitsCache2d = new RaycastHit2D[50]; - #endregion - //PROEND - - //PROSTART - private void TimeManager_OnPostTick() - { - CreateSnapshots(); - } - //PROEND - - /// - /// Initializes this script for use. - /// - /// - internal void InitializeOnce_Internal(NetworkManager manager) - { - //PROSTART - _networkManager = manager; - _networkManager.ServerManager.OnServerConnectionState += ServerManager_OnServerConnectionState; - //PROEND - } - - //PROSTART - private bool IsBoundingBoxLayerSet(bool warn) - { - bool set = (BoundingBoxLayerNumber != null); - if (!set && warn) - _networkManager?.LogWarning($"RollbackManager BoundingBoxLayer is unset or mixed. Bounding box rollbacks will not function. This value must be changed outside of play mode."); - - return set; - } - //PROEND - - - //PROSTART - /// - /// Called when server connection state changes. - /// - private void ServerManager_OnServerConnectionState(ServerConnectionStateArgs obj) - { - //Listen just before ticks. - if (obj.ConnectionState == LocalConnectionState.Started) - { - //If the server invoking this event is the only one started subscribe. - if (_networkManager.ServerManager.OneServerStarted()) - _networkManager.TimeManager.OnPostTick += TimeManager_OnPostTick; - } - else - { - //If no servers are started then unsubscribe. - if (!_networkManager.ServerManager.AnyServerStarted()) - _networkManager.TimeManager.OnPostTick -= TimeManager_OnPostTick; - } - } - - /// - /// Registers a ColliderRollback. - /// - /// - internal void RegisterColliderRollback(ColliderRollback cr) - { - _allRollbacks.Add(cr); - } - - /// - /// Unregisters a ColliderRollback. - /// - /// If not 0 then ColliderRollback will be removed from scene rollbacks using the sceneHandle. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal void UnregisterColliderRollback(ColliderRollback cr) - { - _allRollbacks.Remove(cr); - } - - /// - /// Creates snapshots for colliders. - /// - private void CreateSnapshots() - { - List lst = _allRollbacks; - int count = lst.Count; - for (int i = 0; i < count; i++) - lst[i].CreateSnapshot(); - } - //PROEND - - /// - /// Rolls back all colliders. - /// - /// Precise tick received from the client. - /// Type of physics to rollback; this is often what your casts will use. - /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. - public void Rollback(PreciseTick pt, RollbackPhysicsType physicsType, bool asOwner = false) - { - //PROSTART - Rollback(0, pt, physicsType, asOwner); - //PROEND - } - - - /// - /// Rolls back all colliders. - /// - /// Precise tick received from the client. - /// Type of physics to rollback; this is often what your casts will use. - /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Rollback(Scene scene, PreciseTick pt, RollbackPhysicsType physicsType, bool asOwner = false) - { - //PROSTART - Rollback(scene.handle, pt, physicsType, asOwner); - //PROEND - } - /// - /// Rolls back all colliders. - /// - /// Precise tick received from the client. - /// Type of physics to rollback; this is often what your casts will use. - /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. - public void Rollback(int sceneHandle, PreciseTick pt, RollbackPhysicsType physicsType, bool asOwner = false) - { - //PROSTART - float time = GetRollbackTime(pt, asOwner); - List lst = _allRollbacks; - - //If a handle is specified perform a different loop. - if (sceneHandle != 0) - { - foreach (ColliderRollback item in lst) - { - if (item.gameObject.scene.handle != sceneHandle) - continue; - item.Rollback(time); - } - } - else - { - foreach (ColliderRollback item in lst) - item.Rollback(time); - } - - _rollbackPhysics = physicsType; - SyncTransforms(physicsType); - //PROEND - } - - - /// - /// Rolls back all 3d colliders hit by a test cast against bounding boxes. - /// - /// Ray origin. - /// Direction to cast. - /// Distance of cast. - /// Precise tick received from the client. - /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. - public void Rollback(Vector3 origin, Vector3 normalizedDirection, float distance, PreciseTick pt, bool asOwner = false) - { - //PROSTART - Rollback(0, origin, normalizedDirection, distance, pt, asOwner); - //PROEND - } - - /// - /// Rolls back all 3d colliders hit by a test cast against bounding boxes. - /// - /// Ray origin. - /// Direction to cast. - /// Distance of cast. - /// Precise tick received from the client. - /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Rollback(Scene scene, Vector3 origin, Vector3 normalizedDirection, float distance, PreciseTick pt, bool asOwner = false) - { - //PROSTART - Rollback(scene.handle, origin, normalizedDirection, distance, pt, asOwner); - //PROEND - } - /// - /// Rolls back all 3d colliders hit by a test cast against bounding boxes. - /// - /// Ray origin. - /// Direction to cast. - /// Distance of cast. - /// Precise tick received from the client. - /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. - public void Rollback(int sceneHandle, Vector3 origin, Vector3 normalizedDirection, float distance, PreciseTick pt, bool asOwner = false) - { - //PROSTART - if (!IsBoundingBoxLayerSet(true)) - return; - - float time = GetRollbackTime(pt, asOwner); - - int hitCount = Physics.RaycastNonAlloc(origin, normalizedDirection, _hitsCache, distance, _boundingBoxLayer); - - //If a handle is specified perform a different loop. - if (sceneHandle != 0) - { - for (int i = 0; i < hitCount; i++) - { - if (_hitsCache[i].transform.gameObject.scene.handle != sceneHandle) - continue; - if (_hitsCache[i].transform.TryGetComponent(out ColliderRollback cr)) - cr.Rollback(time); - } - - } - else - { - for (int i = 0; i < hitCount; i++) - { - if (_hitsCache[i].transform.TryGetComponent(out ColliderRollback cr)) - cr.Rollback(time); - } - } - - //If maxed hits resize cache. - if (hitCount == _hitsCache.Length) - Array.Resize(ref _hitsCache, hitCount * 3); - - RollbackPhysicsType physicsType = RollbackPhysicsType.Physics; - _rollbackPhysics |= physicsType; - SyncTransforms(physicsType); - //PROEND - } - - /// - /// Rolls back all 3d colliders hit by a test cast against bounding boxes. - /// - /// Ray origin. - /// Direction to cast. - /// Distance of cast. - /// Precise tick received from the client. - /// True if IsOwner of the object the raycast is for. This can be ignored and only provides more accurate results for clientHost. - public void Rollback(Vector2 origin, Vector2 normalizedDirection, float distance, PreciseTick pt, bool asOwner = false) - { - //PROSTART - if (!IsBoundingBoxLayerSet(true)) - return; - - float time = GetRollbackTime(pt, asOwner); - int hitCount = Physics2D.RaycastNonAlloc(origin, normalizedDirection, _hitsCache2d, distance, BoundingBoxLayer); - for (int i = 0; i < hitCount; i++) - { - if (_hitsCache2d[i].transform.TryGetComponent(out ColliderRollback cr)) - cr.Rollback(time); - } - - //If maxed hits resize cache. - if (hitCount == _hitsCache2d.Length) - Array.Resize(ref _hitsCache2d, hitCount * 3); - - RollbackPhysicsType physicsType = RollbackPhysicsType.Physics2D; - _rollbackPhysics |= physicsType; - SyncTransforms(physicsType); - //PROEND - } - - /// - /// Returns all ColliderRollback objects back to their original position. - /// - public void Return() - { - //PROSTART - List lst = _allRollbacks; - int count = lst.Count; - for (int i = 0; i < count; i++) - lst[i].Return(); - - SyncTransforms(_rollbackPhysics); - //PROEND - } - - //PROSTART - /// - /// Calculates rollback time based on a precise tick. - /// - /// Precise tick received from the client. - /// True if IsOwner of the object. This can be ignored and only provides more accurate results for clientHost. - private float GetRollbackTime(PreciseTick pt, bool asOwner = false) - { - if (_networkManager == null) - return 0.0f; - - TimeManager timeManager = _networkManager.TimeManager; - //How much time to rollback. - float time = 0f; - float tickDelta = (float)timeManager.TickDelta; - //Rolling back not as host. - if (!asOwner) - { - ulong pastTicks = (timeManager.Tick - pt.Tick) + Interpolation; - if (pastTicks >= 0) - { - //They should never get this high, ever. This is to prevent overflows. - if (pastTicks > ushort.MaxValue) - pastTicks = ushort.MaxValue; - - //Add past ticks time. - time = (pastTicks * tickDelta); - - /* It's possible the client could modify the framework - * code to pass in a byte greater than 100, which would result - * in a percentage outside the range of 0-1f. But doing so won't break - * anything on the framework, and will only make their hit results worse. */ - float percent = (float)(pt.PercentAsDouble * 0.5f); - time += (percent * tickDelta); - time -= tickDelta; - } - } - //Rolling back as owner (client host firing). - else - { - ulong pastTicks = (timeManager.Tick - pt.Tick); - if (pastTicks >= 0) - { - time = (pastTicks * tickDelta * 0.5f); - double percent = timeManager.GetTickPercentAsDouble(); - time -= ((float)percent * tickDelta); - } - } - return time; - } - - /// - /// Applies transforms for the specified physics type. - /// - /// - private void SyncTransforms(RollbackPhysicsType physicsType) - { - if (physicsType == RollbackPhysicsType.Physics) - Physics.SyncTransforms(); - else if (physicsType == RollbackPhysicsType.Physics2D) - Physics2D.SyncTransforms(); - } - //PROEND - } - -} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Layers.cs b/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Layers.cs deleted file mode 100644 index af6cee5..0000000 --- a/Assets/Packages/FishNet/Runtime/Plugins/GameKit/Dependencies/Utilities/Layers.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine; - -namespace GameKit.Dependencies.Utilities -{ - - public static class Layers - { - /// - /// Converts a layer mask to a layer number. - /// - /// - /// - public static int LayerMaskToLayerNumber(LayerMask mask) - { - return LayerValueToLayerNumber(mask.value); - } - /// - /// Converts a layer value int to a layer int. - /// - /// - /// - public static int LayerValueToLayerNumber(int bitmask) - { - int result = bitmask > 0 ? 0 : 31; - while (bitmask > 1) - { - bitmask = bitmask >> 1; - result++; - } - return result; - } - - /// - /// Returns if a LayerMask contains a specified layer. - /// - /// LayerMask to check for layer in. - /// Layer to check within LayerMask. - /// - public static bool ContainsLayer(LayerMask layerMask, int layer) - { - return (layerMask == (layerMask | (1 << layer))); - } - } - -} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/ClientSocket.cs b/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/ClientSocket.cs deleted file mode 100644 index b500000..0000000 --- a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/ClientSocket.cs +++ /dev/null @@ -1,152 +0,0 @@ -//PROSTART -using FishNet.Transporting.Yak.Server; -using System; -using System.Collections.Generic; - -namespace FishNet.Transporting.Yak.Client -{ - /// - /// Creates a fake client connection to interact with the ServerSocket. - /// - public class ClientSocket : CommonSocket - { - #region Private. - /// - /// Socket for the server. - /// - private ServerSocket _server; - /// - /// Incomimg data. - /// - private Queue _incoming = new Queue(); - #endregion - - /// - /// Initializes this for use. - /// - internal override void Initialize(Transport t, CommonSocket socket) - { - base.Initialize(t, socket); - _server = (ServerSocket)socket; - } - - /// - /// Starts the client connection. - /// - internal bool StartConnection() - { - //Already starting/started, or stopping. - if (base.GetLocalConnectionState() != LocalConnectionState.Stopped) - return false; - - SetLocalConnectionState(LocalConnectionState.Starting, false); - /* Certain conditions need the client state to change as well. - * Such as, if the server state is stopping then the client should - * also be stopping, rather than starting. Or if the server state - * is already started then client should immediately be set started - * rather than waiting for server started callback. */ - LocalConnectionState serverState = _server.GetLocalConnectionState(); - if (serverState == LocalConnectionState.Stopping || serverState == LocalConnectionState.Started) - OnLocalServerConnectionState(_server.GetLocalConnectionState()); - - return true; - } - - /// - /// Sets a new connection state. - /// - protected override void SetLocalConnectionState(LocalConnectionState connectionState, bool server) - { - base.SetLocalConnectionState(connectionState, server); - if (connectionState == LocalConnectionState.Started || connectionState == LocalConnectionState.Stopped) - _server.OnLocalClientConnectionState(connectionState); - } - - /// - /// Stops the local socket. - /// - internal bool StopConnection() - { - if (base.GetLocalConnectionState() == LocalConnectionState.Stopped || base.GetLocalConnectionState() == LocalConnectionState.Stopping) - return false; - - base.ClearQueue(ref _incoming); - //Immediately set stopped since no real connection exists. - SetLocalConnectionState(LocalConnectionState.Stopping, false); - SetLocalConnectionState(LocalConnectionState.Stopped, false); - - return true; - } - - /// - /// Iterations data received. - /// - internal void IterateIncoming() - { - if (base.GetLocalConnectionState() != LocalConnectionState.Started) - return; - - while (_incoming.Count > 0) - { - LocalPacket packet = _incoming.Dequeue(); - ArraySegment segment = new ArraySegment(packet.Data, 0, packet.Length); - ClientReceivedDataArgs dataArgs = new ClientReceivedDataArgs(segment, (Channel)packet.Channel, base.Transport.Index); - base.Transport.HandleClientReceivedDataArgs(dataArgs); - packet.Dispose(); - } - } - - /// - /// Called when the server sends the local client data. - /// - internal void ReceivedFromLocalServer(LocalPacket packet) - { - _incoming.Enqueue(packet); - } - - /// - /// Queues data to be sent to server. - /// - internal void SendToServer(byte channelId, ArraySegment segment) - { - if (base.GetLocalConnectionState() != LocalConnectionState.Started) - return; - if (_server.GetLocalConnectionState() != LocalConnectionState.Started) - return; - - LocalPacket packet = new LocalPacket(segment, channelId); - _server.ReceivedFromLocalClient(packet); - } - - #region Local server. - /// - /// Called when the local server starts or stops. - /// - internal void OnLocalServerConnectionState(LocalConnectionState state) - { - //Server started. - if (state == LocalConnectionState.Started && - base.GetLocalConnectionState() == LocalConnectionState.Starting) - { - SetLocalConnectionState(LocalConnectionState.Started, false); - } - //Server not started. - else - { - //If stopped or stopping then disconnect client if also not stopped or stopping. - if ((state == LocalConnectionState.Stopping || state == LocalConnectionState.Stopped) && - (base.GetLocalConnectionState() == LocalConnectionState.Started || - base.GetLocalConnectionState() == LocalConnectionState.Starting) - ) - { - SetLocalConnectionState(LocalConnectionState.Stopping, false); - SetLocalConnectionState(LocalConnectionState.Stopped, false); - } - } - } - #endregion - - - } -} -//PROEND \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/LocalPacket.cs b/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/LocalPacket.cs deleted file mode 100644 index e5d0309..0000000 --- a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/LocalPacket.cs +++ /dev/null @@ -1,27 +0,0 @@ -//PROSTART -using FishNet.Utility.Performance; -using System; - -namespace FishNet.Transporting.Yak -{ - internal struct LocalPacket - { - public byte[] Data; - public int Length; - public byte Channel; - public LocalPacket(ArraySegment data, byte channel) - { - Data = ByteArrayPool.Retrieve(data.Count); - Length = data.Count; - Buffer.BlockCopy(data.Array, data.Offset, Data, 0, Length); - Channel = channel; - } - - public void Dispose() - { - ByteArrayPool.Store(Data); - } - } - -} -//PROEND \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/ServerSocket.cs b/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/ServerSocket.cs deleted file mode 100644 index d38f41b..0000000 --- a/Assets/Packages/FishNet/Runtime/Plugins/Yak/Core/ServerSocket.cs +++ /dev/null @@ -1,167 +0,0 @@ -//PROSTART -using FishNet.Transporting; -using FishNet.Transporting.Yak.Client; -using System; -using System.Collections.Generic; - -namespace FishNet.Transporting.Yak.Server -{ - /// - /// Creates a fake socket acting as server. - /// - public class ServerSocket : CommonSocket - { - #region Public. - /// - /// Gets the current ConnectionState of a remote client on the server. - /// - /// ConnectionId to get ConnectionState for. - internal RemoteConnectionState GetConnectionState(int connectionId) - { - if (connectionId != Yak.CLIENT_HOST_ID) - return RemoteConnectionState.Stopped; - - LocalConnectionState state = _client.GetLocalConnectionState(); - return (state == LocalConnectionState.Started) ? RemoteConnectionState.Started : - RemoteConnectionState.Stopped; - } - #endregion - - #region Private. - /// - /// Packets received from local client. - /// - private Queue _incoming = new Queue(); - /// - /// Socket for client. - /// - private ClientSocket _client; - #endregion - - /// - /// Initializes this for use. - /// - internal override void Initialize(Transport t, CommonSocket socket) - { - base.Initialize(t, socket); - _client = (ClientSocket)socket; - } - - /// - /// Starts the server. - /// - internal bool StartConnection() - { - SetLocalConnectionState(LocalConnectionState.Starting, true); - SetLocalConnectionState(LocalConnectionState.Started, true); - return true; - } - - - /// - /// Sets a new connection state. - /// - protected override void SetLocalConnectionState(LocalConnectionState connectionState, bool server) - { - base.SetLocalConnectionState(connectionState, server); - _client.OnLocalServerConnectionState(connectionState); - } - - /// - /// Stops the local socket. - /// - internal bool StopConnection() - { - if (base.GetLocalConnectionState() == LocalConnectionState.Stopped) - return false; - - base.ClearQueue(ref _incoming); - SetLocalConnectionState(LocalConnectionState.Stopping, true); - SetLocalConnectionState(LocalConnectionState.Stopped, true); - - return true; - } - - /// - /// Stops a remote client from the server, disconnecting the client. - /// - /// ConnectionId of the client to disconnect. - internal bool StopConnection(int connectionId) - { - if (connectionId != Yak.CLIENT_HOST_ID) - return false; - - _client.StopConnection(); - return true; - } - - /// - /// Iterates the Incoming queue. - /// - /// - internal void IterateIncoming() - { - if (base.GetLocalConnectionState() != LocalConnectionState.Started) - return; - - //Iterate local client packets first. - while (_incoming.Count > 0) - { - LocalPacket packet = _incoming.Dequeue(); - ArraySegment segment = new ArraySegment(packet.Data, 0, packet.Length); - ServerReceivedDataArgs args = new ServerReceivedDataArgs(segment, (Channel)packet.Channel, Yak.CLIENT_HOST_ID, base.Transport.Index); - base.Transport.HandleServerReceivedDataArgs(args); - } - } - - /// - /// Sends data to a client. - /// - /// - /// - /// - internal void SendToClient(byte channelId, ArraySegment segment, int connectionId) - { - if (base.GetLocalConnectionState() != LocalConnectionState.Started) - return; - if (connectionId != Yak.CLIENT_HOST_ID) - return; - - LocalPacket packet = new LocalPacket(segment, channelId); - _client.ReceivedFromLocalServer(packet); - } - - #region Local client. - /// - /// Called when the local client starts or stops. - /// - internal void OnLocalClientConnectionState(LocalConnectionState state) - { - //If not started flush incoming from local client. - if (state != LocalConnectionState.Started) - { - base.ClearQueue(ref _incoming); - //If stopped then send stopped event as well. - if (state == LocalConnectionState.Stopped) - base.Transport.HandleRemoteConnectionState(new RemoteConnectionStateArgs(RemoteConnectionState.Stopped, Yak.CLIENT_HOST_ID, base.Transport.Index)); - } - else - { - base.Transport.HandleRemoteConnectionState(new RemoteConnectionStateArgs(RemoteConnectionState.Started, Yak.CLIENT_HOST_ID, base.Transport.Index)); - } - } - - /// - /// Queues a received packet from the local client. - /// - internal void ReceivedFromLocalClient(LocalPacket packet) - { - if (_client.GetLocalConnectionState() != LocalConnectionState.Started) - return; - - _incoming.Enqueue(packet); - } - #endregion - } -} -//PROEND \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Serializing/Helping/Broadcasts.cs b/Assets/Packages/FishNet/Runtime/Serializing/Helping/Broadcasts.cs deleted file mode 100644 index 674e0cd..0000000 --- a/Assets/Packages/FishNet/Runtime/Serializing/Helping/Broadcasts.cs +++ /dev/null @@ -1,33 +0,0 @@ -using FishNet.Managing; -using FishNet.Transporting; -using GameKit.Dependencies.Utilities; - -namespace FishNet.Serializing.Helping -{ - - internal static class Broadcasts - { - /// - /// Writes a broadcast to writer. - /// - internal static PooledWriter WriteBroadcast(NetworkManager networkManager, PooledWriter writer, T message, ref Channel channel) - { - writer.WritePacketId(PacketId.Broadcast); - writer.WriteUInt16(typeof(T).FullName.GetStableHashU16()); - //Write data to a new writer. - PooledWriter dataWriter = WriterPool.Retrieve(); - dataWriter.Write(message); - //Write length of data. - writer.WriteLength(dataWriter.Length); - //Write data. - writer.WriteArraySegment(dataWriter.GetArraySegment()); - //Update channel to reliable if needed. - networkManager.TransportManager.CheckSetReliableChannel(writer.Length, ref channel); - - dataWriter.Store(); - - return writer; - } - } - -} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Utility/DetachableTickSmoother.cs b/Assets/Packages/FishNet/Runtime/Utility/DetachableTickSmoother.cs deleted file mode 100644 index 92a9f3f..0000000 --- a/Assets/Packages/FishNet/Runtime/Utility/DetachableTickSmoother.cs +++ /dev/null @@ -1,159 +0,0 @@ -using FishNet.Managing; -using FishNet.Managing.Timing; -using FishNet.Object; -using FishNet.Object.Prediction; -using FishNet.Utility.Extension; -using UnityEngine; - -namespace FishNet.Utility -{ - /// - /// Smooths movemoments between ticks towards a followed target. - /// - public class DetachableTickSmoother : NetworkBehaviour - { - /// - /// Target to follow; this is usually a graphical object but can be anything you want to use as your camera target. - /// - [Tooltip("Target to follow; this is usually a graphical object but can be anything you want to use as your camera target.")] - [SerializeField] - private Transform _target; - /// - /// True to attach this object to it's previous parent when OnStopClient is called. - /// - [Tooltip("True to attach this object to it's previous parent when OnStopClient is called.")] - [SerializeField] - private bool _attachOnStop = true; - /// - /// True to enable teleport threshhold. - /// - [Tooltip("True to enable teleport threshhold.")] - [SerializeField] - private bool _enableTeleport; - /// - /// Distance the graphical object must move between ticks to teleport the transform properties. - /// - [Tooltip("Distance the graphical object must move between ticks to teleport the transform properties.")] - [Range(0.001f, ushort.MaxValue)] - [SerializeField] - private float _teleportThreshold = 1f; - /// - /// MoveRates to use. - /// - private MoveRates _moveRates; - /// - /// True if pretick ran. - /// - private bool _preTicked; - /// - /// TickDelta when started. - /// - private float _tickDelta; - /// - /// Last TransformProperties for Target. - /// - private TransformProperties? _targetProperties; - /// - /// Parent prior to detaching. - /// - private Transform _previousParent; - - public override void OnStartClient() - { - if (_target == null) - { - base.NetworkManager.LogError($"{GetType().Name} on {transform.name} does not have a target specified."); - return; - } - - _previousParent = transform.parent; - transform.SetParent(null); - _tickDelta = (float)base.TimeManager.TickDelta; - ChangeSubscriptions(true); - } - - public override void OnStopClient() - { - ChangeSubscriptions(false); - } - - private void Update() - { - MoveToTarget(); - } - - private void TimeManager_OnPreTick() - { - _preTicked = true; - } - - private void TimeManager_OnPostTick() - { - if (_preTicked) - { - SetMoveRates(); - _targetProperties = _target.GetWorldProperties(); - } - _preTicked = false; - } - - /// - /// Changes subscriptions which are needed to function. - /// - private void ChangeSubscriptions(bool subscribe) - { - TimeManager tm = base.TimeManager; - if (tm == null) - return; - - if (subscribe) - { - base.TimeManager.OnPreTick += TimeManager_OnPreTick; - base.TimeManager.OnPostTick += TimeManager_OnPostTick; - } - } - - /// - /// Sets move rates from current position to goal using tickDelta. - /// - private void SetMoveRates() - { - float teleportT = (_enableTeleport) ? _teleportThreshold : MoveRatesCls.UNSET_VALUE; - - TransformProperties thisProperties = transform.GetWorldProperties(); - _moveRates = MoveRates.GetWorldMoveRates(thisProperties, _target, _tickDelta, teleportT); - } - - /// - /// Moves to target. - /// - private void MoveToTarget() - { - if (_target == null) - return; - if (!_targetProperties.HasValue) - return; - if (!_moveRates.AnySet) - return; - - _moveRates.MoveLocalToTarget(transform, _targetProperties.Value, Time.deltaTime); - /* If no longer spawned and to rechild this - * then do so once at goal. */ - if (!base.IsSpawned && _attachOnStop) - { - if (transform.position == _target.position - && transform.rotation == _target.rotation - && transform.localScale == _target.localScale) - { - _targetProperties = null; - transform.SetParent(_previousParent, true); - //Unset move data to prevent excess work. - _moveRates.Update(MoveRatesCls.UNSET_VALUE); - } - } - } - - - } - -} \ No newline at end of file diff --git a/Assets/Packages/FishNet/Runtime/Utility/DetachableTickSmoother.cs.meta b/Assets/Packages/FishNet/Runtime/Utility/DetachableTickSmoother.cs.meta deleted file mode 100644 index 0334493..0000000 --- a/Assets/Packages/FishNet/Runtime/Utility/DetachableTickSmoother.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 894b3ba389334e74f8500812cc9230f4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Packages/FishNet/VERSION.txt b/Assets/Packages/FishNet/VERSION.txt deleted file mode 100644 index cd9b8f5..0000000 --- a/Assets/Packages/FishNet/VERSION.txt +++ /dev/null @@ -1 +0,0 @@ -4.1.2 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix.meta b/Assets/Plugins/Sirenix.meta new file mode 100644 index 0000000..2838761 --- /dev/null +++ b/Assets/Plugins/Sirenix.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0f4d362b601ff2c45837a39fb4182588 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies.meta b/Assets/Plugins/Sirenix/Assemblies.meta new file mode 100644 index 0000000..7d93e24 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5de36ad581c8aa546812e8a292938879 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEditor.meta b/Assets/Plugins/Sirenix/Assemblies/NoEditor.meta new file mode 100644 index 0000000..f598086 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/NoEditor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 01d88f287a4dbee4389659cadf9db811 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll new file mode 100644 index 0000000..f0c718b Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll.meta b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll.meta new file mode 100644 index 0000000..1a97dca --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll.meta @@ -0,0 +1,79 @@ +fileFormatVersion: 2 +guid: 5651992cdad94894a3af7dc3f1da9170 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 0 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 0 + Exclude PSM: 0 + Exclude PSP2: 0 + Exclude SamsungTV: 0 + Exclude Tizen: 0 + Exclude WebGL: 0 + Exclude WiiU: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 0 + Exclude XboxOne: 0 + Exclude iOS: 0 + Exclude tvOS: 0 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + N3DS: + enabled: 1 + settings: {} + PS4: + enabled: 1 + settings: {} + PSM: + enabled: 1 + settings: {} + PSP2: + enabled: 1 + settings: {} + SamsungTV: + enabled: 1 + settings: {} + Tizen: + enabled: 1 + settings: {} + WebGL: + enabled: 1 + settings: {} + WiiU: + enabled: 1 + settings: {} + WindowsStoreApps: + enabled: 1 + settings: + CPU: AnyCPU + XboxOne: + enabled: 1 + settings: {} + iOS: + enabled: 1 + settings: {} + tvOS: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll new file mode 100644 index 0000000..cbb222f Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll.meta b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll.meta new file mode 100644 index 0000000..21e88ae --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll.meta @@ -0,0 +1,79 @@ +fileFormatVersion: 2 +guid: 5978f8f3dd274e848fbb7a123bde1fb9 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 0 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 0 + Exclude PSM: 0 + Exclude PSP2: 0 + Exclude SamsungTV: 0 + Exclude Tizen: 0 + Exclude WebGL: 0 + Exclude WiiU: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 0 + Exclude XboxOne: 0 + Exclude iOS: 0 + Exclude tvOS: 0 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + N3DS: + enabled: 1 + settings: {} + PS4: + enabled: 1 + settings: {} + PSM: + enabled: 1 + settings: {} + PSP2: + enabled: 1 + settings: {} + SamsungTV: + enabled: 1 + settings: {} + Tizen: + enabled: 1 + settings: {} + WebGL: + enabled: 1 + settings: {} + WiiU: + enabled: 1 + settings: {} + WindowsStoreApps: + enabled: 1 + settings: + CPU: AnyCPU + XboxOne: + enabled: 1 + settings: {} + iOS: + enabled: 1 + settings: {} + tvOS: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor.meta b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor.meta new file mode 100644 index 0000000..e4f4862 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0c19f3e3fdccba64c8debc6ec69b2551 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll new file mode 100644 index 0000000..ac9a65c Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll.meta b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll.meta new file mode 100644 index 0000000..ac8769d --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: d2a8f0021d6b47c5923d8972dfb81ef1 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Android: + enabled: 1 + settings: {} + Any: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 1 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude N3DS: 1 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + Linux: + enabled: 1 + settings: {} + Linux64: + enabled: 1 + settings: {} + LinuxUniversal: + enabled: 1 + settings: {} + OSXIntel: + enabled: 1 + settings: {} + OSXIntel64: + enabled: 1 + settings: {} + OSXUniversal: + enabled: 1 + settings: {} + PSM: + enabled: 0 + settings: {} + Win: + enabled: 1 + settings: {} + Win64: + enabled: 1 + settings: {} + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll new file mode 100644 index 0000000..3ffce4f Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll.meta b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll.meta new file mode 100644 index 0000000..f158c55 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 1e0a9643dc0d4b46bf2321f72c4e503e +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Android: + enabled: 1 + settings: {} + Any: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 1 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude N3DS: 1 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + Linux: + enabled: 1 + settings: {} + Linux64: + enabled: 1 + settings: {} + LinuxUniversal: + enabled: 1 + settings: {} + OSXIntel: + enabled: 1 + settings: {} + OSXIntel64: + enabled: 1 + settings: {} + OSXUniversal: + enabled: 1 + settings: {} + PSM: + enabled: 0 + settings: {} + Win: + enabled: 1 + settings: {} + Win64: + enabled: 1 + settings: {} + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll new file mode 100644 index 0000000..4b2dc6f Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll.meta new file mode 100644 index 0000000..77ae929 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 47a84ebde4ec47fabb620b30cc7a3e5c +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 1 + settings: + Exclude Android: 0 + Exclude Editor: 0 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude N3DS: 0 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude PS4: 0 + Exclude PSM: 0 + Exclude PSP2: 0 + Exclude SamsungTV: 0 + Exclude Tizen: 0 + Exclude WebGL: 0 + Exclude WiiU: 0 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 0 + Exclude XboxOne: 0 + Exclude iOS: 0 + Exclude tvOS: 0 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml new file mode 100644 index 0000000..0649312 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml @@ -0,0 +1,6441 @@ + + + + Sirenix.OdinInspector.Attributes + + + + + AssetLists is used on lists and arrays and single elements of unity types, and replaces the default list drawer with a list of all possible assets with the specified filter. + Use this to both filter and include or exclude assets from a list or an array, without navigating the project window. + + + Asset lists works on all asset types such as materials, scriptable objects, prefabs, custom components, audio, textures etc, and does also show inherited types. + + + The following example will display an asset list of all prefabs located in the project window. + + public class AssetListExamples : MonoBehaviour + { + [InfoBox("The AssetList attribute work on both lists of UnityEngine.Object types and UnityEngine.Object types, but have different behaviour.")] + [AssetList] + [InlineEditor(InlineEditorModes.LargePreview)] + public GameObject Prefab; + + [AssetList] + public List<PlaceableObject> PlaceableObjects; + + [AssetList(Path = "Plugins/Sirenix/")] + [InlineEditor(InlineEditorModes.LargePreview)] + public UnityEngine.Object Object; + + [AssetList(AutoPopulate = true)] + public List<PlaceableObject> PlaceableObjectsAutoPopulated; + + [AssetList(LayerNames = "MyLayerName")] + public GameObject[] AllPrefabsWithLayerName; + + [AssetList(AssetNamePrefix = "Rock")] + public List<GameObject> PrefabsStartingWithRock; + + [AssetList(Path = "/Plugins/Sirenix/")] + public List<GameObject> AllPrefabsLocatedInFolder; + + [AssetList(Tags = "MyTagA, MyTabB", Path = "/Plugins/Sirenix/")] + public List<GameObject> GameObjectsWithTag; + + [AssetList(Path = "/Plugins/Sirenix/")] + public List<Material> AllMaterialsInSirenix; + + [AssetList(Path = "/Plugins/Sirenix/")] + public List<ScriptableObject> AllScriptableObjects; + + [InfoBox("Use a method as a custom filter for the asset list.")] + [AssetList(CustomFilterMethod = "HasRigidbodyComponent")] + public List<GameObject> MyRigidbodyPrefabs; + + private bool HasRigidbodyComponent(GameObject obj) + { + return obj.GetComponent<Rigidbody>() != null; + } + } + + + + + + If true, all assets found and displayed by the asset list, will automatically be added to the list when inspected. + + + + + Comma separated list of tags to filter the asset list. + + + + + Filter the asset list to only include assets with a specified layer. + + + + + Filter the asset list to only include assets which name begins with. + + + + + Filter the asset list to only include assets which is located at the specified path. + + + + + Filter the asset list to only include assets for which the given filter method returns true. + + + + + Initializes a new instance of the class. + + + + + The AssetSelector attribute can be used on all Unity types and will prepend a small button next to the object field that when clicked, + will present the user with a dropdown of assets to select from which can be customized from the attribute. + + + + + True by default. + + + + + True by default. If the ValueDropdown attribute is applied to a list, then disabling this, + will render all child elements normally without using the ValueDropdown. The ValueDropdown will + still show up when you click the add button on the list drawer, unless is true. + + + + + False by default. + + + + + If the ValueDropdown attribute is applied to a list, and is set to true, then enabling this, + will exclude existing values, instead of rendering a checkbox indicating whether the item is already included or not. + + + + + If the dropdown renders a tree-view, then setting this to true will ensure everything is expanded by default. + + + + + By default, the dropdown will create a tree view. + + + + + Gets or sets the width of the dropdown. Default is zero. + + + + + Gets or sets the height of the dropdown. Default is zero. + + + + + Gets or sets the title for the dropdown. Null by default. + + + + + Specify which folders to search in. Specifying no folders will make it search in your entire project. + Use the property for a more clean way of populating this array through attributes. + + + + + The filters we should use when calling AssetDatabase.FindAssets. + + + + + + Specify which folders to search in. Specifying no folders will make it search in your entire project. + You can decalir multiple paths using '|' as the seperator. + Example: [AssetList(Paths = "Assets/Textures|Assets/Other/Textures")] + + + This property is simply a more clean way of populating the array. + + + + + + AssetsOnly is used on object properties, and restricts the property to project assets, and not scene objects. + Use this when you want to ensure an object is from the project, and not from the scene. + + + The following example shows a component with a game object property, that must be a prefab from the project, and not a scene object. + + public MyComponent : MonoBehaviour + { + [AssetsOnly] + public GameObject MyPrefab; + } + + + + + + + BoxGroup is used on any property and organizes the property in a boxed group. + Use this to cleanly organize relevant values together in the inspector. + + + The following example shows how BoxGroup is used to organize properties together into a box. + + public class BoxGroupExamples : MonoBehaviour + { + // Box with a centered title. + [BoxGroup("Centered Title", centerLabel: true)] + public int A; + + [BoxGroup("Centered Title", centerLabel: true)] + public int B; + + [BoxGroup("Centered Title", centerLabel: true)] + public int C; + + // Box with a title. + [BoxGroup("Left Oriented Title")] + public int D; + + [BoxGroup("Left Oriented Title")] + public int E; + + // Box with a title recieved from a field. + [BoxGroup("$DynamicTitle1"), LabelText("Dynamic Title")] + public string DynamicTitle1 = "Dynamic box title"; + + [BoxGroup("$DynamicTitle1")] + public int F; + + // Box with a title recieved from a property. + [BoxGroup("$DynamicTitle2")] + public int G; + + [BoxGroup("$DynamicTitle2")] + public int H; + + // Box without a title. + [InfoBox("You can also hide the label of a box group.")] + [BoxGroup("NoTitle", false)] + public int I; + + [BoxGroup("NoTitle")] + public int J; + + [BoxGroup("NoTitle")] + public int K; + + #if UNITY_EDITOR + public string DynamicTitle2 + { + get { return UnityEditor.PlayerSettings.productName; } + } + #endif + + [BoxGroup("Boxed Struct"), HideLabel] + public SomeStruct BoxedStruct; + + public SomeStruct DefaultStruct; + + [Serializable] + public struct SomeStruct + { + public int One; + public int Two; + public int Three; + } + } + + + + + + + + + + + If true a label for the group will be drawn on top. + + + + + If true the header label will be places in the center of the group header. Otherwise it will be in left side. + + + + + If non-null, this is used instead of the group's name as the title label. + + + + + Adds the property to the specified box group. + + The box group. + If true a label will be drawn for the group. + If set to true the header label will be centered. + The order of the group in the inspector. + + + + Initializes a new instance of the class. Use the other constructor overloads in order to show a header-label on the box group. + + + + + Combines the box group with another group. + + The other group. + + + + Buttons are used on functions, and allows for clickable buttons in the inspector. + + + The following example shows a component that has an initialize method, that can be called from the inspector. + + public class MyComponent : MonoBehaviour + { + [Button] + private void Init() + { + // ... + } + } + + + + The following example show how a Button could be used to test a function. + + public class MyBot : MonoBehaviour + { + [Button] + private void Jump() + { + // ... + } + } + + + + The following example show how a Button can named differently than the function it's been attached to. + + public class MyComponent : MonoBehaviour + { + [Button("Function")] + private void MyFunction() + { + // ... + } + } + + + + + + + + Use this to override the label on the button. + + + + + The style in which to draw the button. + + + + + If the button contains parameters, you can disable the foldout it creates by setting this to true. + + + + + Whether to display the button method's parameters (if any) as values in the inspector. True by default. + If this is set to false, the button method will instead be invoked through an ActionResolver or ValueResolver (based on whether it returns a value), giving access to contextual named parameter values like "InspectorProperty property" that can be passed to the button method. + + + + + Whether the containing object or scene (if there is one) should be marked dirty when the button is clicked. True by default. Note that if this is false, undo for any changes caused by the button click is also disabled, as registering undo events also causes dirtying. + + + + + Gets the height of the button. If it's zero or below then use default. + + + + + The icon to be displayed inside the button. + + + + + The alignment of the icon that is displayed inside the button. + + + + + The alignment of the button represented by a range from 0 to 1 where 0 is the left edge of the available space and 1 is the right edge. + ButtonAlignment only has an effect when Stretch is set to false. + + + + + Whether the button should stretch to fill all of the available space. Default value is true. + + + + + If the button has a return type, set this to false to not draw the result. Default value is true. + + + + + Creates a button in the inspector named after the method. + + + + + Creates a button in the inspector named after the method. + + The size of the button. + + + + Creates a button in the inspector named after the method. + + The size of the button. + + + + Creates a button in the inspector with a custom name. + + Custom name for the button. + + + + Creates a button in the inspector with a custom name. + + Custom name for the button. + Size of the button. + + + + Creates a button in the inspector with a custom name. + + Custom name for the button. + Size of the button in pixels. + + + + Creates a button in the inspector named after the method. + + Button style for methods with parameters. + + + + Creates a button in the inspector named after the method. + + The size of the button. + Button style for methods with parameters. + + + + Creates a button in the inspector named after the method. + + The size of the button. + Button style for methods with parameters. + + + + Creates a button in the inspector with a custom name. + + Custom name for the button. + Button style for methods with parameters. + + + + Creates a button in the inspector with a custom name. + + Custom name for the button. + Size of the button. + Button style for methods with parameters. + + + + Creates a button in the inspector with a custom name. + + Custom name for the button. + Size of the button in pixels. + Button style for methods with parameters. + + + + Creates a button in the inspector with a custom icon. + + The icon to be displayed inside the button. + The alignment of the icon that is displayed inside the button. + + + + Creates a button in the inspector with a custom icon. + + The icon to be displayed inside the button. + + + + Creates a button in the inspector with a custom icon. + + The icon to be displayed inside the button. + Custom name for the button. + + + + ButtonGroup is used on any instance function, and adds buttons to the inspector organized into horizontal groups. + Use this to organize multiple button in a tidy horizontal group. + + + The following example shows how ButtonGroup is used to organize two buttons into one group. + + public class MyComponent : MonoBehaviour + { + [ButtonGroup("MyGroup")] + private void A() + { + // .. + } + + [ButtonGroup("MyGroup")] + private void B() + { + // .. + } + } + + + + The following example shows how ButtonGroup can be used to create multiple groups of buttons. + + public class MyComponent : MonoBehaviour + { + [ButtonGroup("First")] + private void A() + { } + + [ButtonGroup("First")] + private void B() + { } + + [ButtonGroup("")] + private void One() + { } + + [ButtonGroup("")] + private void Two() + { } + + [ButtonGroup("")] + private void Three() + { } + } + + + + + + + + + + + + + Gets the height of the button. If it's zero or below then use default. + + + + + The alignment of the icon that is displayed inside the button. + + + + + The alignment of the button represented by a range from 0 to 1 where 0 is the left edge of the available space and 1 is the right edge. + + + + + Whether the button should stretch to fill all of the available space. Default value is true. + + + + + Organizes the button into the specified button group. + + The group to organize the button into. + The order of the group in the inspector.. + + + + Button style for methods with parameters. + + + + + Draws a foldout box around the parameters of the method with the button on the box header itself. + This is the default style of a method with parameters. + + + + + Draws a button with a foldout to expose the parameters of the method. + + + + + Draws a foldout box around the parameters of the method with the button at the bottom of the box. + + + + + The ChildGameObjectsOnly attribute can be used on Components and GameObject fields and will prepend a small button next to the object-field that + will search through all child gameobjects for assignable objects and present them in a dropdown for the user to choose from. + + + + + + ColorPalette is used on any Color property, and allows for choosing colors from different definable palettes. + Use this to allow the user to choose from a set of predefined color options. + + + See and edit the color palettes in Tools > Odin > Inspector > Preferences > Drawers > Color Palettes. + The color property is not tied to the color palette, and can be edited. Therefore the color will also not update if the ColorPalette is edited. + + + The following example shows how ColorPalette is applied to a property. The user can freely choose between all available ColorPalettes. + + public class ColorPaletteExamples : MonoBehaviour + { + [ColorPalette] + public Color ColorOptions; + + [ColorPalette("Underwater")] + public Color UnderwaterColor; + + [ColorPalette("Fall"), HideLabel] + public Color WideColorPalette; + + [ColorPalette("My Palette")] + public Color MyColor; + + [ColorPalette("Clovers")] + public Color[] ColorArray; + } + + + + + + Gets the name of the palette. + + + + + Indicates if the color palette should show alpha values or not. + + + + + Adds a color palette options to a Color property. + + + + + Adds color options to a Color property from a specific palette. + + Name of the palette. + + + + CustomContextMenu is used on any property, and adds a custom options to the context menu for the property. + Use this for when you want to add custom actions to the context menu of a property. + + + CustomContextMenu currently does not support static functions. + + + The following example shows how CustomContextMenu is used to add a custom option to a property. + + public class MyComponent : MonoBehaviour + { + [CustomContextMenu("My custom option", "MyAction")] + public Vector3 MyVector; + + private void MyAction() + { + MyVector = Random.onUnitSphere; + } + } + + + + + + + The name of the menu item. + + + + + The name of the callback method. Obsolete; use the Action member instead. + + + + + A resolved string defining the action to take when the context menu is clicked. + + + + + Adds a custom option to the context menu of the property. + + The name of the menu item. + A resolved string defining the action to take when the context menu is clicked. + + + + Instead of making a new attribute, and a new drawer, for a one-time thing, you can with this attribute, make a method that acts as a custom property drawer. + These drawers will out of the box have support for undo/redo and multi-selection. + + + Usage: + + public class CustomDrawerExamples : MonoBehaviour + { + public float From = 2, To = 7; + + [CustomValueDrawer("MyStaticCustomDrawerStatic")] + public float CustomDrawerStatic; + + [CustomValueDrawer("MyStaticCustomDrawerInstance")] + public float CustomDrawerInstance; + + [CustomValueDrawer("MyStaticCustomDrawerArray")] + public float[] CustomDrawerArray; + + #if UNITY_EDITOR + + private static float MyStaticCustomDrawerStatic(float value, GUIContent label) + { + return EditorGUILayout.Slider(value, 0f, 10f); + } + + private float MyStaticCustomDrawerInstance(float value, GUIContent label) + { + return EditorGUILayout.Slider(value, this.From, this.To); + } + + private float MyStaticCustomDrawerArray(float value, GUIContent label) + { + return EditorGUILayout.Slider(value, this.From, this.To); + } + + #endif + } + + + + + + Name of the custom drawer method. Obsolete; use the Action member instead. + + + + + A resolved string that defines the custom drawer action to take, such as an expression or method invocation. + + + + + Instead of making a new attribute, and a new drawer, for a one-time thing, you can with this attribute, make a method that acts as a custom property drawer. + These drawers will out of the box have support for undo/redo and multi-selection. + + A resolved string that defines the custom drawer action to take, such as an expression or method invocation. + + + + Delays applying changes to properties while they still being edited in the inspector. + Similar to Unity's built-in Delayed attribute, but this attribute can also be applied to properties. + + + + + DetailedInfoBox is used on any property, and displays a message box that can be expanded to show more details. + Use this to convey a message to a user, and give them the option to see more details. + + + The following example shows how DetailedInfoBox is used on a field. + + public class MyComponent : MonoBehaviour + { + [DetailedInfoBox("This is a message", "Here is some more details about that message")] + public int MyInt; + } + + + + + + + The message for the message box. + + + + + The hideable details of the message box. + + + + + Type of the message box. + + + + + Optional name of a member to hide or show the message box. + + + + + Displays a message box with hideable details. + + The message for the message box. + The hideable details of the message box. + Type of the message box. + Optional name of a member to hide or show the message box. + + + + Customize the behavior for dictionaries in the inspector. + + + + + Specify an alternative key label for the dictionary drawer. + + + + + Specify an alternative value label for the dictionary drawer. + + + + + Specify how the dictionary should draw its items. + + + + + Gets or sets a value indicating whether this instance is read only. + + + + + Gets or sets a value indicating the default key column width of the dictionary. + + + + + DisableContextMenu is used on any property and disables the context menu for that property. + Use this if you do not want the context menu to be available for a property. + + + The following example shows how DisableContextMenu is used on a property. + + public class MyComponent : MonoBehaviour + { + [DisableContextMenu] + public Vector3 MyVector; + } + + + + + + + Whether to disable the context menu for the member itself. + + + + + Whether to disable the context menu for collection elements. + + + + + Initializes a new instance of the class. + + Whether to disable the context menu for the member itself. + Whether to also disable the context menu of collection elements. + + + + DisableIf is used on any property, and can disable or enable the property in the inspector. + Use this to disable properties when they are irrelevant. + + + The following example shows how a property can be disabled by the state of a field. + + public class MyComponent : MonoBehaviour + { + public bool DisableProperty; + + [DisableIf("DisableProperty")] + public int MyInt; + + public SomeEnum SomeEnumField; + + [DisableIf("SomeEnumField", SomeEnum.SomeEnumMember)] + public string SomeString; + } + + + + The following examples show how a property can be disabled by a function. + + public class MyComponent : MonoBehaviour + { + [EnableIf("MyDisableFunction")] + public int MyInt; + + private bool MyDisableFunction() + { + // ... + } + } + + + + + + + + The name of a bool member field, property or method. Obsolete; use the Condition member instead. + + + + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + + The optional condition value. + + + + + Disables a property in the inspector, based on the value of a resolved string. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + Disables a property in the inspector, if the resolved string evaluates to the specified value. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + Value to check against. + + + + Disables a member based on which type of a prefab and instance it is in. + + + + + DisableInEditorMode is used on any property, and disables the property when not in play mode. + Use this when you only want a property to be editable when in play mode. + + + The following example shows how DisableInEditorMode is used to disable a property when in the editor. + + public class MyComponent : MonoBehaviour + { + [DisableInEditorMode] + public int MyInt; + } + + + + + + + + + Disables a property if it is drawn within an . + + + + + Disables a property if it is drawn from a non-prefab asset or instance. + + + + + DisableInPlayMode is used on any property, and disables the property when in play mode. + Use this to prevent users from editing a property when in play mode. + + + The following example shows how DisableInPlayMode is used to disable a property when in play mode. + + public class MyComponent : MonoBehaviour + { + [DisableInPlayMode] + public int MyInt; + } + + + + + + + + + + + Disables a property if it is drawn from a prefab asset. + + + + + Disables a property if it is drawn from a prefab instance. + + + + + Disables a property if it is drawn from a prefab asset or a prefab instance. + + + + + DisallowModificationsIn disables / grays out members, preventing modifications from being made and enables validation, + providing error messages in case a modification was made prior to introducing the attribute. + + + + + + + + DisplayAsString is used on any property, and displays a string in the inspector as text. + Use this for when you want to show a string in the inspector, but not allow for any editing. + + + DisplayAsString uses the property's ToString method to display the property as a string. + + + The following example shows how DisplayAsString is used to display a string property as text in the inspector. + + public class MyComponent : MonoBehaviour + { + [DisplayAsString] + public string MyInt = 5; + + // You can combine with to display a message in the inspector. + [DisplayAsString, HideLabel] + public string MyMessage = "This string will be displayed as text in the inspector"; + + [DisplayAsString(false)] + public string InlineMessage = "This string is very long, but has been configured to not overflow."; + } + + + + + + + + If true, the string will overflow past the drawn space and be clipped when there's not enough space for the text. + If false the string will expand to multiple lines, if there's not enough space when drawn. + + + + + How the string should be aligned. + + + + + The size of the font. + + + + + If true the string will support rich text. + + + + + String for formatting the value. Type must implement the IFormattable interface. + + + + + Displays the property as a string in the inspector. + + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + + + + Displays the property as a string in the inspector. + + How the string should be aligned. + + + + Displays the property as a string in the inspector. + + The size of the font. + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + How the string should be aligned. + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + The size of the font. + + + + Displays the property as a string in the inspector. + + The size of the font. + How the string should be aligned. + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + The size of the font. + How the string should be aligned. + + + + Displays the property as a string in the inspector. + + How the string should be aligned. + If true the string will support rich text. + + + + Displays the property as a string in the inspector. + + The size of the font. + If true the string will support rich text. + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + How the string should be aligned. + If true the string will support rich text. + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + The size of the font. + If true the string will support rich text. + + + + Displays the property as a string in the inspector. + + The size of the font. + How the string should be aligned. + If true the string will support rich text. + + + + Displays the property as a string in the inspector. + + Value indicating if the string should overflow past the available space, or expand to multiple lines when there's not enough horizontal space. + The size of the font. + How the string should be aligned. + If true the string will support rich text. + + + + Indicates that the member should not be drawn as a value reference, if it becomes a reference to another value in the tree. Beware, and use with care! This may lead to infinite draw loops! + + + + + DontApplyToListElements is used on other attributes, and indicates that those attributes should be applied only to the list, and not to the elements of the list. + Use this on attributes that should only work on a list or array property as a whole, and not on each element of the list. + + + The following example shows how DontApplyToListElements is used on . + + [DontApplyToListElements] + [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)] + public sealed class VisibleIfAttribute : Attribute + { + public string MemberName { get; private set; } + + public VisibleIfAttribute(string memberName) + { + this.MemberName = memberName; + } + } + + + + + + Tells the validation system that this member should not be validated. It will not show validation messages in the inspector, and it will not be scanned by the project validator. + + + + + DrawWithUnity can be applied to a field or property to make Odin draw it using Unity's old drawing system. Use it if you want to selectively disable Odin drawing for a particular member. + + + Note that this attribute does not mean "disable Odin completely for this property"; it is visual only in nature, and in fact represents an Odin drawer which calls into Unity's old property drawing system. As Odin is still ultimately responsible for arranging the drawing of the property, and since other attributes exist with a higher priority than this attribute, and it is not guaranteed that Unity will draw the property if another attribute is present to override this one. + + + + + Force Odin to draw this value as an IMGUI-embedded UI Toolkit Visual Element. + + + + + An attribute that enables GUI. + + + + public class InlineEditorExamples : MonoBehaviour + { + [EnableGUI] + public string SomeReadonlyProperty { get { return "My GUI is usually disabled." } } + } + + + + + + + EnableIf is used on any property, and can enable or disable the property in the inspector. + Use this to enable properties when they are relevant. + + + The following example shows how a property can be enabled by the state of a field. + + public class MyComponent : MonoBehaviour + { + public bool EnableProperty; + + [EnableIf("EnableProperty")] + public int MyInt; + + public SomeEnum SomeEnumField; + + [EnableIf("SomeEnumField", SomeEnum.SomeEnumMember)] + public string SomeString; + } + + + + The following examples show how a property can be enabled by a function. + + public class MyComponent : MonoBehaviour + { + [EnableIf("MyEnableFunction")] + public int MyInt; + + private bool MyEnableFunction() + { + // ... + } + } + + + + + + + + + + + The name of a bool member field, property or method. Obsolete; use the Condition member instead. + + + + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + + The optional condition value. + + + + + Enables a property in the inspector, based on the value of a resolved string. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + Enables a property in the inspector, if the resolved string evaluates to the specified value. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + Value to check against. + + + + Enables a member based on which type of a prefab and instance it is. + + + + + Draws an enum selector in the inspector with next and previous buttons to let you cycle through the available values for the enum property. + + + + public enum MyEnum + { + One, + Two, + Three, + } + + public class MyMonoBehaviour : MonoBehaviour + { + [EnumPaging] + public MyEnum Value; + } + + + + + + + Draws an enum in a horizontal button group instead of a dropdown. + + + + public class MyComponent : MonoBehvaiour + { + [EnumToggleButtons] + public MyBitmaskEnum MyBitmaskEnum; + + [EnumToggleButtons] + public MyEnum MyEnum; + } + + [Flags] + public enum MyBitmaskEnum + { + A = 1 << 1, // 1 + B = 1 << 2, // 2 + C = 1 << 3, // 4 + ALL = A | B | C + } + + public enum MyEnum + { + A, + B, + C + } + + + + + + + FilePath is used on string properties, and provides an interface for file paths. + + + The following example demonstrates how FilePath is used. + + public class FilePathExamples : MonoBehaviour + { + // By default, FilePath provides a path relative to the Unity project. + [FilePath] + public string UnityProjectPath; + + // It is possible to provide custom parent path. Parent paths can be relative to the Unity project, or absolute. + [FilePath(ParentFolder = "Assets/Plugins/Sirenix")] + public string RelativeToParentPath; + + // Using parent path, FilePath can also provide a path relative to a resources folder. + [FilePath(ParentFolder = "Assets/Resources")] + public string ResourcePath; + + // Provide a comma seperated list of allowed extensions. Dots are optional. + [FilePath(Extensions = "cs")] + public string ScriptFiles; + + // By setting AbsolutePath to true, the FilePath will provide an absolute path instead. + [FilePath(AbsolutePath = true)] + [BoxGroup("Conditions")] + public string AbsolutePath; + + // FilePath can also be configured to show an error, if the provided path is invalid. + [FilePath(RequireValidPath = true)] + public string ValidPath; + + // By default, FilePath will enforce the use of forward slashes. It can also be configured to use backslashes instead. + [FilePath(UseBackslashes = true)] + public string Backslashes; + + // FilePath also supports member references with the $ symbol. + [FilePath(ParentFolder = "$DynamicParent", Extensions = "$DynamicExtensions")] + public string DynamicFilePath; + + public string DynamicParent = "Assets/Plugin/Sirenix"; + + public string DynamicExtensions = "cs, unity, jpg"; + } + + + + + + + + If true the FilePath will provide an absolute path, instead of a relative one. + + + + + Comma separated list of allowed file extensions. Dots are optional. + Supports member referencing with $. + + + + + ParentFolder provides an override for where the path is relative to. ParentFolder can be relative to the Unity project, or an absolute path. + Supports member referencing with $. + + + + + If true an error will be displayed for invalid, or missing paths. + + + + + If true an error will be displayed for non-existing paths. + + + + + By default FilePath enforces forward slashes. Set UseBackslashes to true if you want backslashes instead. + + + + + If true the file path will include the file's extension. + + + + + Gets or sets a value indicating whether the path should be read only. + + + + + FolderPath is used on string properties, and provides an interface for directory paths. + + + The following example demonstrates how FolderPath is used. + + public class FolderPathExamples : MonoBehaviour + { + // By default, FolderPath provides a path relative to the Unity project. + [FolderPath] + public string UnityProjectPath; + + // It is possible to provide custom parent patn. ParentFolder paths can be relative to the Unity project, or absolute. + [FolderPath(ParentFolder = "Assets/Plugins/Sirenix")] + public string RelativeToParentPath; + + // Using ParentFolder, FolderPath can also provide a path relative to a resources folder. + [FolderPath(ParentFolder = "Assets/Resources")] + public string ResourcePath; + + // By setting AbsolutePath to true, the FolderPath will provide an absolute path instead. + [FolderPath(AbsolutePath = true)] + public string AbsolutePath; + + // FolderPath can also be configured to show an error, if the provided path is invalid. + [FolderPath(RequireValidPath = true)] + public string ValidPath; + + // By default, FolderPath will enforce the use of forward slashes. It can also be configured to use backslashes instead. + [FolderPath(UseBackslashes = true)] + public string Backslashes; + + // FolderPath also supports member references with the $ symbol. + [FolderPath(ParentFolder = "$DynamicParent")] + public string DynamicFolderPath; + + public string DynamicParent = "Assets/Plugins/Sirenix"; + } + + + + + + + + If true the FolderPath will provide an absolute path, instead of a relative one. + + + + + ParentFolder provides an override for where the path is relative to. ParentFolder can be relative to the Unity project, or an absolute path. + Supports member referencing with $. + + + + + If true an error will be displayed for invalid, or missing paths. + + + + + If true an error will be displayed for non-existing paths. + + + + + By default FolderPath enforces forward slashes. Set UseBackslashes to true if you want backslashes instead. + + + + + FoldoutGroup is used on any property, and organizes properties into a foldout. + Use this to organize properties, and to allow the user to hide properties that are not relevant for them at the moment. + + + The following example shows how FoldoutGroup is used to organize properties into a foldout. + + public class MyComponent : MonoBehaviour + { + [FoldoutGroup("MyGroup")] + public int A; + + [FoldoutGroup("MyGroup")] + public int B; + + [FoldoutGroup("MyGroup")] + public int C; + } + + + + The following example shows how properties can be organizes into multiple foldouts. + + public class MyComponent : MonoBehaviour + { + [FoldoutGroup("First")] + public int A; + + [FoldoutGroup("First")] + public int B; + + [FoldoutGroup("Second")] + public int C; + } + + + + + + + + + + + Gets a value indicating whether or not the foldout should be expanded by default. + + + + + Gets a value indicating whether or not the Expanded property has been set. + + + + + Adds the property to the specified foldout group. + + Name of the foldout group. + The order of the group in the inspector. + + + + Adds the property to the specified foldout group. + + Name of the foldout group. + Whether or not the foldout should be expanded by default. + The order of the group in the inspector. + + + + Combines the foldout property with another. + + The group to combine with. + + + + GUIColor is used on any property and changes the GUI color used to draw the property. + + + The following example shows how GUIColor is used on a properties to create a rainbow effect. + + public class MyComponent : MonoBehaviour + { + [GUIColor(1f, 0f, 0f)] + public int A; + + [GUIColor(1f, 0.5f, 0f, 0.2f)] + public int B; + + [GUIColor("GetColor")] + public int C; + + private Color GetColor() { return this.A == 0 ? Color.red : Color.white; } + } + + + + + + The GUI color of the property. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Sets the GUI color for the property. + + The red channel. + The green channel. + The blue channel. + The alpha channel. + + + + Sets the GUI color for the property. + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). + + + + Indicates that Odin should hide the reference box, if this property would otherwise be drawn as a reference to another property, due to duplicate reference values being encountered. + Note that if the value is referencing itself recursively, then the reference box will be drawn regardless of this attribute in all recursive draw calls. + + + + + HideIf is used on any property and can hide the property in the inspector. + Use this to hide irrelevant properties based on the current state of the object. + + + This example shows a component with fields hidden by the state of another field. + + public class MyComponent : MonoBehaviour + { + public bool HideProperties; + + [HideIf("HideProperties")] + public int MyInt; + + [HideIf("HideProperties", false)] + public string MyString; + + public SomeEnum SomeEnumField; + + [HideIf("SomeEnumField", SomeEnum.SomeEnumMember)] + public string SomeString; + } + + + + This example shows a component with a field that is hidden when the game object is inactive. + + public class MyComponent : MonoBehaviour + { + [HideIf("MyVisibleFunction")] + public int MyHideableField; + + private bool MyVisibleFunction() + { + return !this.gameObject.activeInHierarchy; + } + } + + + + + + + + + The name of a bool member field, property or method. Obsolete; use the Condition member instead. + + + + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + + The optional condition value. + + + + + Whether or not to slide the property in and out when the state changes. + + + + + Hides a property in the inspector, based on the value of a resolved string. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + Whether or not to slide the property in and out when the state changes. + + + + Hides a property in the inspector, if the resolved string evaluates to the specified value. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + Value to check against. + Whether or not to slide the property in and out when the state changes. + + + +

HideIfGroup allows for showing or hiding a group of properties based on a condition.

+

The attribute is a group attribute and can therefore be combined with other group attributes, and even be used to show or hide entire groups.

+

Note that in the vast majority of cases where you simply want to be able to control the visibility of a single group, it is better to use the VisibleIf parameter that *all* group attributes have.

+
+ + + + + +
+ + + Whether or not to visually animate group visibility changes. + + + + + The optional member value. + + + + + Name of member to use when to hide the group. Defaults to the name of the group, by can be overriden by setting this property. + + + + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + + Makes a group that can be shown or hidden based on a condition. + + The group path. + If true then a fade animation will be played when the group is hidden or shown. + + + + Makes a group that can be shown or hidden based on a condition. + + The group path. + The value the member should equal for the property to shown. + If true then a fade animation will be played when the group is hidden or shown. + + + + Combines HideIfGroup attributes. + + Another ShowIfGroup attribute. + + + + Hides a member based on which type of a prefab and instance it is in. + + + + + HideInEditorMode is used on any property, and hides the property when not in play mode. + Use this when you only want a property to only be visible play mode. + + + The following example shows how HideInEditorMode is used to hide a property when in the editor. + + public class MyComponent : MonoBehaviour + { + [HideInEditorMode] + public int MyInt; + } + + + + + + + + + + Hides a property if it is drawn within an . + + + + + Hides a property if it is drawn from a non prefab instance or asset. + + + + + HideInPlayMode is used on any property, and hides the property when not in editor mode. + Use this when you only want a property to only be visible the editor. + + + The following example shows how HideInPlayMode is used to hide a property when in play mode. + + public class MyComponent : MonoBehaviour + { + [HideInPlayMode] + public int MyInt; + } + + + + + + + + + + Hides a property if it is drawn from a prefab asset. + + + + + Hides a property if it is drawn from a prefab instance. + + + + + Hides a property if it is drawn from a prefab instance or a prefab asset. + + + + + The HideInTables attribute is used to prevent members from showing up as columns in tables drawn using the . + + + + + HideLabel is used on any property, and hides the label in the inspector. + Use this to hide the label of properties in the inspector. + + + The following example show how HideLabel is used to hide the label of a game object property. + + public class MyComponent : MonoBehaviour + { + [HideLabel] + public GameObject MyGameObjectWithoutLabel; + } + + + + + + + Apply HideMonoScript to your class to prevent the Script property from being shown in the inspector. + + This attribute has the same effect on a single type that the global configuration option "Show Mono Script In Editor" in "Preferences -> Odin Inspector -> General -> Drawers" has globally when disabled. + + + + The following example shows how to use this attribute. + + [HideMonoScript] + public class MyComponent : MonoBehaviour + { + // The Script property will not be shown for this component in the inspector + } + + + + + + + Apply HideNetworkBehaviourFields to your class to prevent the special "Network Channel" and "Network Send Interval" properties from being shown in the inspector for a NetworkBehaviour. + This attribute has no effect on classes that are not derived from NetworkBehaviour. + + + The following example shows how to use this attribute. + + [HideNetworkBehaviourFields] + public class MyComponent : NetworkBehaviour + { + // The "Network Channel" and "Network Send Interval" properties will not be shown for this component in the inspector + } + + + + + + + Hides the polymorphic object-picker shown above the properties of non-Unity serialized reference types. + + + When the object picker is hidden, you can right click and set the instance to null, in order to set a new value. + If you don't want this behavior, you can use attribute to ensure people can't change the value. + + + + + public class MyComponent : SerializedMonoBehaviour + { + [Header("Hidden Object Pickers")] + [Indent] + [HideReferenceObjectPicker] + public MyCustomReferenceType OdinSerializedProperty1; + + [Indent] + [HideReferenceObjectPicker] + public MyCustomReferenceType OdinSerializedProperty2; + + [Indent] + [Header("Shown Object Pickers")] + public MyCustomReferenceType OdinSerializedProperty3; + + [Indent] + public MyCustomReferenceType OdinSerializedProperty4; + + public class MyCustomReferenceType + { + public int A; + public int B; + public int C; + } + } + + + + + + HorizontalGroup is used group multiple properties horizontally in the inspector. + The width can either be specified as percentage or pixels. + All values between 0 and 1 will be treated as a percentage. + If the width is 0 the column will be automatically sized. + Margin-left and right can only be specified in pixels. + + + The following example shows how three properties have been grouped together horizontally. + + // The width can either be specified as percentage or pixels. + // All values between 0 and 1 will be treated as a percentage. + // If the width is 0 the column will be automatically sized. + // Margin-left and right can only be specified in pixels. + + public class HorizontalGroupAttributeExamples : MonoBehaviour + { + [HorizontalGroup] + public int A; + + [HideLabel, LabelWidth (150)] + [HorizontalGroup(150)] + public LayerMask B; + + // LabelWidth can be helpfull when dealing with HorizontalGroups. + [HorizontalGroup("Group 1"), LabelWidth(15)] + public int C; + + [HorizontalGroup("Group 1"), LabelWidth(15)] + public int D; + + [HorizontalGroup("Group 1"), LabelWidth(15)] + public int E; + + // Having multiple properties in a column can be achived using multiple groups. Checkout the "Combining Group Attributes" example. + [HorizontalGroup("Split", 0.5f, PaddingRight = 15)] + [BoxGroup("Split/Left"), LabelWidth(15)] + public int L; + + [BoxGroup("Split/Right"), LabelWidth(15)] + public int M; + + [BoxGroup("Split/Left"), LabelWidth(15)] + public int N; + + [BoxGroup("Split/Right"), LabelWidth(15)] + public int O; + + // Horizontal Group also has supprot for: Title, MarginLeft, MarginRight, PaddingLeft, PaddingRight, MinWidth and MaxWidth. + [HorizontalGroup("MyButton", MarginLeft = 0.25f, MarginRight = 0.25f)] + public void SomeButton() + { + + } + } + + + + + + + + + + + The width. Values between 0 and 1 will be treated as percentage, 0 = auto, otherwise pixels. + + + + + The margin left. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + + + The margin right. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + + + The padding left. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + + + The padding right. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + + + The minimum Width. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + + + The maximum Width. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + + + The width between each column. Values between 0 and 1 will be treated as percentage, otherwise pixels. + + + + + Adds a title above the horizontal group. + + + + + Fallback to using the default label width, whatever that might be. + + + + + The label width, 0 = auto. + + + + + Organizes the property in a horizontal group. + + The group for the property. + The width of the property. Values between 0 and 1 are interpolated as a percentage, otherwise pixels. + The left margin in pixels. + The right margin in pixels. + The order of the group in the inspector. + + + + Organizes the property in a horizontal group. + + The width of the property. Values between 0 and 1 are interpolated as a percentage, otherwise pixels. + The left margin in pixels. + The right margin in pixels. + The order of the group in the inspector. + + + + Merges the values of two group attributes together. + + The other group to combine with. + + + + Indent is used on any property and moves the property's label to the right. + Use this to clearly organize properties in the inspector. + + + The following example shows how a property is indented by Indent. + + public class MyComponent : MonoBehaviour + { + [Indent] + public int IndentedInt; + } + + + + + + Indicates how much a property should be indented. + + + + + Indents a property in the inspector. + + How much a property should be indented. + + + + InfoBox is used on any property, and display a text box above the property in the inspector. + Use this to add comments or warn about the use of different properties. + + + The following example shows different info box types. + + public class MyComponent : MonoBehaviour + { + [InfoBox("This is an int property")] + public int MyInt; + + [InfoBox("This info box is a warning", InfoMessageType.Warning)] + public float MyFloat; + + [InfoBox("This info box is an error", InfoMessageType.Error)] + public object MyObject; + + [InfoBox("This info box is just a box", InfoMessageType.None)] + public Vector3 MyVector; + } + + + + The following example how info boxes can be hidden by fields and properties. + + public class MyComponent : MonoBehaviour + { + [InfoBox("This info box is hidden by an instance field.", "InstanceShowInfoBoxField")] + public int MyInt; + public bool InstanceShowInfoBoxField; + + [InfoBox("This info box is hideable by a static field.", "StaticShowInfoBoxField")] + public float MyFloat; + public static bool StaticShowInfoBoxField; + + [InfoBox("This info box is hidden by an instance property.", "InstanceShowInfoBoxProperty")] + public int MyOtherInt; + public bool InstanceShowInfoBoxProperty { get; set; } + + [InfoBox("This info box is hideable by a static property.", "StaticShowInfoBoxProperty")] + public float MyOtherFloat; + public static bool StaticShowInfoBoxProperty { get; set; } + } + + + + The following example shows how info boxes can be hidden by functions. + + public class MyComponent : MonoBehaviour + { + [InfoBox("This info box is hidden by an instance function.", "InstanceShowFunction")] + public int MyInt; + public bool InstanceShowFunction() + { + return this.MyInt == 0; + } + + [InfoBox("This info box is hidden by a static function.", "StaticShowFunction")] + public short MyShort; + public bool StaticShowFunction() + { + return true; + } + + // You can also specify a function with the same type of parameter. + // Use this to specify the same function, for multiple different properties. + [InfoBox("This info box is hidden by an instance function with a parameter.", "InstanceShowParameterFunction")] + public GameObject MyGameObject; + public bool InstanceShowParameterFunction(GameObject property) + { + return property != null; + } + + [InfoBox("This info box is hidden by a static function with a parameter.", "StaticShowParameterFunction")] + public Vector3 MyVector; + public bool StaticShowParameterFunction(Vector3 property) + { + return property.magnitude == 0f; + } + } + + + + + + + + The message to display in the info box. + + + + + The type of the message box. + + + + + Optional member field, property or function to show and hide the info box. + + + + + When true the InfoBox will ignore the GUI.enable flag and always draw as enabled. + + + + + The icon to be displayed next to the message. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Displays an info box above the property. + + The message for the message box. Supports referencing a member string field, property or method by using $. + The type of the message box. + Name of member bool to show or hide the message box. + + + + Displays an info box above the property. + + The message for the message box. Supports referencing a member string field, property or method by using $. + Name of member bool to show or hide the message box. + + + + Displays an info box above the property. + + The message for the message box. Supports referencing a member string field, property or method by using $. + The icon to be displayed next to the message. + Name of member bool to show or hide the message box. + + + + The inline button adds a button to the end of a property. + + + Due to a bug, multiple inline buttons are currently not supported. + + + The following examples demonstrates how InlineButton can be used. + + public class MyComponent : MonoBehaviour + { + // Adds a button to the end of the A property. + [InlineButton("MyFunction")] + public int A; + + // This is example demonstrates how you can change the label of the button. + // InlineButton also supports refering to string members with $. + [InlineButton("MyFunction", "Button")] + public int B; + + private void MyFunction() + { + // ... + } + } + + + + + + + + Name of member method to call when the button is clicked. Obsolete; use the Action member instead. + + + + + A resolved string that defines the action to perform when the button is clicked, such as an expression or method invocation. + + + + + Optional label of the button. + + + + + Optional resolved string that specifies a condition for whether to show the inline button or not. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Draws a button to the right of the property. + + A resolved string that defines the action to perform when the button is clicked, such as an expression or method invocation. + Optional label of the button. + + + + Draws a button to the right of the property. + + A resolved string that defines the action to perform when the button is clicked, such as an expression or method invocation. + The icon to be shown inside the button. + Optional label of the button. + + + + InlineAttribute is used on any property or field with a type that inherits from UnityEngine.Object. This includes components and assets etc. + + + + public class InlineEditorExamples : MonoBehaviour + { + [DisableInInlineEditors] + public Vector3 DisabledInInlineEditors; + + [HideInInlineEditors] + public Vector3 HiddenInInlineEditors; + + [InlineEditor] + public Transform InlineComponent; + + [InlineEditor(InlineEditorModes.FullEditor)] + public Material FullInlineEditor; + + [InlineEditor(InlineEditorModes.GUIAndHeader)] + public Material InlineMaterial; + + [InlineEditor(InlineEditorModes.SmallPreview)] + public Material[] InlineMaterialList; + + [InlineEditor(InlineEditorModes.LargePreview)] + public GameObject InlineObjectPreview; + + [InlineEditor(InlineEditorModes.LargePreview)] + public Mesh InlineMeshPreview; + } + + + + + + + + If true, the inline editor will start expanded. + + + + + Draw the header editor header inline. + + + + + Draw editor GUI inline. + + + + + Draw editor preview inline. + + + + + Maximum height of the inline editor. If the inline editor exceeds the specified height, a scrollbar will appear. + Values less or equals to zero will let the InlineEditor expand to its full size. + + + + + The size of the editor preview if drawn together with GUI. + + + + + The size of the editor preview if drawn alone. + + + + + If false, this will prevent the InlineEditor attribute from incrementing the InlineEditorAttributeDrawer.CurrentInlineEditorDrawDepth. + This is helpful in cases where you want to draw the entire editor, and disregard attributes + such as [] and []. + + + + + How the InlineEditor attribute drawer should draw the object field. + + + + + Whether to set GUI.enabled = false when drawing an editor for an asset that is locked by source control. Defaults to true. + + + + + Where to draw the preview. + + + + + Initializes a new instance of the class. + + The inline editor mode. + How the object field should be drawn. + + + + Initializes a new instance of the class. + + How the object field should be drawn. + + + + The Inline Property is used to place the contents of a type next to the label, instead of being rendered in a foldout. + + + + public class InlinePropertyExamples : MonoBehaviour + { + public Vector3 Vector3; + + public Vector3Int Vector3Int; + + [InlineProperty(LabelWidth = 12)] // It can be placed on classes as well as members + public Vector2Int Vector2Int; + + } + + [Serializable] + [InlineProperty(LabelWidth = 12)] // It can be placed on classes as well as members + public struct Vector3Int + { + [HorizontalGroup] + public int X; + + [HorizontalGroup] + public int Y; + + [HorizontalGroup] + public int Z; + } + + [Serializable] + public struct Vector2Int + { + [HorizontalGroup] + public int X; + + [HorizontalGroup] + public int Y; + } + + + + + + + Specify a label width for all child properties. + + + + + LabelText is used to change the labels of properties. + Use this if you want a different label than the name of the property. + + + The following example shows how LabelText is applied to a few property fields. + + public MyComponent : MonoBehaviour + { + [LabelText("1")] + public int MyInt1; + + [LabelText("2")] + public int MyInt2; + + [LabelText("3")] + public int MyInt3; + } + + + + + + + The new text of the label. + + + + + Whether the label text should be nicified before it is displayed, IE, "m_someField" becomes "Some Field". + If the label text is resolved via a member reference, an expression, or the like, then the evaluated result + of that member reference or expression will be nicified. + + + + + The icon to be displayed. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Give a property a custom label. + + The new text of the label. + + + + Give a property a custom icon. + + The icon to be shown next to the property. + + + + Give a property a custom label. + + The new text of the label. + Whether to nicify the label text. + + + + Give a property a custom label with a custom icon. + + The new text of the label. + The icon to be displayed. + + + + Give a property a custom label with a custom icon. + + The new text of the label. + Whether to nicify the label text. + The icon to be displayed. + + + + LabelWidth is used to change the width of labels for properties. + + + The following example shows how LabelText is applied to a few property fields. + + public MyComponent : MonoBehaviour + { + [LabelWidth("3")] + public int MyInt3; + } + + + + + + + The new text of the label. + + + + + Give a property a custom label. + + The width of the label. + + + + Customize the behavior for lists and arrays in the inspector. + + + This example shows how you can add your own custom add button to a list. + + [ListDrawerSettings(HideAddButton = true, OnTitleBarGUI = "DrawTitleBarGUI")] + public List<MyType> SomeList; + + #if UNITY_EDITOR + private void DrawTitleBarGUI() + { + if (SirenixEditorGUI.ToolbarButton(EditorIcons.Plus)) + { + this.SomeList.Add(new MyType()); + } + } + #endif + + + + This attribute is scheduled for refactoring. + + + + + If true, the add button will not be rendered in the title toolbar. You can use OnTitleBarGUI to implement your own add button. + + + true if [hide add button]; otherwise, false. + + + + + If true, the remove button will not be rendered on list items. You can use OnBeginListElementGUI and OnEndListElementGUI to implement your own remove button. + + + true if [hide remove button]; otherwise, false. + + + + + Specify the name of a member inside each list element which defines the label being drawn for each list element. + + + + + Override the default behaviour for adding objects to the list. + If the referenced member returns the list type element, it will be called once per selected object. + If the referenced method returns void, it will only be called once regardless of how many objects are selected. + + + + + Calls a method before each list element. The member referenced must have a return type of void, and an index parameter of type int which represents the element index being drawn. + + + + + Calls a method after each list element. The member referenced must have a return type of void, and an index parameter of type int which represents the element index being drawn. + + + + + If true, object/type pickers will never be shown when the list add button is clicked, and default(T) will always be added instantly instead, where T is the element type of the list. + + + + + Whether adding a new element should copy the last element. False by default. + + + + A resolved string with "int index" and "Color defaultColor" parameters that lets you control the color of individual elements. Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Override the default setting specified in the Advanced Odin Preferences window and explicitly tell whether paging should be enabled or not. + + + + + Override the default setting specified in the Advanced Odin Preferences window and explicitly tell whether items should be draggable or not. + + + + + Override the default setting specified in the Advanced Odin Preferences window and explicitly tells how many items each page should contain. + + + + + Mark a list as read-only. This removes all editing capabilities from the list such as Add, Drag and delete, + but without disabling GUI for each element drawn as otherwise would be the case if the was used. + + + + + Override the default setting specified in the Advanced Odin Preferences window and explicitly tell whether or not item count should be shown. + + + + + Whether to show a foldout for the collection or not. If this is set to false, the collection will *always* be expanded. + + + + + Whether to show a foldout for the collection or not. If this is set to false, the collection will *always* be expanded. + + This documentation used to wrongly state that this value would override the default setting specified in the Advanced Odin Preferences + window and explicitly tell whether or not the list should be expanded or collapsed by default. This value *would* do that, but it would + also simultaneously act as ShowFoldout, leading to weird and unintuitive behaviour. + + + + + + Override the default setting specified in the Odin Preferences window and explicitly tell whether or not the list should be expanded or collapsed by default. + Note that this will override the persisted expand state, as this is set *every time* the collection drawer is initialized. + + + + + If true, a label is drawn for each element which shows the index of the element. + + + + + Use this to inject custom GUI into the title-bar of the list. + + + + + Whether the Paging property is set. + + + + + Whether the ShowItemCount property is set. + + + + + Whether the NumberOfItemsPerPage property is set. + + + + + Whether the Draggable property is set. + + + + + Whether the IsReadOnly property is set. + + + + + Whether the ShowIndexLabels property is set. + + + + + Whether the DefaultExpandedState property is set. + + + + + MaxValue is used on primitive fields. It caps value of the field to a maximum value. + Use this to define a maximum value for the field. + + + Note that this attribute only works in the editor! Values changed from scripting will not be capped at a maximum. + + + The following example shows a component where a speed value must be less than or equal to 200. + + public class Car : MonoBehaviour + { + // The speed of the car must be less than or equal to 200. + [MaxValue(200)] + public float Speed; + } + + + + The following example shows how MaxValue can be combined with . + + public class Health : MonoBehaviour + { + // The speed value must be between 0 and 200. + [MinValue(0), MaxValue(200)] + public float Speed; + } + + + + + + + The maximum value for the property. + + + + + The string with which to resolve a maximum value. This could be a field, property or method name, or an expression. + + + + + Sets a maximum value for the property in the inspector. + + The max value. + + + + Sets a maximum value for the property in the inspector. + + The string with which to resolve a maximum value. This could be a field, property or method name, or an expression. + + + + Draw a special slider the user can use to specify a range between a min and a max value. + Uses a Vector2 where x is min and y is max. + + + The following example shows how MinMaxSlider is used. + + public class Player : MonoBehaviour + { + [MinMaxSlider(4, 5)] + public Vector2 SpawnRadius; + } + + + + + + The hardcoded min value for the slider. + + + + + The hardcoded max value for the slider. + + + + + The name of a field, property or method to get the min value from. Obsolete; use MinValueGetter instead. + + + + + A resolved string that should evaluate to a float value, which is used as the min bounds. + + + + + The name of a field, property or method to get the max value from. Obsolete; use MaxValueGetter instead. + + + + + A resolved string that should evaluate to a float value, which is used as the max bounds. + + + + + The name of a Vector2 field, property or method to get the min max values from. Obsolete; use MinMaxValueGetter instead. + + + + + A resolved string that should evaluate to a Vector2 value, which is used as the min/max bounds. If this is non-null, it overrides the behaviour of the MinValue, MinValueGetter, MaxValue and MaxValueGetter members. + + + + + Draw float fields for min and max value. + + + + + Draws a min-max slider in the inspector. X will be set to min, and Y will be set to max. + + The min value. + The max value. + If true number fields will drawn next to the MinMaxSlider. + + + + Draws a min-max slider in the inspector. X will be set to min, and Y will be set to max. + + A resolved string that should evaluate to a float value, which is used as the min bounds. + The max value. + If true number fields will drawn next to the MinMaxSlider. + + + + Draws a min-max slider in the inspector. X will be set to min, and Y will be set to max. + + The min value. + A resolved string that should evaluate to a float value, which is used as the max bounds. + If true number fields will drawn next to the MinMaxSlider. + + + + Draws a min-max slider in the inspector. X will be set to min, and Y will be set to max. + + A resolved string that should evaluate to a float value, which is used as the min bounds. + A resolved string that should evaluate to a float value, which is used as the max bounds. + If true number fields will drawn next to the MinMaxSlider. + + + + Draws a min-max slider in the inspector. X will be set to min, and Y will be set to max. + + A resolved string that should evaluate to a Vector2 value, which is used as the min/max bounds. If this is non-null, it overrides the behaviour of the MinValue, MinValueGetter, MaxValue and MaxValueGetter members. + If true number fields will drawn next to the MinMaxSlider. + + + + MinValue is used on primitive fields. It caps value of the field to a minimum value. + Use this to define a minimum value for the field. + + + Note that this attribute only works in the editor! Values changed from scripting will not be capped at a minimum. + + + The following example shows a player component that must have at least 1 life. + + public class Player : MonoBehaviour + { + // The life value must be set to at least 1. + [MinValue(1)] + public int Life; + } + + + + The following example shows how MinValue can be combined with + + public class Health : MonoBehaviour + { + // The health value must be between 0 and 100. + [MinValue(0), MaxValue(100)] + public float Health; + } + + + + + + + The minimum value for the property. + + + + + The string with which to resolve a minimum value. This could be a field, property or method name, or an expression. + + + + + Sets a minimum value for the property in the inspector. + + The minimum value. + + + + Sets a minimum value for the property in the inspector. + + The string with which to resolve a minimum value. This could be a field, property or method name, or an expression. + + + + MultiLineProperty is used on any string property. + Use this to allow users to edit strings in a multi line textbox. + + + MultiLineProperty is similar to Unity's but can be applied to both fields and properties. + + + The following example shows how MultiLineProperty is applied to properties. + + public class MyComponent : MonoBehaviour + { + [MultiLineProperty] + public string MyString; + + [ShowInInspector, MultiLineProperty(10)] + public string PropertyString; + } + + + + + + The number of lines for the text box. + + + + + Makes a multiline textbox for editing strings. + + The number of lines for the text box. + + + + + OnCollectionChanged can be put on collections, and provides an event callback when the collection is about to be changed through the inspector, + and when the collection has been changed through the inspector. Additionally, it provides a CollectionChangeInfo struct containing information + about the exact changes made to the collection. This attribute works for all collections with a collection resolver, amongst them arrays, lists, + dictionaries, hashsets, stacks and linked lists. + + + + Note that this attribute only works in the editor! Collections changed by script will not trigger change events! + + + The following example shows how OnCollectionChanged can be used to get callbacks when a collection is being changed. + + [OnCollectionChanged("Before", "After")] + public List<string> list; + + public void Before(CollectionChangeInfo info) + { + if (info.ChangeType == CollectionChangeType.Add || info.ChangeType == CollectionChangeType.Insert) + { + Debug.Log("Adding to the list!"); + } + else if (info.ChangeType == CollectionChangeType.RemoveIndex || info.ChangeType == CollectionChangeType.RemoveValue) + { + Debug.Log("Removing from the list!"); + } + } + + public void After(CollectionChangeInfo info) + { + if (info.ChangeType == CollectionChangeType.Add || info.ChangeType == CollectionChangeType.Insert) + { + Debug.Log("Finished adding to the list!"); + } + else if (info.ChangeType == CollectionChangeType.RemoveIndex || info.ChangeType == CollectionChangeType.RemoveValue) + { + Debug.Log("Finished removing from the list!"); + } + } + + + + + + The OnInspectorDispose attribute takes in an action string as an argument (typically the name of a method to be invoked, or an expression to be executed), and executes that action when the property's drawers are disposed in the inspector. + Disposing will happen at least once, when the inspector changes selection or the property tree is collected by the garbage collector, but may also happen several times before that, most often when the type of a polymorphic property changes and it refreshes its drawer setup and recreates all its children, disposing of the old setup and children. + + + The following example demonstrates how OnInspectorDispose works. + + public class MyComponent : MonoBehaviour + { + [OnInspectorDispose(@"@UnityEngine.Debug.Log(""Dispose event invoked!"")")] + [ShowInInspector, InfoBox("When you change the type of this field, or set it to null, the former property setup is disposed. The property setup will also be disposed when you deselect this example."), DisplayAsString] + public BaseClass PolymorphicField; + + public abstract class BaseClass { public override string ToString() { return this.GetType().Name; } } + public class A : BaseClass { } + public class B : BaseClass { } + public class C : BaseClass { } + } + + + + + + This constructor should be used when the attribute is placed directly on a method. + + + + + This constructor should be used when the attribute is placed on a non-method member. + + + + + OnInspectorGUI is used on any property, and will call the specified function whenever the inspector code is running. + Use this to create custom inspector GUI for an object. + + + + + public MyComponent : MonoBehaviour + { + [OnInspectorGUI] + private void MyInspectorGUI() + { + GUILayout.Label("Label drawn from callback"); + } + } + + + + The following example shows how a callback can be set before another property. + + public MyComponent : MonoBehaviour + { + [OnInspectorGUI("MyInspectorGUI", false)] + public int MyField; + + private void MyInspectorGUI() + { + GUILayout.Label("Label before My Field property"); + } + } + + + + The following example shows how callbacks can be added both before and after a property. + + public MyComponent : MonoBehaviour + { + [OnInspectorGUI("GUIBefore", "GUIAfter")] + public int MyField; + + private void GUIBefore() + { + GUILayout.Label("Label before My Field property"); + } + + private void GUIAfter() + { + GUILayout.Label("Label after My Field property"); + } + } + + + + + + The resolved action string that defines the action to be invoked before the property is drawn, if any. + + + + + The resolved action string that defines the action to be invoked after the property is drawn, if any. + + + + + The name of the method to be called before the property is drawn, if any. Obsolete; use the Prepend member instead. + + + + + The name of the method to be called after the property is drawn, if any. Obsolete; use the Append member instead. + + + + + Calls a function decorated with this attribute, when the inspector is being drawn. + + + + + Adds callbacks to the specified action when the property is being drawn. + + The resolved action string that defines the action to be invoked. + If true the method will be called after the property has been drawn. Otherwise the method will be called before. + + + + Adds callbacks to the specified actions when the property is being drawn. + + The resolved action string that defines the action to be invoked before the property is drawn, if any. + The resolved action string that defines the action to be invoked after the property is drawn, if any. + + + + The OnInspectorInit attribute takes in an action string as an argument (typically the name of a method to be invoked, or an expression to be executed), and executes that action when the property's drawers are initialized in the inspector. + Initialization will happen at least once during the first drawn frame of any given property, but may also happen several times later, most often when the type of a polymorphic property changes and it refreshes its drawer setup and recreates all its children. + + + The following example demonstrates how OnInspectorInit works. + + public class MyComponent : MonoBehaviour + { + // Display current time for reference. + [ShowInInspector, DisplayAsString, PropertyOrder(-1)] + public string CurrentTime { get { GUIHelper.RequestRepaint(); return DateTime.Now.ToString(); } } + + // OnInspectorInit executes the first time this string is about to be drawn in the inspector. + // It will execute again when the example is reselected. + [OnInspectorInit("@TimeWhenExampleWasOpened = DateTime.Now.ToString()")] + public string TimeWhenExampleWasOpened; + + // OnInspectorInit will not execute before the property is actually "resolved" in the inspector. + // Remember, Odin's property system is lazily evaluated, and so a property does not actually exist + // and is not initialized before something is actually asking for it. + // + // Therefore, this OnInspectorInit attribute won't execute until the foldout is expanded. + [FoldoutGroup("Delayed Initialization", Expanded = false, HideWhenChildrenAreInvisible = false)] + [OnInspectorInit("@TimeFoldoutWasOpened = DateTime.Now.ToString()")] + public string TimeFoldoutWasOpened; + } + + + + + + This constructor should be used when the attribute is placed directly on a method. + + + + + This constructor should be used when the attribute is placed on a non-method member. + + + + + + OnStateUpdate provides an event callback when the property's state should be updated, when the StateUpdaters run on the property instance. + This generally happens at least once per frame, and the callback will be invoked even when the property is not visible. This can be used to + approximate custom StateUpdaters like [ShowIf] without needing to make entire attributes and StateUpdaters for one-off cases. + + + + The following example shows how OnStateUpdate can be used to control the visible state of a property. + + public class MyComponent : MonoBehaviour + { + [OnStateUpdate("@$property.State.Visible = ToggleMyInt")] + public int MyInt; + + public bool ToggleMyInt; + } + + + + The following example shows how OnStateUpdate can be used to control the expanded state of a list. + + public class MyComponent : MonoBehaviour + { + [OnStateUpdate("@$property.State.Expanded = ExpandList")] + public List<string> list; + + public bool ExpandList; + } + + The following example shows how OnStateUpdate can be used to control the state of another property. + + public class MyComponent : MonoBehaviour + { + public List>string< list; + + [OnStateUpdate("@#(list).State.Expanded = $value")] + public bool ExpandList; + } + + + + + + + OnValueChanged works on properties and fields, and calls the specified function + whenever the value has been changed via the inspector. + + + + Note that this attribute only works in the editor! Properties changed by script will not call the function. + + + The following example shows how OnValueChanged is used to provide a callback for a property. + + public class MyComponent : MonoBehaviour + { + [OnValueChanged("MyCallback")] + public int MyInt; + + private void MyCallback() + { + // .. + } + } + + + + The following example show how OnValueChanged can be used to get a component from a prefab property. + + public class MyComponent : MonoBehaviour + { + [OnValueChanged("OnPrefabChange")] + public GameObject MyPrefab; + + // RigidBody component of MyPrefab. + [SerializeField, HideInInspector] + private RigidBody myPrefabRigidbody; + + private void OnPrefabChange() + { + if(MyPrefab != null) + { + myPrefabRigidbody = MyPrefab.GetComponent<Rigidbody>(); + } + else + { + myPrefabRigidbody = null; + } + } + } + + + + + + Name of callback member function. Obsolete; use the Action member instead. + + + + + A resolved string that defines the action to perform when the value is changed, such as an expression or method invocation. + + + + + Whether to perform the action when a child value of the property is changed. + + + + + Whether to perform the action when an undo or redo event occurs via UnityEditor.Undo.undoRedoPerformed. True by default. + + + + + Whether to perform the action when the property is initialized. This will generally happen when the property is first viewed/queried (IE when the inspector is first opened, or when its containing foldout is first expanded, etc), and whenever its type or a parent type changes, or it is otherwise forced to rebuild. + + + + + Adds a callback for when the property's value is changed. + + A resolved string that defines the action to perform when the value is changed, such as an expression or method invocation. + Whether to perform the action when a child value of the property is changed. + + + + Overrides the 'Reference Required by Default' rule to allow for null values. + Has no effect if the rule is disabled. + + This attribute does not do anything unless you have Odin Validator and the 'Reference Required by Default' rule is enabled. + + + + + Specifies how non-default constructors are handled. + + + + + Excludes types with non default constructors from the Selector. + + + + + Attempts to find the most straightforward constructor to call, prioritizing default values. + + + + + Uses if no default constructor is found. + + + + + Logs a warning instead of constructing the object, indicating that an attempt was made to construct an object without a default constructor. + + + + + Determines whether the base type should be displayed in the drawer. + + + + + Indicates if the drawer should be read-only once a value is assigned. + + + + + Specifies how non-default constructors are handled. + + + + + Specifies a custom function for creating an instance of the selected . + + Does not get called for UnityEngine.Object types. + + + The resolver expects any method that takes a single parameter of , where the parameter is named 'type', and which returns an . + + + Implementation example: public object Method(Type type). + + + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + These object fields can also be selectively enabled and customized globally from the Odin preferences window. + + + + The following example shows how PreviewField is applied to a few property fields. + + public MyComponent : MonoBehaviour + { + [PreviewField] + public UnityEngine.Object SomeObject; + + [PreviewField] + public Texture SomeTexture; + + [HorizontalGroup, HideLabel, PreviewField(30)] + public Material A, B, C, D, F; + } + + + + + + + The height of the object field + + + + + The FilterMode to be used for the preview. + + + + + Left aligned. + + + + + Whether an alignment value is specified. + + + + + A resolved value that should resolve to the desired preview texture. + + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + The height of the preview field. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + A resolved value that should resolve to the desired preview texture. + The filter mode to be used for the preview texture. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + A resolved value that should resolve to the desired preview texture. + The height of the preview field. + The filter mode to be used for the preview texture. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + The height of the preview field. + The alignment of the preview field. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + A resolved value that should resolve to the desired preview texture. + The alignment of the preview field. + The filter mode to be used for the preview texture. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + A resolved value that should resolve to the desired preview texture. + The height of the preview field. + The alignment of the preview field. + The filter mode to be used for the preview texture. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + The alignment of the preview field. + + + + Draws a horizontal progress bar based on the value of the property. + Use it for displaying a meter to indicate how full an inventory is, or to make a visual indication of a health bar. + + + The following example shows how ProgressBar can be used. + + public class ProgressBarExample : MonoBehaviour + { + // Default progress bar. + [ProgressBar(0, 100)] + public int ProgressBar; + + // Health bar. + [ProgressBar(0, 100, ColorMember = "GetHealthBarColor")] + public float HealthBar = 50; + + private Color GetHealthBarColor(float value) + { + // Blends between red, and yellow color for when the health is below 30, + // and blends between yellow and green color for when the health is above 30. + return Color.Lerp(Color.Lerp( + Color.red, Color.yellow, MathUtilities.LinearStep(0f, 30f, value)), + Color.green, MathUtilities.LinearStep(0f, 100f, value)); + } + + // Stacked health bar. + // The ProgressBar attribute is placed on property, without a set method, so it can't be edited directly. + // So instead we have this Range attribute on a float to change the value. + [Range(0, 300)] + public float StackedHealth; + + [ProgressBar(0, 100, ColorMember = "GetStackedHealthColor", BackgroundColorMember = "GetStackHealthBackgroundColor")] + private float StackedHealthProgressBar + { + // Loops the stacked health value between 0, and 100. + get { return this.StackedHealth - 100 * (int)((this.StackedHealth - 1) / 100); } + } + + private Color GetStackedHealthColor() + { + return + this.StackedHealth > 200 ? Color.cyan : + this.StackedHealth > 100 ? Color.green : + Color.red; + } + + private Color GetStackHealthBackgroundColor() + { + return + this.StackedHealth > 200 ? Color.green : + this.StackedHealth > 100 ? Color.red : + new Color(0.16f, 0.16f, 0.16f, 1f); + } + + // Custom color and height. + [ProgressBar(-100, 100, r: 1, g: 1, b: 1, Height = 30)] + public short BigProgressBar = 50; + + // You can also reference members by name to dynamically assign the min and max progress bar values. + [ProgressBar("DynamicMin", "DynamicMax")] + public float DynamicProgressBar; + + public float DynamicMin, DynamicMax; + } + + + + + + + + + The minimum value. + + + + + The maximum value. + + + + + The name of a field, property or method to get the min values from. Obsolete; use the MinGetter member instead. + + + + + A resolved string that should evaluate to a float value, and will be used as the min bounds. + + + + + The name of a field, property or method to get the max values from. Obsolete; use the MaxGetter member instead. + + + + + A resolved string that should evaluate to a float value, and will be used as the max bounds. + + + + + The red channel of the color of the progress bar. + + + + + The green channel of the color of the progress bar. + + + + + The blue channel of the color of the progress bar. + + + + + The height of the progress bar in pixels. Defaults to 12 pixels. + + + + + Optional reference to a Color field, property or method, to dynamically change the color of the progress bar. Obsolete; use the ColorGetter member instead. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Optional reference to a Color field, property or method, to dynamically change the background color of the progress bar. + Default background color is (0.16, 0.16, 0.16, 1). + Obsolete; use the BackgroundColorGetter member instead. + + + + Optional resolved string that should evaluate to a Color value, to dynamically change the background color of the progress bar. Default background color is (0.16, 0.16, 0.16, 1). It supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + If true then the progress bar will be drawn in tiles. + + + + + References a member by name to get a custom value label string from. Obsolete; use the CustomValueStringGetter member instead. + + + + + A resolved string to get a custom value label string from. + + + + + Draws a progress bar for the value. + + The minimum value. + The maximum value. + The red channel of the color of the progress bar. + The green channel of the color of the progress bar. + The blue channel of the color of the progress bar. + + + + Draws a progress bar for the value. + + A resolved string that should evaluate to a float value, and will be used as the min bounds. + The maximum value. + The red channel of the color of the progress bar. + The green channel of the color of the progress bar. + The blue channel of the color of the progress bar. + + + + Draws a progress bar for the value. + + The minimum value. + A resolved string that should evaluate to a float value, and will be used as the max bounds. + The red channel of the color of the progress bar. + The green channel of the color of the progress bar. + The blue channel of the color of the progress bar. + + + + Draws a progress bar for the value. + + A resolved string that should evaluate to a float value, and will be used as the min bounds. + A resolved string that should evaluate to a float value, and will be used as the max bounds. + The red channel of the color of the progress bar. + The green channel of the color of the progress bar. + The blue channel of the color of the progress bar. + + + + If true then there will be drawn a value label on top of the progress bar. + + + + + Gets a value indicating if the user has set a custom DrawValueLabel value. + + + + + The alignment of the value label on top of the progress bar. Defaults to center. + + + + + Gets a value indicating if the user has set a custom ValueLabelAlignment value. + + + + + Attribute to derive from if you wish to create a new property group type, such as box groups or tab groups. + Note that this attribute has special behaviour for "combining" several attributes into one, as one group, + may be declared across attributes in several members, completely out of order. See . + + + All group attributes for a group with the same name (and of the same attribute type) are combined into a single representative group attribute using the method, which is called by the method. + This behaviour is a little unusual, but it is important that you understand it when creating groups with many custom parameters that may have to be combined. + + + This example shows how could be implemented. + + [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)] + public class BoxGroupAttribute : PropertyGroupAttribute + { + public string Label { get; private set; } + public bool ShowLabel { get; private set; } + public bool CenterLabel { get; private set; } + + public BoxGroupAttribute(string group, bool showLabel = true, bool centerLabel = false, float order = 0) + : base(group, order) + { + this.Label = group; + this.ShowLabel = showLabel; + this.CenterLabel = centerLabel; + } + + protected override void CombineValuesWith(PropertyGroupAttribute other) + { + // The given attribute parameter is *guaranteed* to be of type BoxGroupAttribute. + var attr = other as BoxGroupAttribute; + + // If this attribute has no label, we the other group's label, thus preserving the label across combines. + if (this.Label == null) + { + this.Label = attr.Label; + } + + // Combine ShowLabel and CenterLabel parameters. + this.ShowLabel |= attr.ShowLabel; + this.CenterLabel |= attr.CenterLabel; + } + } + + + + + + + + + + + The ID used to grouping properties together. + + + + + The name of the group. This is the last part of the group ID if there is a path, otherwise it is just the group ID. + + + + + The order of the group. + + + + + Whether to hide the group by default when all its children are not visible. True by default. + + + + + If not null, this resolved string controls the group's visibility. Note that if is true, there must be *both* a visible child *and* this condition must be true, before the group is shown. + + + + + Whether to animate the visibility changes of this group or make the visual transition instantly. True by default. + + + + + Initializes a new instance of the class. + + The group identifier. + The group order. + + + + Initializes a new instance of the class. + + The group identifier. + + + + Combines this attribute with another attribute of the same type. + This method invokes the virtual method to invoke custom combine logic. + All group attributes are combined to one attribute used by a single OdinGroupDrawer. + Example: protected override void CombineValuesWith(PropertyGroupAttribute other) { this.Title = this.Title ?? (other as MyGroupAttribute).Title; } + + The attribute to combine with. + The instance that the method was invoked on. + The argument 'other' was null. + + Attributes to combine are not of the same type. + or + PropertyGroupAttributes to combine must have the same group id. + + + + + Override this method to add custom combine logic to your group attribute. This method determines how your group's parameters combine when spread across multiple attribute declarations in the same class. + Remember, in .NET, member order is not guaranteed, so you never know which order your attributes will be combined in. + + The attribute to combine with. This parameter is guaranteed to be of the correct attribute type. + + This example shows how attributes are combined. + + protected override void CombineValuesWith(PropertyGroupAttribute other) + { + // The given attribute parameter is *guaranteed* to be of type BoxGroupAttribute. + var attr = other as BoxGroupAttribute; + + // If this attribute has no label, we the other group's label, thus preserving the label across combines. + if (this.Label == null) + { + this.Label = attr.Label; + } + + // Combine ShowLabel and CenterLabel parameters. + this.ShowLabel |= attr.ShowLabel; + this.CenterLabel |= attr.CenterLabel; + } + + + + + + PropertyOrder is used on any property, and allows for ordering of properties. + Use this to define in which order your properties are shown. + + + Lower order values will be drawn before higher values. + There is unfortunately no way of ensuring that properties are in the same order, as they appear in your class. PropertyOrder overcomes this. + + + The following example shows how PropertyOrder is used to order properties in the inspector. + + public class MyComponent : MonoBehaviour + { + [PropertyOrder(1)] + public int MySecondProperty; + + [PropertyOrder(-1)] + public int MyFirstProperty; + } + + + + + + The order for the property. + + + + + Initializes a new instance of the class. + + + + + Defines a custom order for the property. + + The order for the property. + + + + PropertyRange attribute creates a slider control to set the value of a property to between the specified range. + This is equivalent to Unity's Range attribute, but this attribute can be applied to both fields and property. + + The following example demonstrates how PropertyRange is used. + + public class MyComponent : MonoBehaviour + { + [PropertyRange(0, 100)] + public int MyInt; + + [PropertyRange(-100, 100)] + public float MyFloat; + + [PropertyRange(-100, -50)] + public decimal MyDouble; + + // This attribute also supports dynamically referencing members by name to assign the min and max values for the range field. + [PropertyRange("DynamicMin", "DynamicMax"] + public float MyDynamicValue; + + public float DynamicMin, DynamicMax; + } + + + + + + + + + The minimum value. + + + + + The maximum value. + + + + + The name of a field, property or method to get the min value from. Obsolete; use the MinGetter member instead. + + + + + A resolved string that should evaluate to a float value, and will be used as the min bounds. + + + + + The name of a field, property or method to get the max value from. Obsolete; use the MaxGetter member instead. + + + + + A resolved string that should evaluate to a float value, and will be used as the max bounds. + + + + + Creates a slider control to set the value of the property to between the specified range.. + + The minimum value. + The maximum value. + + + + Creates a slider control to set the value of the property to between the specified range.. + + A resolved string that should evaluate to a float value, and will be used as the min bounds. + The maximum value. + + + + Creates a slider control to set the value of the property to between the specified range.. + + The minimum value. + A resolved string that should evaluate to a float value, and will be used as the max bounds. + + + + Creates a slider control to set the value of the property to between the specified range.. + + A resolved string that should evaluate to a float value, and will be used as the min bounds. + A resolved string that should evaluate to a float value, and will be used as the max bounds. + + + + The PropertySpace attribute have the same function as Unity's existing Space attribute, but can be applied anywhere as opposed to just fields. + + + The following example demonstrates the usage of the PropertySpace attribute. + + [PropertySpace] // Defaults to a space of 8 pixels just like Unity's Space attribute. + public int MyField; + + [ShowInInspector, PropertySpace(16)] + public int MyProperty { get; set; } + + [ShowInInspector, PropertySpace(16, 16)] + public int MyProperty { get; set; } + + [Button, PropertySpace(32)] + public void MyMethod() + { + ... + } + + [PropertySpace(-8)] // A negative space can also be remove existing space between properties. + public int MovedUp; + + + + + + + + + + The space between properties in pixels. + + + + + The space between properties in pixels. + + + + + Adds a space of 8 pixels between properties. + + + + + Adds a space between properties. + + + + + Adds a space between properties. + + + + + PropertyTooltip is used on any property, and creates tooltips for when hovering the property in the inspector. + Use this to explain the purpose, or how to use a property. + + + This is similar to Unity's but can be applied to both fields and properties. + + + The following example shows how PropertyTooltip is applied to various properties. + + public class MyComponent : MonoBehaviour + { + [PropertyTooltip("This is an int property.")] + public int MyField; + + [ShowInInspector, PropertyTooltip("This is another int property.")] + public int MyProperty { get; set; } + } + + + + + + + + + + + The message shown in the tooltip. + + + + + Adds a tooltip to the property in the inspector. + + The message shown in the tooltip. + + + + ReadOnly is used on any property, and prevents the property from being changed in the inspector. + Use this for when you want to see the value of a property in the inspector, but don't want it to be changed. + + + This attribute only affects the inspector! Values can still be changed by script. + + + The following example shows how a field can be displayed in the editor, but not be editable. + + public class Health : MonoBehaviour + { + public int MaxHealth; + + [ReadOnly] + public int CurrentHealth; + } + + + + ReadOnly can also be combined with . + + public class Health : MonoBehaviour + { + public int MaxHealth; + + [ShowInInspector, ReadOnly] + private int currentHealth; + } + + + + + + + Required is used on any object property, and draws a message in the inspector if the property is missing. + Use this to clearly mark fields as necessary to the object. + + + The following example shows different uses of the Required attribute. + + public class MyComponent : MonoBehaviour + { + [Required] + public GameObject MyPrefab; + + [Required(InfoMessageType.Warning)] + public Texture2D MyTexture; + + [Required("MyMesh is nessessary for this component.")] + public Mesh MyMesh; + + [Required("MyTransform might be important.", InfoMessageType.Info)] + public Transform MyTransform; + } + + + + + + + + The message of the info box. + + + + + The type of the info box. + + + + + Adds an error box to the inspector, if the property is missing. + + + + + Adds an info box to the inspector, if the property is missing. + + The message to display in the error box. + The type of info box to draw. + + + + Adds an error box to the inspector, if the property is missing. + + The message to display in the error box. + + + + Adds an info box to the inspector, if the property is missing. + + The type of info box to draw. + + + + Makes a member required based on which type of a prefab and instance it is in. + + + + + The message of the info box. + + + + + The type of the info box. + + + + + Adds an error box to the inspector, if the property is missing. + + + + + Adds an info box to the inspector, if the property is missing. + + The message to display in the error box. + The type of info box to draw. + + + + Adds an error box to the inspector, if the property is missing. + + The message to display in the error box. + + + + Adds an info box to the inspector, if the property is missing. + + The type of info box to draw. + + + + The message of the info box. + + + + + The type of the info box. + + + + + Adds an error box to the inspector, if the property is missing. + + + + + Adds an info box to the inspector, if the property is missing. + + The message to display in the error box. + The type of info box to draw. + + + + Adds an error box to the inspector, if the property is missing. + + The message to display in the error box. + + + + Adds an info box to the inspector, if the property is missing. + + The type of info box to draw. + + + + + The minimum length of the collection. If not set, there is no minimum length restriction. + + + + + The maximum length of the collection. If not set, there is no maximum length restriction. + + + + + A C# expression for getting the minimum length of the collection, for example "@this.otherList.Count". + If set, MinLength will be the fallback in case nothing in case MinLengthGetter returns null. + + + + + A C# expression for getting the maximum length of the collection, for example "@this.otherList.Count". + If set, MaxLength will be the fallback in case nothing in case MaxLengthGetter returns null. + + + + + Limits the collection to be contain the specified number of elements. + + + + + Limits the collection to be contain the specified number of elements. + + The minimum and maximum length of the collection. + + + + Limits the collection to be contain the specified number of elements. + + The minimum length of the collection. + The maximum length of the collection. + + + + Limits the collection to be contain the specified number of elements. + + The minimum length of the collection. + A C# expression for getting the maximum length of the collection, for example "@this.otherList.Count". If set, MaxLength will be the fallback in case nothing in case MaxLengthGetter returns null. + + + + Limits the collection to be contain the specified number of elements. + + The minimum and maximum length of the collection. + + + + Limits the collection to be contain the specified number of elements. + + A C# expression for getting the minimum length of the collection, for example "@this.otherList.Count". If set, MinLength will be the fallback in case nothing in case MinLengthGetter returns null. + A C# expression for getting the maximum length of the collection, for example "@this.otherList.Count". If set, MaxLength will be the fallback in case nothing in case MaxLengthGetter returns null. + + + + Limits the collection to be contain the specified number of elements. + + A C# expression for getting the minimum length of the collection, for example "@this.otherList.Count". If set, MinLength will be the fallback in case nothing in case MinLengthGetter returns null. + The maximum length of the collection. + + + + Groups buttons into a group that will position and resize the buttons based on the amount of available layout space. + + + + [ResponsiveButtonGroup] + public void Foo() { } + + [ResponsiveButtonGroup] + public void Bar() { } + + [ResponsiveButtonGroup] + public void Baz() { } + + + + + [ResponsiveButtonGroup(UniformLayout = true)] + public void Foo() { } + + [ResponsiveButtonGroup] + public void Bar() { } + + [ResponsiveButtonGroup] + public void Baz() { } + + + + + [ResponsiveButtonGroupAttribute(UniformLayout = true, DefaultButtonSize = ButtonSizes.Large)] + public void Foo() { } + + [GUIColor(0, 1, 0))] + [Button(ButtonSizes.Large)] + [ResponsiveButtonGroup] + public void Bar() { } + + [ResponsiveButtonGroup] + public void Baz() { } + + + + + [TabGroup("SomeTabGroup", "SomeTab")] + [ResponsiveButtonGroup("SomeTabGroup/SomeTab/SomeBtnGroup")] + public void Foo() { } + + [ResponsiveButtonGroup("SomeTabGroup/SomeTab/SomeBtnGroup")] + public void Bar() { } + + [ResponsiveButtonGroup("SomeTabGroup/SomeTab/SomeBtnGroup")] + public void Baz() { } + + + + + + The default size of the button. + + + + + If true then the widths of a line of buttons will be the same. + + + + + Draws a button that will be placed in a group that will respond to the horizontal space available to the group. + + The name of the group to place the button in. + + + + Merges the values of this group with another ResponsiveButtonGroupAttribute. + + The attribute to combine with. + + + + SceneObjectsOnly is used on object properties, and restricts the property to scene objects, and not project assets. + Use this when you want to ensure an object is a scene object, and not from a project asset. + + + The following example shows a component with a game object property, that must be from a scene, and not a prefab asset. + + public MyComponent : MonoBehaviour + { + [SceneObjectsOnly] + public GameObject MyPrefab; + } + + + + + + + Adds a search filter that can search the children of the field or type on + which it is applied. Note that this does not currently work when directly + applied to dictionaries, though a search field "above" the dictionary will + still search the dictionary's properties if it is searching recursively. + + + + + Whether to use fuzzy string matching for the search. + Default value: true. + + + + + The options for which things to use to filter the search. + Default value: All. + + + + + Whether to search recursively, or only search the top level properties. + Default value: true. + + + + + + ShowDrawerChain lists all prepend, append and value drawers being used in the inspector. + This is great in situations where you want to debug, and want to know which drawers might be involved in drawing the property. + + Your own custom drawers are highlighted with a green label. + Drawers, that have not been called during the draw chain, will be greyed out in the inspector to make it clear which drawers have had an effect on the properties. + + + + public class MyComponent : MonoBehaviour + { + [ShowDrawerChain] + public int IndentedInt; + } + + + + + + ShowIf is used on any property and can hide the property in the inspector. + Use this to hide irrelevant properties based on the current state of the object. + + + This example shows a component with fields hidden by the state of another field. + + public class MyComponent : MonoBehaviour + { + public bool ShowProperties; + + [ShowIf("showProperties")] + public int MyInt; + + [ShowIf("showProperties", false)] + public string MyString; + + public SomeEnum SomeEnumField; + + [ShowIf("SomeEnumField", SomeEnum.SomeEnumMember)] + public string SomeString; + } + + + + This example shows a component with a field that is hidden when the game object is inactive. + + public class MyComponent : MonoBehaviour + { + [ShowIf("MyVisibleFunction")] + public int MyHideableField; + + private bool MyVisibleFunction() + { + return this.gameObject.activeInHierarchy; + } + } + + + + + + + + + The name of a bool member field, property or method. Obsolete; use the Condition member instead. + + + + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + + The optional condition value. + + + + + Whether or not to slide the property in and out when the state changes. + + + + + Shows a property in the inspector, based on the value of a resolved string. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + Whether or not to slide the property in and out when the state changes. + + + + Shows a property in the inspector, if the resolved string evaluates to the specified value. + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + Value to check against. + Whether or not to slide the property in and out when the state changes. + + + +

ShowIfGroup allows for showing or hiding a group of properties based on a condition.

+

The attribute is a group attribute and can therefore be combined with other group attributes, and even be used to show or hide entire groups.

+

Note that in the vast majority of cases where you simply want to be able to control the visibility of a single group, it is better to use the VisibleIf parameter that *all* group attributes have.

+
+ + + + + +
+ + + Whether or not to visually animate group visibility changes. Alias for AnimateVisibility. + + + + + The optional member value. + + + + + Name of member to use when to hide the group. Defaults to the name of the group, by can be overriden by setting this property. + + + + + A resolved string that defines the condition to check the value of, such as a member name or an expression. + + + + + Makes a group that can be shown or hidden based on a condition. + + The group path. + If true then a fade animation will be played when the group is hidden or shown. + + + + Makes a group that can be shown or hidden based on a condition. + + The group path. + The value the member should equal for the property to shown. + If true then a fade animation will be played when the group is hidden or shown. + + + + Combines ShowIfGroup attributes. + + Another ShowIfGroup attribute. + + + + Shows a member based on which type of a prefab and instance it is in. + + + + + Only shows a property if it is drawn within an . + + + + + ShowInInspector is used on any member, and shows the value in the inspector. Note that the value being shown due to this attribute DOES NOT mean that the value is being serialized. + + + This can for example be combined with to allow for live debugging of values. + + + + The following example shows how ShowInInspector is used to show properties in the inspector, that otherwise wouldn't. + + public class MyComponent : MonoBehaviour + { + [ShowInInspector] + private int myField; + + [ShowInInspector] + public int MyProperty { get; set; } + } + + + + + + Marks a type as being specially serialized. Odin uses this attribute to check whether it should include non-Unity-serialized members in the inspector. + + + + + + ShowPropertyResolver shows the property resolver responsible for bringing the member into the property tree. + This is useful in situations where you want to debug why a particular member that is normally not shown in the inspector suddenly is. + + + + + public class MyComponent : MonoBehaviour + { + [ShowPropertyResolver] + public int IndentedInt; + } + + + + + + The SuffixLabel attribute draws a label at the end of a property. + Use this for conveying intend about a property. Is the distance measured in meters, kilometers, or in light years?. + Is the angle measured in degrees or radians? + Using SuffixLabel, you can place a neat label at the end of a property, to clearly show how the the property is used. + + + The following example demonstrates how SuffixLabel is used. + + public class MyComponent : MonoBehaviour + { + // The SuffixLabel attribute draws a label at the end of a property. + // It's useful for conveying intend about a property. + // Fx, this field is supposed to have a prefab assigned. + [SuffixLabel("Prefab")] + public GameObject GameObject; + + // Using the Overlay property, the suffix label will be drawn on top of the property instead of behind it. + // Use this for a neat inline look. + [SuffixLabel("ms", Overlay = true)] + public float Speed; + + [SuffixLabel("radians", Overlay = true)] + public float Angle; + + // The SuffixLabel attribute also supports string member references by using $. + [SuffixLabel("$Suffix", Overlay = true)] + public string Suffix = "Dynamic suffix label"; + } + + + + + + + + + + The label displayed at the end of the property. + + + + + If true the suffix label will be drawn on top of the property, instead of after. + + + + + The icon to be displayed. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Draws a label at the end of the property. + + The text of the label. + If true the suffix label will be drawn on top of the property, instead of after. + + + + Draws a label at the end of the property. + + The text of the label. + The icon to be displayed. + If true the suffix label will be drawn on top of the property, instead of after. + + + + Draws a label at the end of the property. + + The icon to be displayed. + + + + SuppressInvalidAttributeError is used on members to suppress the inspector error message you get when applying an attribute to a value that it's not supposed to work on. + This can be very useful for applying attributes to generic parameter values, when it only applies to some of the possible types that the value might become. + + + The following example shows a case where the attribute might be useful. + + public class NamedValue<T> + { + public string Name; + + // The Range attribute will be applied if T is compatible with it, but if T is not compatible, an error will not be shown. + [SuppressInvalidAttributeError, Range(0, 10)] + public T Value; + } + + + + + + TabGroup is used on any property, and organizes properties into different tabs. + Use this to organize different value to make a clean and easy to use inspector. + + + Use groups to create multiple tab groups, each with multiple tabs and even sub tabs. + + + The following example shows how to create a tab group with two tabs. + + public class MyComponent : MonoBehaviour + { + [TabGroup("First")] + public int MyFirstInt; + + [TabGroup("First")] + public int AnotherInt; + + [TabGroup("Second")] + public int MySecondInt; + } + + + + The following example shows how multiple groups of tabs can be created. + + public class MyComponent : MonoBehaviour + { + [TabGroup("A", "FirstGroup")] + public int FirstGroupA; + + [TabGroup("B", "FirstGroup")] + public int FirstGroupB; + + // The second tab group has been configured to have constant height across all tabs. + [TabGroup("A", "SecondGroup", true)] + public int SecondgroupA; + + [TabGroup("B", "SecondGroup")] + public int SecondGroupB; + + [TabGroup("B", "SecondGroup")] + public int AnotherInt; + } + + + + This example demonstrates how multiple tabs groups can be combined to create tabs in tabs. + + public class MyComponent : MonoBehaviour + { + [TabGroup("ParentGroup", "First Tab")] + public int A; + + [TabGroup("ParentGroup", "Second Tab")] + public int B; + + // Specify 'First Tab' as a group, and another child group to the 'First Tab' group. + [TabGroup("ParentGroup/First Tab/InnerGroup", "Inside First Tab A")] + public int C; + + [TabGroup("ParentGroup/First Tab/InnerGroup", "Inside First Tab B")] + public int D; + + [TabGroup("ParentGroup/Second Tab/InnerGroup", "Inside Second Tab")] + public int E; + } + + + + + + + The default tab group name which is used when the single-parameter constructor is called. + + + + + Name of the tab. + + + + + Should this tab be the same height as the rest of the tab group. + + + + + If true, the content of each page will not be contained in any box. + + + + + If true, the tab group will be hidden if it only contains one tab. + + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Specify how tabs should be layouted. + + + + + Organizes the property into the specified tab in the default group. + Default group name is '_DefaultTabGroup' + + The tab. + if set to true [use fixed height]. + The order. + + + + Organizes the property into the specified tab in the specified group. + + The group to attach the tab to. + The name of the tab. + Set to true to have a constant height across the entire tab group. + The order of the group. + + + + Organizes the property into the specified tab in the specified group. + + The group to attach the tab to. + The name of the tab. + Set to true to have a constant height across the entire tab group. + The order of the group. + + + + Name of all tabs in this group. + + + + + The TableColumnWidth attribute is used to further customize the width of a column in tables drawn using the . + + + + [TableList] + public List<SomeType> TableList = new List<SomeType>(); + + [Serializable] + public class SomeType + { + [LabelWidth(30)] + [TableColumnWidth(130, false)] + [VerticalGroup("Combined")] + public string A; + + [LabelWidth(30)] + [VerticalGroup("Combined")] + public string B; + + [Multiline(2), Space(3)] + public string fields; + } + + + + + + + The width of the column. + + + + + Whether the column should be resizable. True by default. + + + + + Initializes a new instance of the class. + + The width of the column in pixels. + If true then the column can be resized in the inspector. + + + + Renders lists and arrays in the inspector as tables. + + + + + + + If ShowPaging is enabled, this will override the default setting specified in the Odin Preferences window. + + + + + Mark the table as read-only. This removes all editing capabilities from the list such as Add and delete, + but without disabling GUI for each element drawn as otherwise would be the case if the was used. + + + + + The default minimum column width - 40 by default. This can be overwriten by individual columns using the . + + + + + If true, a label is drawn for each element which shows the index of the element. + + + + + Whether to draw all rows in a scroll-view. + + + + + The number of pixels before a scroll view appears. 350 by default. + + + + + The number of pixels before a scroll view appears. 0 by default. + + + + + If true, expanding and collapsing the table from the table title-bar is no longer an option. + + + + + Whether to hide the toolbar containing the add button and pagin etc.s + + + + + The cell padding. + + + + + Whether paging buttons should be added to the title bar. The default value of this, can be customized from the Odin Preferences window. + + + + + Whether the ShowPaging property has been set. + + + + + Sets the Min and Max ScrollViewHeight. + + + + + The TableMatrix attribute is used to further specify how Odin should draw two-dimensional arrays. + + + + // Inheriting from SerializedMonoBehaviour is only needed if you want Odin to serialize the multi-dimensional arrays for you. + // If you prefer doing that yourself, you can still make Odin show them in the inspector using the ShowInInspector attribute. + public class TableMatrixExamples : SerializedMonoBehaviour + { + [InfoBox("Right-click and drag column and row labels in order to modify the tables."), PropertyOrder(-10), OnInspectorGUI] + private void ShowMessageAtOP() { } + + [BoxGroup("Two Dimensional array without the TableMatrix attribute.")] + public bool[,] BooleanTable = new bool[15, 6]; + + [BoxGroup("ReadOnly table")] + [TableMatrix(IsReadOnly = true)] + public int[,] ReadOnlyTable = new int[5, 5]; + + [BoxGroup("Labled table")] + [TableMatrix(HorizontalTitle = "X axis", VerticalTitle = "Y axis")] + public GameObject[,] LabledTable = new GameObject[15, 10]; + + [BoxGroup("Enum table")] + [TableMatrix(HorizontalTitle = "X axis")] + public InfoMessageType[,] EnumTable = new InfoMessageType[4,4]; + + [BoxGroup("Custom table")] + [TableMatrix(DrawElementMethod = "DrawColoredEnumElement", ResizableColumns = false)] + public bool[,] CustomCellDrawing = new bool[30,30]; + + #if UNITY_EDITOR + + private static bool DrawColoredEnumElement(Rect rect, bool value) + { + if (Event.current.type == EventType.MouseDown && rect.Contains(Event.current.mousePosition)) + { + value = !value; + GUI.changed = true; + Event.current.Use(); + } + + UnityEditor.EditorGUI.DrawRect(rect.Padding(1), value ? new Color(0.1f, 0.8f, 0.2f) : new Color(0, 0, 0, 0.5f)); + + return value; + } + + #endif + } + + + + + + If true, inserting, removing and dragging columns and rows will become unavailable. But the cells themselves will remain modifiable. + If you want to disable everything, you can use the attribute. + + + + + Whether or not columns are resizable. + + + + + The vertical title label. + + + + + The horizontal title label. + + + + + Override how Odin draws each cell. + [TableMatrix(DrawElementMethod='DrawMyElement')] + public MyType[,] myArray; + private static MyType DrawElement(Rect rect, MyType value) { return GUI.DrawMyType(rect, value); } + + + + + The height for all rows. 0 = default row height. + + + + + If true, the height of each row will be the same as the width of the first cell. + + + + + If true, no column indices drawn. + + + + + If true, no row indices drawn. + + + + + Whether the drawn table should respect the current GUI indent level. + + + + + If true, tables are drawn with rows/columns reversed (C# initialization order). + + + + + A resolved string that should evaluate to a tuple (string, LabelDirection) which will be used as the label for the rows and columns of the table. + + + [TableMatrix(SquareCells = true, Labels = "GetLabel")] + public int[,] ChessBoard = new int[8, 8]; + + private (string, LabelDirection) GetLabel(int[,] array, TableAxis axis, int index) + { + var chessFileLetters = "ABCDEFGH"; + + switch (axis) + { + case TableAxis.Y: + return ((array.GetLength(1) - index).ToString(), LabelDirection.LeftToRight); + case TableAxis.X: + return (chessFileLetters[index].ToString(), LabelDirection.TopToBottom); + default: + return (index.ToString(), LabelDirection.LeftToRight); + } + } + + + + + Title is used to make a bold header above a property. + + + The following example shows how Title is used on different properties. + + public class TitleExamples : MonoBehaviour + { + [Title("Titles and Headers")] + [InfoBox( + "The Title attribute has the same purpose as Unity's Header attribute," + + "but it also supports properties, and methods." + + "\n\nTitle also offers more features such as subtitles, options for horizontal underline, bold text and text alignment." + + "\n\nBoth attributes, with Odin, supports either static strings, or refering to members strings by adding a $ in front.")] + public string MyTitle = "My Dynamic Title"; + public string MySubtitle = "My Dynamic Subtitle"; + + [Title("Static title")] + public int C; + public int D; + + [Title("Static title", "Static subtitle")] + public int E; + public int F; + + [Title("$MyTitle", "$MySubtitle")] + public int G; + public int H; + + [Title("Non bold title", "$MySubtitle", bold: false)] + public int I; + public int J; + + [Title("Non bold title", "With no line seperator", horizontalLine: false, bold: false)] + public int K; + public int L; + + [Title("$MyTitle", "$MySubtitle", TitleAlignments.Right)] + public int M; + public int N; + + [Title("$MyTitle", "$MySubtitle", TitleAlignments.Centered)] + public int O; + public int P; + + [Title("$Combined", titleAlignment: TitleAlignments.Centered)] + public int Q; + public int R; + + [ShowInInspector] + [Title("Title on a Property")] + public int S { get; set; } + + [Title("Title on a Method")] + [Button] + public void DoNothing() + { } + + public string Combined { get { return this.MyTitle + " - " + this.MySubtitle; } } + } + + + + + + + + The title displayed above the property in the inspector. + + + + + Optional subtitle. + + + + + If true the title will be displayed with a bold font. + + + + + Gets a value indicating whether or not to draw a horizontal line below the title. + + + + + Title alignment. + + + + + Creates a title above any property in the inspector. + + The title displayed above the property in the inspector. + Optional subtitle + Title alignment + Horizontal line + If true the title will be drawn with a bold font. + + + + Groups properties vertically together with a title, an optional subtitle, and an optional horizontal line. + + + + + Optional subtitle. + + + + + Title alignment. + + + + + Gets a value indicating whether or not to draw a horizontal line below the title. + + + + + If true the title will be displayed with a bold font. + + + + + Gets a value indicating whether or not to indent all group members. + + + + + Groups properties vertically together with a title, an optional subtitle, and an optional horizontal line. + + The title- + Optional subtitle. + The text alignment. + Horizontal line. + Bold text. + Whether or not to indent all group members. + The group order. + + + + Combines TitleGroup attributes. + + The other group attribute to combine with. + + + + Toggle is used on any field or property, and allows to enable or disable the property in the inspector. + Use this to create a property that can be turned off or on. + + + Toggle does current not support any static members for toggling. + + + The following example shows how Toggle is used to create a toggleable property. + + public class MyComponent : MonoBehaviour + { + [Toggle("Enabled")] + public MyToggleable MyToggler = new MyToggleable(); + } + + public class MyToggleable + { + public bool Enabled; + + public int MyValue; + } + + + + + + + + Name of any bool field or property to enable or disable the object. + + + + + If true, all other open toggle groups will collapse once another one opens. + + + + + Create a togglable property in the inspector. + + Name of any bool field or property to enable or disable the object. + + + + ToggleGroup is used on any field, and create a toggleable group of options. + Use this to create options that can be enabled or disabled. + + + The functions as the ID for the ToggleGroup, and therefore all members of a toggle group must specify the same toggle member. + This attribute does not support static members! + + + The following example shows how ToggleGroup is used to create two separate toggleable groups. + + public class MyComponent : MonoBehaviour + { + // This attribute has a title specified for the group. The title only needs to be applied to a single attribute for a group. + [ToggleGroup("FirstToggle", order: -1, groupTitle: "First")] + public bool FirstToggle; + + [ToggleGroup("FirstToggle")] + public int MyInt; + + // This group specifies a member string as the title of the group. A property or a function can also be used. + [ToggleGroup("SecondToggle", titleStringMemberName: "SecondGroupTitle")] + public bool SecondToggle { get; set; } + + [ToggleGroup("SecondToggle")] + public float MyFloat; + + [HideInInspector] + public string SecondGroupTitle = "Second"; + } + + + + "/> + + + + Title of the toggle group in the inspector. + If null will be used instead. + + + + + If true, all other open toggle groups will collapse once another one opens. + + + + + Creates a ToggleGroup. See . + + Name of any bool field or property to enable or disable the ToggleGroup. + The order of the group. + Use this to name the group differently than toggleMemberName. + + + + Creates a ToggleGroup. See . + + Name of any bool field or property to enable or disable the ToggleGroup. + Use this to name the group differently than toggleMemberName. + + + + Obsolete constructor overload. + + Obsolete overload. + Obsolete overload. + Obsolete overload. + Obsolete overload. + + + + Name of any bool field, property or function to enable or disable the ToggleGroup. + + + + + Name of any string field, property or function, to title the toggle group in the inspector. + If null will be used instead. + + + + + Combines the ToggleGroup with another ToggleGroup. + + Another ToggleGroup. + + + + Draws the checkbox before the label instead of after. + + ToggleLeftAttribute can be used an all fields and properties of type boolean + + + public class MyComponent : MonoBehaviour + { + [ToggleLeft] + public bool MyBoolean; + } + + + + + + Specifies whether a base type should be used instead of all types. + + + + + Filters the result. + + + + + Name of any field, property or method member that implements IList. E.g. arrays or Lists. Obsolete; use the FilterGetter member instead. + + + + + A resolved string that should evaluate to a value that is assignable to IList; e.g, arrays and lists are compatible. + + + + + Gets or sets the title for the dropdown. Null by default. + + + + + If true, the value will be drawn normally after the type selector dropdown has been drawn. False by default. + + + + + Creates a dropdown menu for a property. + + A resolved string that should evaluate to a value that is assignable to IList; e.g, arrays and lists are compatible. + + + + The TypeInfoBox attribute adds an info box to the very top of a type in the inspector. + Use this to add an info box to the top of a class in the inspector, without having to use neither the PropertyOrder nor the OnInspectorGUI attribute. + + + The following example demonstrates the use of the TypeInfoBox attribute. + + [TypeInfoBox("This is my component and it is mine.")] + public class MyComponent : MonoBehaviour + { + // Class implementation. + } + + + + + + + + The message to display in the info box. + + + + + Draws an info box at the top of a type in the inspector. + + The message to display in the info box. + + + Specifies if the '<none>' item is shown. + + + Specifies if categories are shown. + + + + Specifies if namespaces are preferred over assembly category names for category names. + + + + + Function for filtering types displayed in the Type Selector. + + + + The resolver expects any method that takes a single parameter of , with the parameter name 'type', and which returns a indicating whether the is included or not; + + + Implementation example: public bool SomeFilterMethod(Type type). + + + + + + The unit of underlying value. + + + + + The unit displayed in the number field. + + + + + Name of the underlying unit. + + + + + Name of the unit displayed in the number field. + + + + + If true the number field is drawn as read-only text. + + + + + If true disables the option to change display unit with the right-click context menu. + + + + + Displays the number as a unit field. + + The unit of underlying value. + + + + Displays the number as a unit field. + + The name of the underlying value. + + + + Displays the number as a unit field. + + The unit of underlying value. + The unit to display the value as in the inspector. + + + + Displays the number as a unit field. + + The unit of underlying value. + The unit to display the value as in the inspector. + + + + Displays the number as a unit field. + + The unit of underlying value. + The unit to display the value as in the inspector. + + + + Displays the number as a unit field. + + The unit of underlying value. + The unit to display the value as in the inspector. + + + + Units for use with and . + + + + + ValidateInput is used on any property, and allows to validate input from inspector. + Use this to enforce correct values. + + + ValidateInput refuses invalid values. + ValidateInput only works in the editor. Values changed through scripting will not be validated. + + + The following examples shows how a speed value can be forced to be above 0. + + public class MyComponent : MonoBehaviour + { + [ValidateInput("ValidateInput")] + public float Speed; + + // Specify custom output message and message type. + [ValidateInput("ValidateInput", "Health must be more than 0!", InfoMessageType.Warning)] + public float Health; + + private bool ValidateInput(float property) + { + return property > 0f; + } + } + + + + The following example shows how a static function could also be used. + + public class MyComponent : MonoBehaviour + { + [ValidateInput("StaticValidateFunction")] + public int MyInt; + + private static bool StaticValidateFunction(int property) + { + return property != 0; + } + } + + + + + + + + Default message for invalid values. + + + + + OBSOLETE; use the Condition member instead. + A resolved string that should evaluate to a boolean value, and which should validate the input. Note that in expressions, the $value named parameter, and in methods, a parameter named value, can be used to get the validated value instead of referring to the value by its containing member. This makes it easier to reuse validation strings. + + + + + A resolved string that should evaluate to a boolean value, and which should validate the input. Note that in expressions, the $value named parameter, and in methods, a parameter named value, can be used to get the validated value instead of referring to the value by its containing member. This makes it easier to reuse validation strings. + + + + + The type of the message. + + + + + Whether to also trigger validation when changes to child values happen. This is true by default. + + + + + If true, the validation method will not only be executed when the User has changed the value. It'll run once every frame in the inspector. + + + + + Initializes a new instance of the class. + + A resolved string that should evaluate to a boolean value, and which should validate the input. Note that in expressions, the $value named parameter, and in methods, a parameter named value, can be used to get the validated value instead of referring to the value by its containing member. This makes it easier to reuse validation strings. + Default message for invalid values. + Type of the message. + + + + Obsolete. Rejecting invalid input is no longer supported. Use the other constructors instead. + + Obsolete overload. + Obsolete overload. + Obsolete overload. + Obsolete overload. + + + + ValueDropdown is used on any property and creates a dropdown with configurable options. + Use this to give the user a specific set of options to select from. + + + Due to a bug in Unity, enums will sometimes not work correctly. The last example shows how this can be fixed. + + + The following example shows a how the ValueDropdown can be used on an int property. + + public class MyComponent : MonoBehaviour + { + [ValueDropdown("myValues")] + public int MyInt; + + // The selectable values for the dropdown. + private int[] myValues = { 1, 2, 3 }; + } + + + + The following example shows how ValueDropdownList can be used for objects, that do not implement a usable ToString. + + public class MyComponent : MonoBehaviour + { + [ValueDropdown("myVectorValues")] + public Vector3 MyVector; + + // The selectable values for the dropdown, with custom names. + private ValueDropdownList<Vector3> myVectorValues = new ValueDropdownList<Vector3>() + { + {"Forward", Vector3.forward }, + {"Back", Vector3.back }, + {"Up", Vector3.up }, + {"Down", Vector3.down }, + {"Right", Vector3.right }, + {"Left", Vector3.left }, + }; + } + + + + The following example shows how the ValueDropdown can on any member that implements IList. + + public class MyComponent : MonoBehaviour + { + // Member field of type float[]. + private float[] valuesField; + + [ValueDropdown("valuesField")] + public float MyFloat; + + // Member property of type List<thing>. + private List<string> ValuesProperty { get; set; } + + [ValueDropdown("ValuesProperty")] + public string MyString; + + // Member function that returns an object of type IList. + private IList<ValueDropdownItem<int>> ValuesFunction() + { + return new ValueDropdownList<int> + { + { "The first option", 1 }, + { "The second option", 2 }, + { "The third option", 3 }, + }; + } + + [ValueDropdown("ValuesFunction")] + public int MyInt; + } + + + + Due to a bug in Unity, enums member arrays will in some cases appear as empty. This example shows how you can get around that. + + public class MyComponent : MonoBehaviour + { + // Make the field static. + private static MyEnum[] MyStaticEnumArray = MyEnum[] { ... }; + + // Force Unity to serialize the field, and hide the property from the inspector. + [SerializeField, HideInInspector] + private MyEnum MySerializedEnumArray = MyEnum[] { ... }; + } + + + + + + + Name of any field, property or method member that implements IList. E.g. arrays or Lists. Obsolete; use the ValuesGetter member instead. + + + + + A resolved string that should evaluate to a value that is assignable to IList; e.g, arrays and lists are compatible. + + + + + The number of items before enabling search. Default is 10. + + + + + False by default. + + + + + True by default. If the ValueDropdown attribute is applied to a list, then disabling this, + will render all child elements normally without using the ValueDropdown. The ValueDropdown will + still show up when you click the add button on the list drawer, unless is true. + + + + + False by default. + + + + + If the ValueDropdown attribute is applied to a list, and is set to true, then enabling this, + will exclude existing values, instead of rendering a checkbox indicating whether the item is already included or not. + + + + + If the dropdown renders a tree-view, then setting this to true will ensure everything is expanded by default. + + + + + If true, instead of replacing the drawer with a wide dropdown-field, the dropdown button will be a little button, drawn next to the other drawer. + + + + + Disables the the GUI for the appended drawer. False by default. + + + + + By default, a single click selects and confirms the selection. + + + + + By default, the dropdown will create a tree view. + + + + + Gets or sets the width of the dropdown. Default is zero. + + + + + Gets or sets the height of the dropdown. Default is zero. + + + + + Gets or sets the title for the dropdown. Null by default. + + + + + False by default. + + + + + Whether to draw all child properties in a foldout. + + + + + Whether values selected by the value dropdown should be copies of the original or references (in the case of reference types). Defaults to true. + + + + + If this is set to true, the actual property value will *only* be changed *once*, when the selection in the dropdown is fully confirmed. + + + + + Creates a dropdown menu for a property. + + A resolved string that should evaluate to a value that is assignable to IList; e.g, arrays and lists are compatible. + + + + + + + + + Gets the label for the dropdown item. + + The label text for the item. + + + + Gets the value of the dropdown item. + + The value for the item. + + + + Use this with to specify custom names for values. + + The type of the value. + + + + Adds the specified value with a custom name. + + The name of the item. + The value. + + + + Adds the specified value. + + The value. + + + + + + + + + The name of the item. + + + + + The value of the item. + + + + + Initializes a new instance of the class. + + The text to display for the dropdown item. + The value for the dropdown item. + + + + The name of this item. + + + + + Gets the text. + + + + + Gets the value. + + + + + + + + + + The name of the item. + + + + + The value of the item. + + + + + Initializes a new instance of the class. + + The text to display for the dropdown item. + The value for the dropdown item. + + + + Gets the text. + + + + + Gets the value. + + + + + The name of this item. + + + + + VerticalGroup is used to gather properties together in a vertical group in the inspector. + This doesn't do much in and of itself, but in combination with other groups, such as it can be very useful. + + + The following example demonstrates how VerticalGroup can be used in conjunction with + + public class MyComponent : MonoBehaviour + { + [HorizontalGroup("Split")] + [VerticalGroup("Split/Left")] + public Vector3 Vector; + + [VerticalGroup("Split/Left")] + public GameObject First; + + [VerticalGroup("Split/Left")] + public GameObject Second; + + [VerticalGroup("Split/Right", PaddingTop = 18f)] + public int A; + + [VerticalGroup("Split/Right")] + public int B; + } + + + + + + + + + + + Space in pixels at the top of the group. + + + + + Space in pixels at the bottom of the group. + + + + + Groups properties vertically. + + The group ID. + The group order. + + + + Groups properties vertically. + GroupId: _DefaultVerticalGroup + + The group order. + + + + Combines properties that have been group vertically. + + The group attribute to combine with. + + + + Wrap is used on most primitive property, and allows for wrapping the value when it goes out of the defined range. + Use this when you want a value that goes around in circle, like for example an angle. + + + Currently unsigned primitives are not supported. + + + The following example show how Wrap is used on a property. + + public class MyComponent : MonoBehaviour + { + [Wrap(-100, 100)] + public float MyFloat; + } + + + + + + + The lowest value for the property. + + + + + The highest value for the property. + + + + + Wraps the value of the property round when the values goes out of range. + + The lowest value for the property. + The highest value for the property. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Various built-in button sizes. + + + + + Small button size, fits well with properties in the inspector. + + + + + A larger button. + + + + + A very large button. + + + + + A gigantic button. Twice as big as Large + + + + + Various display modes for the dictionary to draw its items. + + + + + Draws all dictionary items in two columns. The left column contains all key values, the right column displays all values. + + + + + Draws each dictionary item in a box with the key in the header and the value inside the box. + Whether or not the box is expanded or collapsed by default, is determined by the + "Expand Foldout By Default" setting found in the preferences window "Tools > Odin > Inspector > Preferences > Drawers > Settings". + + + + + Draws each dictionary item in a collapsed foldout with the key in the header and the value inside the box. + + + + + Draws each dictionary item in an expanded foldout with the key in the header and the value inside the box. + + + + + When this attribute is added is added to another attribute, then attributes from that attribute + will also be added to the property in the attribute processing step. + + + + + Type of info message box. This enum matches Unity's MessageType enum which could not be used since it is located in the UnityEditor assembly. + + + + + Generic message box with no type. + + + + + Information message box. + + + + + Warning message box. + + + + + Error message box. + + + + + Editor modes for + + + + + + Draws only the editor GUI + + + + + Draws the editor GUI and the editor header. + + + + + Draws the editor GUI to the left, and a small editor preview to the right. + + + + + Draws a small editor preview without any GUI. + + + + + Draws a large editor preview without any GUI. + + + + + Draws the editor header and GUI to the left, and a small editor preview to the right. + + + + + How the InlineEditor attribute drawer should draw the object field. + + + + + Draws the object field in a box. + + + + + Draws the object field with a foldout. + + + + + Hides the object field unless it's null. + + + + + Hidden the object field also when the object is null. + + + + + Implement this interface to create custom matching + logic for search filtering in the inspector. + + + The following example shows how you might do this: + + public class MyCustomClass : ISearchFilterable + { + public bool SearchEnabled; + public string MyStr; + + public bool IsMatch(string searchString) + { + if (SearchEnabled) + { + return MyStr.Contains(searchString); + } + + return false; + } + } + + + + + + Any type implementing this interface will be considered to be validating itself using the implemented logic, as if a custom validator had been written for it. + + + + + Not yet documented. + + + + + Not yet documented. + + Not yet documented. + + + + Not yet documented. + + Not yet documented. + Not yet documented. + + + + How the square object field should be aligned. + + + + + + Left aligned. + + + + + Aligned to the center. + + + + + Right aligned. + + + + + The prefab kind returned by + + + + + None. + + + + + Instances of prefabs in scenes. + + + + + Instances of prefabs nested inside other prefabs. + + + + + Regular prefab assets. + + + + + Prefab variant assets. + + + + + Non-prefab component or gameobject instances in scenes. + + + + + Instances of regular prefabs, and prefab variants in scenes or nested in other prefabs. + + + + + Prefab assets and prefab variant assets. + + + + + Prefab Instances, as well as non-prefab instances. + + + + + All kinds + + + + + Options for filtering search. + + + + + Title alignment enum used by various attributes. + + + + + + + Title and subtitle left aligned. + + + + + Title and subtitle centered aligned. + + + + + Title and subtitle right aligned. + + + + + Title on the left, subtitle on the right. + + + + Specifies the types to include based on certain criteria. + + + Represents types that are not interfaces, abstracts, or generics. + +
+
diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml.meta new file mode 100644 index 0000000..ba9d6b6 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 47a84ebde4ec47fabb620b30cc7a096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll new file mode 100644 index 0000000..8cafc23 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll.meta new file mode 100644 index 0000000..57f5b0e --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: a4865f1ab4504ed8a368670db22f409c +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml new file mode 100644 index 0000000..6a5ed51 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml @@ -0,0 +1,11307 @@ + + + + Sirenix.OdinInspector.Editor + + + + + An ActionResolver resolves a string to an action, given an InspectorProperty instance to use as context. Call to get an instance of an ActionResolver. + Action resolvers are a globally extendable system that can be hooked into and modified or changed by creating and registering an . + See Odin's tutorials for details and examples of how to use ActionResolvers. + + + + + The context of this ActionResolver, containing all of its configurations and values it needs to function. For performance and simplicity reasons, this is a single very large struct that is passed around by ref to anything that needs it. + + + + + The delegate that executes the actual action. You should not call this manually, but instead call . + + + + + The current error message that the resolver has, or null if there is no error message. This is a shortcut for writing "resolver.Context.ErrorMessage". + + + + + Whether there is an error message at the moment. This is a shortcut for writing "resolver.Context.ErrorMessage != null". + + + + + Draws an error message box if there is an error, and does nothing if there is no error. + + + + + Executes the resolved action for a given selection index. + + The selection index to execute the action on. Defaults to 0. + + + + Executes the action for all selection indices. + + + + + Creates a new action resolver instance from a pre-built context struct. This is a more advanced use that requires you to + know how the context needs to be set up before action resolution happens. However, this allows you to do more advanced + things like adjust various context values before string resolution happens. + + The pre-built context that should be used to get a resolver. + + + + Creates a new action resolver instance for a given string. + + The property that is the context for the resolution to happen in. + The string that should be resolved to an action. + + + + Creates a new action resolver instance for a given string. + + The property that is the context for the resolution to happen in. + The string that should be resolved to an action. + The extra named args that this resolver has access to. Passing in a named arg that already exists will silently override the pre-existing named arg. + + + + Gets a nicely formatted string that lists all the errors in the given set of action resolvers. The returned value is null if there are no errors. + + + + + Gets a nicely formatted string that lists all the errors in the given set of action resolvers. The returned value is null if there are no errors. + + + + + Draws error boxes for all errors in the given action resolvers, or does nothing if there are no errors. This is equivalent to calling DrawError() on all resolvers passed to this method. + + + + + Draws error boxes for all errors in the given action resolvers, or does nothing if there are no errors. This is equivalent to calling DrawError() on all resolvers passed to this method. + + + + + This struct contains all of an ActionResolver's configurations and values it needs to function. For performance and simplicity reasons, this is a single very large struct that lives on an ActionResolver instance and is passed around by ref to anything that needs it. + + + + + The property that *provides* the context for the action resolution. This is the instance that was passed to the resolver when it was created. Note that this is different from , which is based on this value, but almost always isn't the same InspectorProperty instance. + + + + + The error message, if a valid action resolution wasn't found, or if creation of the action resolver failed because was invalid, or if the action was executed but threw an exception. (In this last case, will be true.) + + + + + The named values that are available to the action resolver. Use this field only to get and set named values - once the ValueResolver has been created, new named values will have no effect. + + + + + This will be true if is not null and the message was caused by an exception thrown by code invoked during execution of the resolved action. + + + + + Whether exceptions thrown during action execution should be logged to the console. + + + + + The string that is resolved to perform an action. + + + + + Whether the action resolver should sync ref parameters of invoked methods with named values. If this is true, then if a ref or out parameter value is changed during action execution, the named value associated with that parameter will also be changed to the same value. + + + + + Whether this context has been resolved. + + + + + The type that is the parent of the action resolution, ie, the type that is the context. This is the same as .ValueEntry.TypeOfValue. + + + + + The property that *is* the context for the action resolution. This is not the instance that was passed to the resolver when it was created, but this value is based on that instance. This is the property that provides the actual context - for example, if is for a member of a type - or for an element in a collection contained by a member - this value will be the parent property for the type that contains that member. Only if is the tree's root property is the same as . + + + + + Gets the parent value which provides the context of the resolver. + + The selection index of the parent value to get. + + + + Sets the parent value which provides the context of the resolver. + + The selection index of the parent value to set. + The value to set. + + + + Adds the default named values of "property" and "value" to the context's named values. + This method is usually automatically invoked when a resolver is created, so there + is no need to invoke it manually. + + + + + A color palette. + + + + + Name of the color palette. + + + + + The colors. + + + + + Whether to show the alpha channel. + + + + + Add, Edit or remove custom color palettes used by the . + + You can modify the configuration in the Odin Preferences window found in 'Tools -> Odin Inspector -> Preferences -> Drawers -> Color Palettes', + or by locating the configuration file stored as a serialized object in the Sirenix folder under 'Odin Inspector/Config/Editor/ColorPaletteManager'. + + + + + + Specify the amount of spacing between each color in a color palette. + + + + + Specify the width of each color in a color palette. If StretchPalette is set to true, this will become the min-width. + + + + + If true, all color in a color palette is stretch so that the entire color-palette area is filled. + + + + + If true, a toolbar with the name of the color palette is shown above each color palette. + + + + + Gives you the list of all custom color palettes. + Remember to call UnityEditor.EditorUtility.SetDirty(ColorPaletteManager.Instance) after modifying the list. + + + + + Editor Only Mode Utility. + + + + + Gaither all necessary information about the editor only state. + + + + + Disables Editor Only Mode. + + + + + Enables editor only mode. + + + + + Checks to see whether Editor Only Mode is enabled. + + + + + Checks to see whether Odin Inspector is installed in Source Code mode. + + + + + Contains general configuration for all Odin drawers. + + You can modify the configuration in the Odin Preferences window found in 'Tools -> Odin Inspector -> Preferences -> Drawers -> General', + or by locating the configuration file stored as a serialized object in the Sirenix folder under 'Odin Inspector/Config/Editor/GeneralDrawerConfig'. + + + + + + Specify whether or not the script selector above components should be drawn. + + + + + Specify whether or not the script selector above components should be drawn. + + + + + Specify whether or not the warning for properties that do not support prefab modifications should be shown in the inspector. + + + + + Specify whether or not the warning for properties that do not support prefab modifications should be shown in the inspector. + + + + + Specifies the maximum depth to which a property can draw itself recursively before the system refuses to draw it any deeper. + + + + + If set to true, most foldouts throughout the inspector will be expanded by default. + + + + + If set to true, buttons will show the result values from invoking them in the inspector by default. + + + + + Specify the animation speed for most foldouts throughout the inspector. + + + + + Specify the shaking duration for most shaking animations throughout the inspector. + + + + + Specify the animation speed for + + + + + When true the component labels, for vector fields, will be hidden when the field is too narrow. + + + + + Specify how the Quaternion struct should be shown in the inspector. + + + + + Gets or sets a value indicating whether [use improved enum drop down]. + + + + + Gets or sets a value indicating whether [use improved enum drop down]. + + + + + Specify whether or not a list should hide the foldout triangle when the list is empty. + + + + + Specifies whether a list should hide the foldout triangle when the list is empty. + + + + + Specify whether or not lists should hide the paging buttons when the list is collapsed. + + + + + Specify whether or not lists should hide the paging buttons when there is only one page. + + + + + Specify the number of elements drawn per page. + + + + + Specify whether or not lists should be expanded or collapsed by default. + + + + + Specify whether or not to include a button which expands the list, showing all pages at once. + + + + + Specify whether or not lists should show item count. + + + + + Specify whether or not lists should show item count. + + + + + Specify the color of even list elements when in the dark skin. + + + + + Specify the color of odd list elements when in the dark skin. + + + + + Specify the color of even list elements when in the light skin. + + + + + Specify the color of odd list elements when in the light skin. + + + + + Gets or sets the default size of the preview object field. + + + + + Gets or sets the default alignment of the preview object field. + + + + + Gets or sets which types should be drawn by default by the preview object field. + + + + + Resets all settings to default. + + + + + Configurations for Odin DLLs import settings. + + + + + Gets or sets a value indicating whether or not Odin should automatically configure the import settings of its DLLs in a preprocess build step. + Keep in mind that this feature is only supported by Unity version 5.6 and up. + + + + + Gets a value indicating whether or not automatic configuration of Odin's DLL import settings is supported by the current Unity version. + + + + + + Tell Odin which types should be drawn or should not be drawn by Odin. + + + You can modify which types should be drawn by Odin in the Preferences window found in 'Tools -> Odin Inspector -> Preferences -> Editor Types', + or by locating the configuration file stored as a serialized object in the Sirenix folder under 'Odin Inspector/Config/Editor/InspectorConfig'. + + + + + + Whether Odin is enabled in the inspector or not. + + + + + InspectorDefaultEditors is a bitmask used to tell which types should have an Odin Editor generated. + + + + + The config which contains configuration data for which types Odin should draw in the inspector. + + + + + Updates Unity with the current Odin editor configuration. + + + + + InspectorDefaultEditors is a bitmask used to tell which types should have an Odin Editor generated. + + + + + + Excludes all types. + + + + + UserTypes includes all custom user scripts that are not located in an editor or plugin folder. + + + + + PluginTypes includes all types located in the plugins folder and are not located in an editor folder. + + + + + UnityTypes includes all types depended on UnityEngine and from UnityEngine, except editor, plugin and user types. + + + + + OtherTypes include all other types that are not depended on UnityEngine or UnityEditor. + + + + + Contains configuration data for which types Odin should draw in the inspector. + + + Note that this class supports assigning arbitrary editor types to inspect any Unity object type. The Editor Types GUI in preferences simply does not, as of now, support assigning editors of any other type than . However, the API is open to further customization. + When an editor is generated for a type, a new editor type is added to the GeneratedOdinEditors assembly, which is derived from the assigned editor type - in most cases, . + You can check if an editor is compatible using . + + . + . + + + + The type binder that the uses to bind types to names, and names to types. + This is usually an instance of . + + + + + Resets the drawing configuration to the default values. + + + + + Gets a list of all drawn types that have entries in the drawing config. + + + + + Forces the config's internal drawer type to value type lookup cache to rebuild itself. + + + + + Clears the editor type entry for the given drawer, so it will be set to Unity's default. + + The drawn type to clear the editor for. + drawnType is null + + + + Assigns a given editor to draw a given type. + + The drawn type to assign an editor type for. + The editor type to assign. When generating editors, a type derived from this editor will be created and set to draw the given drawn type. + drawnType + The type " + editorType.GetNiceName() + " is not a valid base editor for type " + drawnType.GetNiceName() + ". Check criteria using . + + + + Determines whether an editor value has been assigned for a given drawn type. + + The drawn type to check. + drawnType is null + + + + Gets which editor type would draw the given type. If the type has not been assigned a custom editor type in the config, the default editor type is returned using . + + The drawn type to get an editor type for. + The editor that would draw the given type. + drawnType is null + + + + Gets the default editor that this type would have, if no custom editor was set for this type in particular. This is calculated using the value of . + + The drawn type to get the default editor for. + The editor that would draw this type by default, or null, if there is no default Odin-defined editor for the drawn type. + drawnType is null + + + + Checks whether the given editor can be assigned to draw any type using the class. + + Type of the editor to check. + True if the editor is valid, otherwise false + + + + Checks whether the given editor can be assigned to draw a given type using the class. + This method checks the attribute on the type for whether the given type is compatible. + + Type of the editor to check. + Type of the drawn value to check. If this parameter is null, the drawn type is not checked for compatibility with the editor type; only the editor type itself is checked for validity. + True if the editor is valid, otherwise false + editorType + + + + Gets the type that an editor draws, by extracting it from the editor's attribute, if it is declared. + This method returns null for abstract editor types, as those can never draw anything. + + Type of the editor. + Whether the editor in question is also an editor for types derived from the given type. + + editorType + + + + A type that indicates that a drawer is missing. + + + + + Draws an instance, and contains methods getting all types that should be drawn by Odin. + Note that this class keeps a lot of static state, and is only intended to draw the instance of that exists in the singleton asset. If used to draw other instances, odd behaviour may occur. + + . + . + + + + Determines whether Odin is capable of creating a custom editor for a given type. + + + + + Gets an array of all assigned editor types, and the types they have to draw. + + + + + Draws the property. + + + + + Installed Odin Inspector Version Info. + + + + + Gets the name of the current running version of Odin Inspector. + + + + + Gets the current running version of Odin Inspector. + + + + + Whether the current version of Odin is an enterprise version. + + + + + Contains information about an editor type which is assigned to draw a certain type in the inspector. + This class uses the instance to bind types to names, and names to types. + + . + . + . + + + + A default, empty value. + + + + + The name of the type to be drawn. + + + + + The name of the editor type. + + + + + Initializes a new instance of the struct. + + The drawn type. + drawnType is null + + + + Initializes a new instance of the struct. + + The drawn type. + The editor type. + drawnType is null + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Implements the operator ==. + + The x. + The y. + + The result of the operator. + + + + + Implements the operator !=. + + The x. + The y. + + The result of the operator. + + + + + A contextual value attached to an , mapped to a key, contained in a . + + + + + The contained value. + + + + + Creates a new PropertyContext. + + + + + Performs an explicit conversion from to . + + The context. + + The result of the conversion. + + + + + Returns a that represents this instance, of the format ": Value.ToString()". + + + A that represents this instance. + + + + + Contains a context for an , which offers the ability to address persistent values by key across several editor GUI frames. + Use this in drawers to store contextual editor-only values such as the state of a foldout. + + + + + Initializes a new instance of the class. + + The property. + property + + + + Gets a global context value for a given key, using a given delegate to generate a default value if the context doesn't already exist. + Global contexts are not associated with any one specific drawer, and so are shared across all drawers for this property. + + The type of the context value to get. + The key of the context value to get. + A delegate for generating a default value. + The found context. + + + + Gets a global context value for a given key, using a given default value if the context doesn't already exist. + Global contexts are not associated with any one specific drawer, and so are shared across all drawers for this property. + + The type of the context value to get. + The key of the context value to get. + The default value to set if the context value doesn't exist yet. + The found context. + + + + Gets a global context value for a given key, and creates a new instance of as a default value if the context doesn't already exist. + Global contexts are not associated with any one specific drawer, and so are shared across all drawers for this property. + + The type of the context value to get. + The key of the context value to get. + The found context. + + + + Gets a object and creates a object for it. + + The type of the value of the context. + The instance of the drawer. + The key for the context. + The default value for the context. + + + + Gets a object and creates a object for it. + Returns true when the is first created. Otherwise false. + + The type of the value of the context. + The instance of the drawer. + The key for the context. + The object. + Returns true when the is first created. Otherwise false. + + + + Swaps context values with a given . + + The context to swap with. + + + + An can implement this interface to indicate that it defines right-click context menu items for properties that it draws. + + + + + Method that is invoked when a user has right-clicked a property, and the context menu is being built. The method is invoked in order of drawer priority. + + The property that has been right-clicked on. + The generic menu instance that is being built. Add items to this. + + + + A polymorphic alias for getting and setting the values of an . + + The type of the owner. + The type of the value. + The type of the property owner. + The type of the property value. + + + + Gets the type of the owner. + + + + + Gets the type of the value. + + + + + Whether the value is readonly. + + + + + Initializes a new instance of the class. + + The information. + info + + + + Gets the value from a given weakly typed owner. + + The weakly typed owner. + The found value. + + + + Gets the value from a given owner. + + The owner. + owner is null + + + + Sets the weakly typed value on a given weakly typed owner. + + The owner. + The value. + + + + Sets the value on a given owner. + + The owner. + The value. + + + + Responsible for getting and setting values on properties. + + The type of the owner. + The type of the value. + + + + + Whether the value is readonly. + + + + + Gets the type of the owner. + + + + + Gets the type of the value. + + + + + Initializes a new instance of the class. + + The field member to represent. + if set to true [is readonly]. + + + + Initializes a new instance of the class. + + The getter. + The setter. + getter + + + + Initializes a new instance of the class. + + The getter. + The setter. + getter + + + + Gets the value from a given owner. + + The owner. + The found value. + owner is null + + + + Gets the value from a given weakly typed owner. + + The weakly typed owner. + The found value. + + + + Sets the weakly typed value on a given weakly typed owner. + + The owner. + The value. + + + + Sets the value on a given owner. + + The owner. + The value. + + + + Contains meta-data information about a property in the inspector, that can be used to create an actual property instance. + + + + + The name of the property. + + + + + Gets a value indicating whether this InspectorPropertyInfo has any backing members. + + + + + Gets a value indicating whether this InspectorPropertyInfo has only a single backing member. + + + + + The member info of the property. If the property has many member infos, such as if it is a group property, the first member info of is returned. + + + + + Indicates which type of property it is. + + + + + The serialization backend for this property. + + + + + The type on which this property is declared. + + + + + The base type of the value which this property represents. If there is no value, this will be null. + + + + + Whether this property is editable or not. + + + + + All member infos of the property. There will only be more than one member if it is an . + + + + + The order value of this property. Properties are (by convention) ordered by ascending order, IE, lower order values are shown first in the inspector. The final actual ordering of properties is decided upon by the property resolver. + + + + + The attributes associated with this property. + + + + + Whether this property only exists as a Unity , and has no associated managed member to represent it. + This case requires some special one-off custom behaviour in a few places. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the first attribute of a given type on this property. + + + + + Gets the first attribute of a given type on this property, which is not contained in a given hashset. + + The attributes to exclude. + + + + Gets all attributes of a given type on the property. + + + + + The s of all the individual properties in this group. + + + + + Gets the property's method delegate, if there is one. Note that this is null if a method property is backed by an actual method member. + + + + + Gets all s for a given type. + + The parent property. + The type to get infos for. + if set to true members that are serialized by Odin will be included. + + + + Gets an aliased version of a member, with the declaring type name included in the member name, so that there are no conflicts with private fields and properties with the same name in different classes in the same inheritance hierarchy. + + + + + Represents a property in the inspector, and provides the hub for all functionality related to that property. + + + + + Gets the property which is the ultimate root of this property's serialization. + + + + + The name of the property. + + + + + The nice name of the property, usually as converted by . + + + + + The cached label of the property, usually containing . + + + + + The full Odin path of the property. To get the Unity property path, see . + + + + + The child index of this property. + + + + + Gets the resolver for this property's children. + + + + + The current recursive draw depth, incremented for each time that the property has caused itself to be drawn recursively. + Note that this is the current recursion level, not the total amount of recursions so far this frame. + + + + + The amount of times that the property has been drawn so far this frame. + + + + + How deep in the drawer chain the property currently is, in the current drawing session as determined by . + + + + + Whether this property supports having prefab modifications applied or not. + + + + + Gets an immutable list of the components attached to the property. + + + + + Gets an immutable list of processed attributes for the property. + + + + + Gets an array of the state updaters of the property. Don't change the contents of this array! + + + + + The value entry that represents the base value of this property. + + + + + The value entry that represents the strongly typed value of the property; this is possibly an alias entry in case of polymorphism. + + + + + The parent of the property. If null, this property is a root-level property in the . + + + + + The of this property. + + + + + The that this property exists in. + + + + + The children of this property. + + + + + The context container of this property. + + + + + The last rect that this property was drawn within. + + + + + The type on which this property is declared. This is the same as . + + + + + The parent values of this property, by selection index; this represents the values that 'own' this property, on which it is declared. + + + + + The full Unity property path of this property; note that this is merely a converted version of , and not necessarily a path to an actual Unity property. + In the case of Odin-serialized data, for example, no Unity properties will exist at this path. + + + + + The full path of this property as used by deep reflection, containing all the necessary information to find this property through reflection only. This is used as the path for prefab modifications. + + + + + The full path of this property as used by prefab modifications and the deep reflection system, containing all the necessary information to find this property through reflection only. + + + + + The PropertyState of the property at the current draw count index. + + + + + Gets the component of a given type on the property, or null if the property does not have a component of the given type. + + + + + Marks the property's serialization root values dirty if they are derived from UnityEngine.Object. + + + + + Records the property's serialization root for undo to prepare for undoable changes, with a custom string that includes the property path and Unity object name. If a message is specified, it is included in the custom undo string. + + + + + Gets the first attribute of a given type on this property. + + + + + Gets the first attribute of a given type on this property, which is not contained in a given hashset. + + The attributes to exclude. + + + + Gets all attributes of a given type on the property. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Draws this property in the inspector. + + + + + Draws this property in the inspector with a given default label. This default label may be overridden by attributes on the drawn property. + + + + + Push a draw session. This is used by and . + + + + + Increments the current drawer chain index. This is used by . + + + + + Pop a draw session. This is used by and . + + + + + Gets the next property in the , or null if none is found. + + Whether to include children or not. + Whether to only include visible properties. + + + + Finds the first parent property that matches a given predicate. + + + + + Finds the first child recursively, that matches a given predicate. + + + + + Updates the property. This method resets the temporary context, and updates the value entry and the property children. + + If true, the property will update regardless of whether it has already updated for the current . + + + + Populates a generic menu with items from all drawers for this property that implement . + + + + + Determines whether this property is the child of another property in the hierarchy. + + The property to check whether this property is the child of. + other is null + + + + Determines whether this property is a parent of another property in the hierarchy. + + The property to check whether this property is the parent of. + other is null + + + + Handles all prefab modifications that apply to the targets of a property tree, if any. This class determines which properties have modifications, what the modifications are, auto-applies modifications if the current instance values do not correspond to the prefab values, and also provides an API for modifying those modifications. + NOTE: This class is liable to see a lot of changes, as the prefab modification system is slated to be redesigned for increased extendability in the future. Do not depend overly on the current API. + + + + + The prefabs for each prefab instance represented by the property tree, if any. + + + + + Whether any of the values the property tree represents are prefab instances. + + + + + A prefab tree for the prefabs of this property tree's prefab instances, if any exist. + + + + + Gets the Unity PropertyModification for the property at this path, if there are any. + + The property path to get the modification for. + The index of the tree target to get the modification for. + Whether any children of the path have modifications registered. + + + + + Gets the Odin prefab modification type of a given property, if any. + + The property to check. + + + The prefab modification type of the property if it has one, otherwise null. + + + + + Registers a modification of type for a given property. + + The property to register a modification for. + Selection index of the target to register a modification for. + The modified list length. + + Property " + property.Path + " does not have a value entry; cannot register prefab modification to this property. + or + newLength cannot be negative! + + + + + Registers a modification of type for a given property. + + The property to register a modification for. + Selection index of the target to register a modification for. + Whether to force the change to be registered immediately, rather than at the end of frame. + Property " + property.Path + " does not have a value entry; cannot register prefab modification to this property. + + + + Calculates a delta between the current dictionary property and its prefab counterpart, and registers that delta as a modification. + + The property to register a modification for. + Selection index of the target. + Property " + property.Path + " does not have a value entry; cannot register prefab modification to this property. + + + + Adds a remove key modification to the dictionary modifications of a given property. + + The property to register a modification for. + Selection index of the target. + The key to be removed. + Property " + property.Path + " does not have a value entry; cannot register prefab modification to this property. + + + + Adds an add key modification to the dictionary modifications of a given property. + + The property to register a modification for. + Selection index of the target. + The key to be added. + Property " + property.Path + " does not have a value entry; cannot register prefab modification to this property. + + + + Removes all dictionary modifications on a property for a given dictionary key value. + + The property to remove a key modification for. + Selection index of the target. + The key to remove modifications for. + key + + + + Removes all prefab modifications of a given type on a given property. + + The property to remove modifications for. + Selection index of the target. + Type of the modification to remove. + + + + Gets all prefab modifications in this property tree for a given selection index. + + + + + + + Represents the children of an . + + + + + The that this instance handles children for. + + + + + Gets a child by index. This is an alias for . + + The index of the child to get. + The child at the given index. + + + + Gets a child by name. This is an alias for . + + The name of the child to get. + The child, if a child was found; otherwise, null. + + + + Gets a child by name. This is an alias for . + + The name of the child to get. + The child, if a child was found; otherwise, null. + + + + Initializes a new instance of the class. + + The property to handle children for. + property is null + + + + The number of children on the property. + + + + + Updates this instance of . + + + + + Gets a child by name. + + The name of the child to get. + The child, if a child was found; otherwise, null. + name + + + + Gets a child by name. + + The name of the child to get. + The child, if a child was found; otherwise, null. + name + + + + Gets a child by index. + + The index of the child to get. + + The child at the given index. + + The given index was out of range. + + + + Gets the path of the child at a given index. + + The index to get the path of. + The path of the child at the given index. + The given index was out of range. + + + + Returns an IEnumerable that recursively yields all children of the property, depth first. + + + + + Gets the property's already created children. If the child count is less than or equal to 10000, children are returned in order. If the count is larger than 10000, they are returned in no particular order. + + + + + Gets the enumerator. + + + + + Gets the enumerator. + + + + + This is a class for creating, getting and modifying a property's various states. An instance of this class always comes attached to an InspectorProperty. + See Odin's tutorials for more information about usage of the state system. + + + + + If set to true, all state changes for this property will be logged to the console. + + + + + Whether the property is visible in the inspector. + + + + + Whether the Visible state was true or not during the last layout event. + + + + + Whether the property is enabled in the inspector. + + + + + Whether the Enabled state was true or not during the last layout event. + + + + + Whether the property is expanded in the inspector. + + + + + Whether the Expanded state was true or not during the last layout event. + + + + + Creates a custom state with a given name. + + + + + + + + + Determines whether a state with the given key exists. + + The key to check. + True if the state exists, otherwise, false. + + + + Determines whether a state with the given key exists. + + The key to check. + If the state exists, this out parameter will be true if the state is persistent. + True if the state exists, otherwise, false. + + + + Determines whether a state with the given key exists. + + The key to check. + If the state exists, this out parameter will contain the type of value that the state contains. + True if the state exists, otherwise, false. + + + + Determines whether a state with the given key exists. + + The key to check. + If the state exists, this out parameter will be true if the state is persistent. + If the state exists, this out parameter will contain the type of value that the state contains. + True if the state exists, otherwise, false. + + + + Gets the value of a given state as an instance of type T. + + The type to get the state value as. An will be thrown if the state's value type cannot be assigned to T. + The key of the state to get. An will be thrown if a state with the given key does not exist. + The value of the state. + + + + Gets the value that a given state contained last layout as an instance of type T. + + The type to get the state value as. An will be thrown if the state's value type cannot be assigned to T. + The key of the state to get. An will be thrown if a state with the given key does not exist. + The value of the state during the last layout event. + + + + Sets the value of a given state to a given value. + + The type to set the state value as. An will be thrown if T cannot be assigned to the state's value type. + The key of the state to set the value of. An will be thrown if a state with the given key does not exist. + The value to set. + + + + Cleans the property state and prepares it for cached reuse of its containing PropertyTree. This will also reset the state. + + + + + Resets all states to their default values. Persistent states will be updated to their persistent cached value if one exists. + + + + + Represents a set of values of the same type as a tree of properties that can be drawn in the inspector, and provides an array of utilities for querying the tree of properties. + + + + + Delegate for on property value changed callback. + + + + + This will be replaced by an IMGUIDrawingComponent in patch 3.2. + + + + + The component providers that create components for each property in the tree. If you change this list after the tree has been used, you should call tree.RootProperty.RefreshSetup() to make the changes update properly throughout the tree. + + + + + The that this tree represents, if the tree was created for a . + + + + + The current update ID of the tree. This is incremented once, each update, and is used by to avoid updating multiple times in the same update round. + + + + + The type of the values that the property tree represents. + + + + + The actual values that the property tree represents. + + + + + The number of root properties in the tree. + + + + + The prefab modification handler of the tree. + + + + + Whether this property tree also represents members that are specially serialized by Odin. + + + + + Gets a value indicating whether or not to draw the mono script object field at the top of the property tree. + + + + + Gets a value indicating whether or not the PropertyTree is inspecting a static type. + + + + + The serialization backend used to determine how to draw this property tree. Set this to control. + + + + + Gets or sets the for the PropertyTree. + + + + + Gets or sets the for the PropertyTree. + + + + + Gets or sets the for the PropertyTree. + + + + + Gets or sets the for the PropertyTree. + + + + + An event that is invoked whenever an undo or a redo is performed in the inspector. + The advantage of using this event on a property tree instance instead of + is that this event will be desubscribed from + when the selection changes and the property + tree is no longer being used, allowing the GC to collect the property tree. + + + + + This event is invoked whenever the value of any property in the entire property tree is changed through the property system. + + + + + Creates a new for all target values of a . + + + + + Gets the root property of the tree. + + + + + Gets the secret root property of the tree, which hosts the property resolver used to resolve the "actual" root properties of the tree. + + + + + Registers that a given property is dirty and needs its changes to be applied at the end of the current frame. + + + + + Schedules a delegate to be invoked at the end of the current GUI frame. + + The action delegate to be delayed. + + + + Schedules a delegate to be invoked at the end of the next Repaint GUI frame. + + The action to be delayed. + + + + Enumerates over the properties of the tree. + + Whether to include children of the root properties or not. If set to true, every property in the entire tree will be enumerated. + Whether to only include visible properties. Properties whose parents are invisible are considered invisible. + + + + Gets the property at the given path. Note that this is the path found in , not the Unity path. + + The path of the property to get. + + + + Gets the property at the given path. Note that this is the path found in , not the Unity path. + + The path of the property to get. + + + + + Gets the property at the given Unity path. + + The Unity path of the property to get. + + + + Gets the property at the given Unity path. + + The Unity path of the property to get. + + + + + Gets the property at the given deep reflection path. + + The deep reflection path of the property to get. + + + + Gets the property at the given Odin prefab modification path. + + The prefab modification path of the property to get. + + + + Gets the property at the given Odin prefab modification path. + + The prefab modification path of the property to get. + + + + + Draw the property tree, and handles management of undo, as well as marking scenes and drawn assets dirty. + + This is a shorthand for calling + , + and . + . + + + + + + Draws a search bar for the property tree, and draws the search results if the search bar is used. + If this method returns true, the property tree should generally not be drawn normally afterwards. + Note that this method will throw exceptions if the property tree is not set up to be searchable; for that, see . + + True if the property tree is being searched and is currently drawing its search results, otherwise false. + + + + Gets a Unity property for the given Odin or Unity path. If there is no for this property tree, or no such property is found in the , a property will be emitted using . + + The Odin or Unity path to the property to get. + + + + Gets a Unity property for the given Odin or Unity path. If there is no for this property tree, or no such property is found in the , a property will be emitted using . + + The Odin or Unity path to the property to get. + The backing field of the Unity property. + + + + Checks whether a given object instance is referenced anywhere in the tree, and if it is, gives the path of the first time the object reference was encountered as an out parameter. + + The reference value to check. + The first found path of the object. + + + + Gets the number of references to a given object instance in this tree. + + + + + Updates all properties in the entire tree, and validates the prefab state of the tree, if applicable. + + + + + Replaces all occurrences of a value with another value, in the entire tree. + + The value to find all instances of. + The value to replace the found values with. + + + + Gets the root tree property at a given index. + + The index of the property to get. + + + + Invokes the actions that have been delayed using and . + + + + + Applies all changes made with properties to the inspected target tree values, and marks all changed Unity objects dirty. + + true if any values were changed, otherwise false + + + + Invokes the OnValidate method on the property tree's targets if they are derived from and have the method defined. + + + + + Registers an object reference to a given path; this is used to ensure that objects are always registered after having been encountered once. + + The referenced object. + The property that contains the reference. + + + + Creates a PropertyTree to inspect the static values of the given type. + + The type to inspect. + A PropertyTree instance for inspecting the type. + + + + Creates a new for a given target value. + + The target to create a tree for. + target is null + + + + Creates a new for a given target value. + + The target to create a tree for. + The serialization backend to use for the tree root. + target is null + + + + Creates a new for a set of given target values. + Note that the targets all need to be of the same type. + + The targets to create a tree for. + targets is null + + + + Creates a new for all target values of a . + + The serialized object to create a tree for. + serializedObject is null + + + + Creates a new for all target values of a . + + The serialized object to create a tree for. + serializedObject is null + The serialization backend to use for the tree root. + + + + Creates a new for a set of given target values. + Note that the targets all need to be of the same type. + + The targets to create a tree for. + + + + Creates a new for a set of given target values. + Note that the targets all need to be of the same type. + + The targets to create a tree for. + The serialization backend to use for the tree root. + + + + Creates a new for a set of given target values, represented by a given . + Note that the targets all need to be of the same type. + + The targets to create a tree for. + The serialized object to create a tree for. Note that the target values of the given must be the same values given in the targets parameter. + + + + Creates a new for a set of given target values, represented by a given . + Note that the targets all need to be of the same type. + + The targets to create a tree for. + The serialized object to create a tree for. Note that the target values of the given must be the same values given in the targets parameter. + The serialization backend to use for the tree root. + + + + Sets whether the property tree should be searchable or not, and allows the passing in of a custom SearchableAttribute instance to configure the search. + + Whether the tree should be set to be searchable or not. + If the tree is set to be searchable, then if this parameter is not null, it will be used to configure the property tree search. If the parameter is null, the SearchableAttribute on the tree's will be used. If that property has no such attribute, then default search settings will be applied. + + + + Represents a set of strongly typed values as a tree of properties that can be drawn in the inspector, and provides an array of utilities for querying the tree of properties. + This class also handles management of prefab modifications. + + + + + Gets the root property of the tree. + + + + + Gets the secret root property of the PropertyTree. + + + + + Gets the for the PropertyTree. + + + + + The current update ID of the tree. This is incremented once, each update, and is used by to avoid updating multiple times in the same update round. + + + + + The that this tree represents, if the tree was created for a . + + + + + The type of the values that the property tree represents. + + + + + The strongly types actual values that the property tree represents. + + + + + The weakly types actual values that the property tree represents. + + + + + The number of root properties in the tree. + + + + + Whether this property tree also represents members that are specially serialized by Odin. + + + + + Initializes a new instance of the class, inspecting only the target () type's static members. + + + + + Initializes a new instance of the class. + + The serialized object to represent. + + + + Initializes a new instance of the class. + + The targets to represent. + + + + Initializes a new instance of the class. + + The targets to represent. + The serialized object to represent. Note that the target values of the given must be the same values given in the targets parameter. + targets is null + + There must be at least one target. + or + A given target is a null value. + + + + + Initializes a new instance of the class. + + The targets to represent. + The serialized object to represent. Note that the target values of the given must be the same values given in the targets parameter. + The serialization backend to use for the tree root. + targets is null + + There must be at least one target. + or + A given target is a null value. + + + + + Applies all changes made with properties to the inspected target tree values. + + + true if any values were changed, otherwise false + + + + + Registers that a given property is dirty and needs its changes to be applied at the end of the current frame. + + + + + + + Updates all properties in the entire tree, and validates the prefab state of the tree, if applicable. + + + + + Checks whether a given object instance is referenced anywhere in the tree, and if it is, gives the path of the first time the object reference was encountered as an out parameter. + + The reference value to check. + The first found path of the object. + + + + Gets the number of references to a given object instance in this tree. + + + + + + Gets the property at the given path. Note that this is the path found in , not the Unity path. + + The path of the property to get. + + + + Gets the property at the given path. Note that this is the path found in , not the Unity path. + + The path of the property to get. + + + + + Finds the property at the specified unity path. + + The unity path for the property. + The property found at the path. + + + + Finds the property at the specified unity path. + + The unity path for the property. + + The property found at the path. + + + + Finds the property at the specified modification path. + + The prefab modification path for the property. + The property found at the path. + + + + Finds the property at the specified modification path. + + The prefab modification path for the property. + + The property found at the path. + + + + Gets a Unity property for the given Odin or Unity path. If there is no for this property tree, or no such property is found in the , a property will be emitted using . + + The Odin or Unity path to the property to get. + The backing field of the Unity property. + + + + Enumerates over the properties of the tree. WARNING: For tree that have large targets with lots of data, this may involve massive amounts of work as the full tree structure is resolved. USE THIS METHOD SPARINGLY AND ONLY WHEN ABSOLUTELY NECESSARY! + + Whether to include children of the root properties or not. If set to true, every property in the entire tree will be enumerated. + /// Whether to only include visible properties. Properties whose parents are invisible are considered invisible. + + + + Replaces all occurrences of a value with another value, in the entire tree. + + The value to find all instances of. + The value to replace the found values with. + + The value to replace with must either be null or be the same type as the value to replace (" + from.GetType().Name + "). + + + + Gets the root tree property at a given index. + + The index of the property to get. + + + + Schedules a delegate to be invoked at the end of the current GUI frame. + + The action delegate to be delayed. + action + + + + Schedules a delegate to be invoked at the end of the next Repaint GUI frame. + + The action to be delayed. + action + + + + Invokes the actions that have been delayed using and . + + + + + Enumeration describing the different types of properties that exist. + + + + + Property represents a value. + + + + + Property represents a method. + + + + + Property represents a named group of properties. + + + + + Enumeration for designating whether a has a special state,. + + + + + The value entry has no special state. + + + + + The property is a reference to another property. Get the path of the referenced property from . + + + + + The value entry is a null value. + + + + + The value entry has a primitive value conflict across selected indices. + A primitive value conflict is when primitive values, such a strings or floats, differ. + + + + + The value entry has a reference value conflict across selected indices. + A reference value conflict is when the types of reference type values differ, or when some values are null while others are not. + + + + + The value entry has a reference path conflict across selected indices. + A reference path conflict is when the property consists of references to many conflicting paths. Use to get paths to all referenced objects. + + + + + The value entry has a collection length conflict across selected indices. + A collection length conflict is when the property represents multiple parallel collections, and their lengths differ. + + + + + This attribute processor will take any attribute already applied to the property with the applied to, + and take all attributes applied to the attribute (except any ) and add to them to the property. + This allows for adding attributes to attributes in the property system. + + + + + Looks for attributes in the attributes list with a applied, and adds the attribute from those attributes to the property. + + The parent of the member. + The member that is being processed. + The list of attributes currently applied to the property. + + + + Finds all attributes attached to the specified member and adds to them to attribute list. + + + + + This attribute processor can only process for members. + + The property to process. + false. + + + + Finds all attributes attached to the specified member and adds to them to the attributes list. + + The parent property of the specified member. + The member to process attributes for. + The current attributes applied to the property. + + + + Attribute processor that can add, change and remove attributes from a property. + + + + + Instanciates an OdinAttributeProcessor instance of the specified type. + + The type of processor to instanciate. The type must inherit from . + A new instance of the specified type. + + + + Checks if the processor can process attributes for the specified member. + + The parent property of the member. + The member to be processed. + true if the processor can process for the specified member. Otherwise false. + + + + Checks if the processor can process attributes for the specified property. + + The property to process. + true if the processor can process attributes for the specified property. Otherwise false. + + + + Processes attributes for the specified member. + + The parent property of the specified member. + The member to process attributes for. + The current attributes applied to the property. + + + + Processes attributes for the specified property. + + The property to process attributes for. + The current attributes applied to the property. + + + + Attribute processor that can add, change and remove attributes from a property. + + + + + Find attributes attached to the type definition of a property and adds to them to attribute list. + + + + + This attribute processor can only process for properties. + + The parent of the specified member. + The member to process. + false. + + + + This attribute processor can only process for properties with an attached value entry. + + The property to process. + true if the specified property has a value entry. Otherwise false. + + + + Finds all attributes attached to the type and base types of the specified property value and adds them to the attribute list. + + The property to process. + The list of attributes for the property. + + + + Default implementation and the version that will be used when no other OdinAttributeProcessorLocator instance have been given to a PropertyTree. + This implementation will find all AttributeProcessor definitions not marked with the . + + + + + Singleton instance of the DefaultOdinAttributeProcessorLocator class. + + + + + Type search index used for matching to properties. + + + + + Gets a list of to process attributes for the specified child member of the parent property. + + The parent of the member. + Child member of the parent property. + List of to process attributes for the specified member. + + + + Gets a list of to process attributes for the specified property. + + The property to find attribute porcessors for. + List of to process attributes for the speicied member. + + + + Default implementation and the version that will be used by if no other instance have been specified. + + + + + Singleton instance of . + + + + + Gets an instance for the specified property. + + The property to get an instance for. + An instance of to resolver the specified property. + + + + Base class definition for OdinAttributeProcessorLocator. Responsible for finding and creating instances to process attributes for properties. + Default OdinAttributeProcessorLocator have been implemented as . + + + + + Gets a list of to process attributes for the specified child member of the parent property. + + The parent of the member. + Child member of the parent property. + List of to process attributes for the specified member. + + + + Gets a list of to process attributes for the specified property. + + The property to find attribute porcessors for. + List of to process attributes for the speicied member. + + + + Base class for locator of . Use for default implementation. + + + + + Gets an instance for the specified property. + + The property to get an instance for. + An instance of to resolver the specified property. + + + + Note: this interface may be temporary, and may eventually be substituted for a public-facing way of extending the prefab modification system. + + For now, it only exists to denote which internally defined resolvers support prefab modifications being set. + + + + + Contains information about a change that is going to occur/has occurred to a collection. + + + + + + Specifies the kinds of changes that can occur to collections. + + + + + Unknown collection change, the change was not specified by the invoking code. + + + + + The change is adding a value to the collection. Value and SelectionIndex will be set. + + + + + The change is inserting a value into the collection. Index, Value and SelectionIndex will be set. + + + + + The change is removing a value from the collection. Value and SelectionIndex will be set. + + + + + The change is removing a value at an index from the collection. Index and SelectionIndex will be set. + + + + + The change is clearing the collection. SelectionIndex will be set. + + + + + The change is removing a key from the collection. Key and SelectionIndex will be set. + + + + + The change is setting the value of a key in the collection. Key, Value and SelectionIndex will be set. + + + + + Class that describes the different possible serialization backends that a property can have, + and specifies the capabilities of each backend. + + + + + The property is serialized by Unity's polymorphic serialization backend via the [SerializeReference] attribute. Polymorphism, null values and cyclical references are supported. + + + + + The property is serialized by Unity's classic serialization backend. Polymorphism, null values and types such as are not supported. + + + + + The property is serialized by Odin. Polymorphism, null values and types such as are supported. + + + + + The property is not serialized by anything - possibly because it is a method, possibly because it is a field or property shown in the inspector without being serialized. + In the case of fields or properties, polymorphism, null values and types such as are supported, but will not be saved. + + + + + The property is not serialized by anything - possibly because it is a method, possibly because it is a field or property shown in the inspector without being serialized. + In the case of fields or properties, polymorphism, null values and types such as are supported, but will not be saved. + + + + + The property is serialized by Unity's classic serialization backend. Polymorphism, null values and types such as are not supported. + + + + + The property is serialized by Unity's polymorphic serialization backend via the [SerializeReference] attribute. Polymorphism, null values and cyclical references are supported. + + + + + The property is serialized by Odin. Polymorphism, null values and types such as are supported. + + + + + Gets the attribute that the OdinAttributeStateUpdater applies to. + + + + + Gets the strongly typed ValueEntry of the OdinAttributeStateUpdater's property. + + + + + Gets the strongly typed ValueEntry of the OdinValueStateUpdater's property. + + + + + Represents a weakly typed collection of values for a - one value per selected inspector target. + + + + + Whether the values have been changed since was last called. + + + + + Marks the value collection as being clean again. This is typically called at the end of the current GUI frame, during . + + + + + Marks the value collection as being dirty, regardless of any value changes. + + + + + Reverts the value collection to its origin values (found in ) from the last call, and marks the value collection as being clean again. + + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + The original values of the value collection, such as they were immediately after the last call. + + + + + Represents a strongly typed collection of values for a - one value per selected inspector target. + + + + + Gets the value at the given selection index. + + + + + The number of values in the collection. + + + + + The original values of the value collection, such as they were immediately after the last call. + + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + Represents the values of an , and contains utilities for querying the values' type and getting and setting them. + + + + + The number of parallel values this entry represents. This will always be exactly equal to the count of . + + + + + Whether this value entry is editable or not. + + + + + If this value entry has the override type , this is the path of the property it references. + + + + + The actual serialization backend for this value entry, possibly inherited from the serialization backend of the root property this entry is a child of. + Note that this is *not* always equal to . + + + + + The property whose values this value entry represents. + + + + + Provides access to the weakly typed values of this value entry. + + + + + Whether this value entry has been changed from its prefab counterpart. + + + + + Whether this value entry has had its list length changed from its prefab counterpart. + + + + + Whether this value entry has had its dictionary values changes from its prefab counterpart. + + + + + A weakly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + The type from which this value entry comes. If this value entry represents a member value, this is the declaring type of the member. If the value entry represents a collection element, this is the type of the collection. + + + + + The most precise known contained type of the value entry. If polymorphism is in effect, this will be some type derived from . + + + + + The base type of the value entry. If this is value entry represents a member value, this is the type of the member. If the value entry represents a collection element, this is the element type of the collection. + + + + + The special state of the value entry. + + + + + Whether this value entry is an alias, or not. Value entry aliases are used to provide strongly typed value entries in the case of polymorphism. + + + + + The context container of this property. + + + + + Whether this type is marked as an atomic type using a . + + + + + An event that is invoked during , when any values have changed. + + + + + An event that is invoked during , when any child values have changed. + + + + + Updates the values contained in this value entry to the actual values in the target objects, and updates its state (override, type of value, etc.) accordingly. + + + + + Applies the changes made to this value entry to the target objects, and registers prefab modifications as necessary. + + True if any changes were made, otherwise, false. + + + + Checks whether the values in this value entry are equal to the values in another value entry. + Note, both value entries must have the same value type, and must represent values that are .NET value types. + + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + Represents the strongly typed values of an , and contains utilities for querying the values' type and getting and setting them. + + + + + Provides access to the strongly typed values of this value entry. + + + + + A strongly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + An internally used interface that is used by value entries during , that lets value entries force each other to set values directly to their target objects. + This interface should not be used by people who do not know what they are doing. + + + + + Sets the actual value of a value entry, for a given selection index. + + + + + An internally used interface that is used by value entries during , that lets value entries force each other to set values directly to their target objects. + This interface should not be used by people who do not know what they are doing. + + + + + Sets the actual value of a value entry, for a given selection index. + + + + + Represents a weakly typed collection of values for a - one value per selected inspector target. + + + + + The property whose values are represented. + + + + + Initializes a new instance of the class. + + The property to represent. + property is null + + + + Whether the values have been changed since was last called. + + + + + The number of values in the collection. + + + + + Gets a value indicating whether this instance is synchronized. + + + true if this instance is synchronized; otherwise, false. + + + + + Gets the synchronization root object. + + + The synchronization root object. + + + + + The original values of the (loosely typed) value collection, such as they were immediately after the last call. + + + + + Gets or sets the weakly typed at the specified index. + + + The value. + + The index to set. + + + + Gets an enumerator for the collection. + + + + + Marks the value collection as being clean again. This is typically called at the end of the current GUI frame, during . + + + + + Reverts the value collection to its origin values (found in ) from the last call, and marks the value collection as being clean again. + + + + + Determines whether the collection contains the specified value. + + The value. + + true if the collection contains the specified value; otherwise, false. + + + + + Copies the collection to an array. + + The array to copy to. + The index to copy from. + + + + Gets the index of the given value, or -1 if the value was not found. + + The value to get the index of. + The index of the given value, or -1 if the value was not found. + + + + Gets the weakly typed value at the given index. + + The index of the value to get. + The weakly typed value at the given index + + + + Sets the weakly typed value at the given index. + + The index to set the value of. + The value to set. + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + Marks the value collection as being dirty, regardless of any value changes. + + + + + Represents a strongly typed collection of values for a - one value per selected inspector target. + + The element type of the collection. + + + + + Initializes a new instance of the class. + + The property. + The internal array. + The original array. + The internal atom array. + The original atom array. + + + + Whether the values have been changed since was last called. + + + + + The number of values in the collection. + + + + + Gets a value indicating whether this instance is synchronized. + + + true if this instance is synchronized; otherwise, false. + + + + + Gets the synchronization root object. + + + The synchronization root object. + + + + + The original values of the (loosely typed) value collection, such as they were immediately after the last call. + + + + + Gets or sets the at the specified index. + + + The . + + The index. + + + + + Gets an enumerator for the collection. + + + + + Marks the value collection as being clean again. This is typically called at the end of the current GUI frame, during . + + + + + Reverts the value collection to its origin values (found in ) from the last call, and marks the value collection as being clean again. + + + + + Copies the collection to an array. + + The array to copy to. + The index to copy from. + + + + Gets the weakly typed value at the given index. + + The index of the value to get. + + The weakly typed value at the given index + + + + + Sets the weakly typed value at the given index. + + The index to set the value of. + The value to set. + + + + Determines whether the collection contains the specified value. + + The value. + + true if the collection contains the specified value; otherwise, false. + + + + + Gets the index of the given value, or -1 if the value was not found. + + The value to get the index of. + + The index of the given value, or -1 if the value was not found. + + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + + Marks the value collection as being dirty, regardless of any value changes. + + + + + Represents an alias for a strongly typed collection of values for a - one value per selected inspector target. + This class ensures that polymorphism works in the inspector, and can be strongly typed in applicable cases. + + The type of the aliased collection. + The polymorphic type of this collection, which is assignable to . + + + + + + Initializes a new instance of the class. + + The property. + The aliased collection. + Not yet documented. + Not yet documented. + aliasedCollection + + + + Whether the values have been changed since was last called. + + + + + The number of values in the collection. + + + + + Gets a value indicating whether this instance is synchronized. + + + true if this instance is synchronized; otherwise, false. + + + + + Gets the synchronization root object. + + + The synchronization root object. + + + + + The original values of the (loosely typed) value collection, such as they were immediately after the last call. + + + + + The original values of the value collection, such as they were immediately after the last call. + + + + + Gets or sets the at the specified index. + + + The . + + The index. + + + + + Gets an enumerator for the collection. + + + + + + Marks the value collection as being clean again. This is typically called at the end of the current GUI frame, during . + + + + + Reverts the value collection to its origin values (found in ) from the last call, and marks the value collection as being clean again. + + + + + Determines whether the collection contains the specified value. + + The value. + + true if the collection contains the specified value; otherwise, false. + + + + + Gets the index of the given value, or -1 if the value was not found. + + The value to get the index of. + + The index of the given value, or -1 if the value was not found. + + + + + Copies the collection to an array. + + The array to copy to. + The index to copy from. + + + + Gets the weakly typed value at the given index. + + The index of the value to get. + + The weakly typed value at the given index + + + + + Sets the weakly typed value at the given index. + + The index to set the value of. + The value to set. + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + Force sets the value, ignoring whether it is editable or not. + Note that this will fail on list element value entries where is true on the parent value entry. + + The selection index of the value. + The value to be set. + + + + Marks the value collection as being dirty, regardless of any value changes. + + + + + Represents the values of an , and contains utilities for querying the values' type and getting and setting them. + + + + + + Delegate type used for the events and . + + + + + The nearest parent property that has a value. + That is, the property from which this value + entry will fetch its parentvalues from in order + to extract its own values. + + If is null, this is a root property. + + + + + Whether this value entry represents a boxed value type. + + + + + The number of parallel values this entry represents. This will always be exactly equal to the count of . + + + + + Whether this value entry is editable or not. + + + + + If this value entry has the override type , this is the path of the property it references. + + + + + The actual serialization backend for this value entry, possibly inherited from the serialization backend of the root property this entry is a child of. + Note that this is *not* always equal to . + + + + + The property whose values this value entry represents. + + + + + Provides access to the weakly typed values of this value entry. + + + + + Whether this value entry has been changed from its prefab counterpart. + + + + + Whether this value entry has had its list length changed from its prefab counterpart. + + + + + Whether this value entry has had its dictionary values changes from its prefab counterpart. + + + + + A weakly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + The type from which this value entry comes. If this value entry represents a member value, this is the declaring type of the member. If the value entry represents a collection element, this is the type of the collection. + + + + + The most precise known contained type of the value entry. If polymorphism is in effect, this will be some type derived from . + + + + + The base type of the value entry. If this is value entry represents a member value, this is the type of the member. If the value entry represents a collection element, this is the element type of the collection. + + + + + The special state of the value entry. + + + + + Whether this value entry is an alias, or not. Value entry aliases are used to provide strongly typed value entries in the case of polymorphism. + + + + + The context container of this property. + + + + + Whether this type is marked as an atomic type using a . + + + + + An event that is invoked during , when any values have changed. + + + + + An event that is invoked during , when any child values have changed. + + + + + Updates the values contained in this value entry to the actual values in the target objects, and updates its state (override, type of value, etc.) accordingly. + + + + + Checks whether the values in this value entry are equal to the values in another value entry. + Note, both value entries must have the same value type, and must represent values that are .NET value types. + + + + + + + Applies the changes made to this value entry to the target objects, and registers prefab modifications as necessary. + + + True if any changes were made, otherwise, false. + + + + + Determines the value state of this value entry. + + + + + Determines what the most precise contained type is on this value entry. + + + + + Updates all values in this value entry from the target tree values. + + + + + Initializes this value entry. + + + + + Creates an alias value entry of a given type, for a given value entry. This is used to implement polymorphism in Odin. + + + + + Creates a value entry for a given property, of a given value type. Note that the created value entry is returned un-updated, and needs to have called on it before it can be used. + + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + Represents the values of an , and contains utilities for querying the values' type and getting and setting them. + + The type of the value. + + + + + An equality comparer for comparing values of type . This is gotten using . + + + + + Whether .is a primitive type; that is, the type is primitive, a string, or an enum. + + + + + Whether is a value type. + + + + + Whether is derived from . + + + + + Whether the type of the value is marked atomic. + + + + + If the type of the value is marked atomic, this an instance of an atom handler for the value type. + + + + + Initializes a new instance of the class. + + + + + Provides access to the weakly typed values of this value entry. + + + + + Provides access to the strongly typed values of this value entry. + + + + + Whether this type is marked as an atomic type using a . + + + + + A weakly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + A strongly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + An array containing the original values as they were at the beginning of frame. + + + + + An array containing the current modified set of values. + + + + + An array containing the current modified set of atomic values. + + + + + An array containing the original set of atomic values. + + + + + Initializes this value entry. + + + + + Sets the actual target tree value. + + + + + Checks whether the values in this value entry are equal to the values in another value entry. + Note, both value entries must have the same value type, and must represent values that are .NET value types. + + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + Represents the values of an , and contains utilities for querying the values' type and getting and setting them. + + The type of the parent. + The type of the value. + + + + + The type from which this value entry comes. If this value entry represents a member value, this is the declaring type of the member. If the value entry represents a collection element, this is the type of the collection. + + + + + Determines what the most precise contained type is on this value entry. + + + + + Initializes this value entry. + + + + + Updates all values in this value entry from the target tree values. + + + + + Determines the value state of this value entry. + + + + + Applies the changes made to this value entry to the target objects, and registers prefab modifications as necessary. + + + True if any changes were made, otherwise, false. + + + + + Gets the parent value at the given index. + + + + + A polymorphic alias for a instance, used to implement strongly typed polymorphism in Odin. + + + + + The number of parallel values this entry represents. This will always be exactly equal to the count of . + + + + + Whether this value entry is editable or not. + + + + + If this value entry has the override type , this is the path of the property it references. + + + + + The actual serialization backend for this value entry, possibly inherited from the serialization backend of the root property this entry is a child of. + Note that this is *not* always equal to . + + + + + The property whose values this value entry represents. + + + + + Provides access to the weakly typed values of this value entry. + + + + + Whether this value entry has been changed from its prefab counterpart. + + + + + Whether this value entry has had its list length changed from its prefab counterpart. + + + + + Whether this value entry has had its dictionary values changes from its prefab counterpart. + + + + + A weakly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + The type from which this value entry comes. If this value entry represents a member value, this is the declaring type of the member. If the value entry represents a collection element, this is the type of the collection. + + + + + The most precise known contained type of the value entry. If polymorphism is in effect, this will be some type derived from . + + + + + The base type of the value entry. If this is value entry represents a member value, this is the type of the member. If the value entry represents a collection element, this is the element type of the collection. + + + + + The generic value type of the value entry alias itself, IE, the PropertyValueEntryAlias implements the IPropertyValueEntry<TValue> interface - this member returns TValue regardless of the actual type of the backing objects. This is a performance shortcut to checking TValue using reflection, used internally by the property system to determine whether a value entry alias needs to be swapped out with an alias for a different type. + + + + + The special state of the value entry. + + + + + Whether this value entry is an alias, or not. Value entry aliases are used to provide strongly typed value entries in the case of polymorphism. + + + + + The context container of this property. + + + + + Whether this type is marked as an atomic type using a . + + + + + An event that is invoked during , when any values have changed. + + + + + An event that is invoked during , when any child values have changed. + + + + + Applies the changes made to this value entry to the target objects, and registers prefab modifications as necessary. + + + True if any changes were made, otherwise, false. + + + + + Updates the values contained in this value entry to the actual values in the target objects, and updates its state (override, type of value, etc.) accordingly. + + + + + Checks whether the values in this value entry are equal to the values in another value entry. + Note, both value entries must have the same value type, and must represent values that are .NET value types. + + + + + Sets the actual value of a value entry, for a given selection index. + + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + A polymorphic alias for a instance, used to implement strongly typed polymorphism in Odin. + + + + + Initializes a new instance of the class. + + The value entry to alias. + valueEntry is null + + + + Provides access to the strongly typed values of this value entry. + + + + + A strongly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + A weakly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel. + This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values. + + + + + The number of parallel values this entry represents. This will always be exactly equal to the count of . + + + + + Whether this value entry is editable or not. + + + + + If this value entry has the override type , this is the path of the property it references. + + + + + The actual serialization backend for this value entry, possibly inherited from the serialization backend of the root property this entry is a child of. + Note that this is *not* always equal to . + + + + + The property whose values this value entry represents. + + + + + Provides access to the weakly typed values of this value entry. + + + + + Whether this value entry has been changed from its prefab counterpart. + + + + + Whether this value entry has had its list length changed from its prefab counterpart. + + + + + Whether this value entry has had its dictionary values changes from its prefab counterpart. + + + + + The type from which this value entry comes. If this value entry represents a member value, this is the declaring type of the member. If the value entry represents a collection element, this is the type of the collection. + + + + + The most precise known contained type of the value entry. If polymorphism is in effect, this will be some type derived from . + + + + + The base type of the value entry. If this is value entry represents a member value, this is the type of the member. If the value entry represents a collection element, this is the element type of the collection. + + + + + The generic value type of the value entry alias itself, IE, the PropertyValueEntryAlias implements the IPropertyValueEntry<TValue> interface - this member returns TValue regardless of the actual type of the backing objects. This is a performance shortcut to checking TValue using reflection, used internally by the property system to determine whether a value entry alias needs to be swapped out with an alias for a different type. + + + + + The special state of the value entry. + + + + + Whether this type is marked as an atomic type using a . + + + + + An event that is invoked during , when any values have changed. + + + + + An event that is invoked during , when any child values have changed. + + + + + Applies the changes made to this value entry to the target objects, and registers prefab modifications as necessary. + + + True if any changes were made, otherwise, false. + + + + + Updates the values contained in this value entry to the actual values in the target objects, and updates its state (override, type of value, etc.) accordingly. + + + + + Checks whether the values in this value entry are equal to the values in another value entry. + Note, both value entries must have the same value type, and must represent values that are .NET value types. + + + + + Sets the actual value of a value entry, for a given selection index. + + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks. + If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from is used. + This method is best ignored unless you know what you are doing. + + The value to check differences against. + The selection index to compare against. + + + + Draws properties marked with . + Displays a configurable list of assets, where each item can be enabled or disabled. + + + + + + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Initializes this instance. + + + + + Draws the property with GUILayout support. This method is called by DrawPropertyImplementation if the GUICallType is set to GUILayout, which is the default. + + + + + Odin drawer for . + + + + + Initializes the drawer. + + + + + Not yet documented. + + + + + Draws Color properties marked with . + + + + + Draws the property. + + + + + Draws Color properties marked with . + + + + + Draws the property. + + + + + Adds a generic menu option to properties marked with . + + + + + + + + Populates the generic menu for the property. + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + Draws char properties marked with . + + + + + Draws the property. + + + + + Draws string properties marked with . + + + + + Draws the property. + + + + + Draws sbyte properties marked with . + + + + + Draws the property. + + + + + Draws byte properties marked with . + + + + + Draws the property. + + + + + Draws short properties marked with . + + + + + Draws the property. + + + + + Draws ushort properties marked with . + + + + + Draws the property. + + + + + Draws int properties marked with . + + + + + Draws the property. + + + + + Draws uint properties marked with . + + + + + Draws the property. + + + + + Draws long properties marked with . + + + + + Draws the property. + + + + + Draws ulong properties marked with . + + + + + Draws the property. + + + + + Draws float properties marked with . + + + + + Draws the property. + + + + + Draws double properties marked with . + + + + + Draws the property. + + + + + Draws decimal properties marked with . + + + + + Draws the property. + + + + + Draws char properties marked with . + + + + + Draws the property. + + + + + Draws string properties marked with . + + + + + Draws the property. + + + + + Draws sbyte properties marked with . + + + + + Draws the property. + + + + + Draws byte properties marked with . + + + + + Draws the property. + + + + + Draws short properties marked with . + + + + + Draws the property. + + + + + Draws ushort properties marked with . + + + + + Draws the property. + + + + + Draws int properties marked with . + + + + + Draws the property. + + + + + Draws uint properties marked with . + + + + + Draws the property. + + + + + Draws long properties marked with . + + + + + Draws the property. + + + + + Draws ulong properties marked with . + + + + + Draws the property. + + + + + Draws float properties marked with . + + + + + Draws the property. + + + + + Draws double properties marked with . + + + + + Draws the property. + + + + + Draws decimal properties marked with . + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + + + + Initializes this instance. + + + + + Draws the property. + + + + + Draws properties marked with . + Calls the properties ToString method to get the string to draw. + + + + + + + + + + + Draws the property. + + + + + Draws members marked with . + + + + + Odin drawer for the . + + + + + Returns true if the drawer can draw the type. + + + + + Draws the property. + + + + + Draws an enum in a horizontal button group instead of a dropdown. + + + + + Returns true if the drawer can draw the type. + + + + + Draws the property. + + + + + Not yet documented. + + + + + Initializes the drawer. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Initializes the drawer. + + + + + Not yet documented. + + + + + Adds customs generic menu options. + + + + + Draws properties marked with . + This drawer sets the current GUI color, before calling the next drawer in the chain. + + + + + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + Draws the property. + + + + + Draws properties marked with . + Draws an info box above the property. Error and warning info boxes can be tracked by Odin Scene Validator. + + + + + + + + + Draws the property. + + + + + Draws properties marked with + + + + + Draws the property. + + + + + Static GUI information reguarding the InlineEditor attribute. + + + + + Gets a value indicating how many InlineEditors we are currently in. + + + + + Draws properties marked with . + + + + + + + Initializes this instance. + + + + + Draws the property layout. + + The label. + + + + + + + Will set GUI.enabled to false during some cases, to avoid the Preview eating events when it really shouldn't. + + + + Drawer for the attribute. + + + + + Draws the property. + + + + + Draws properties marked with . + Creates a new GUIContent, with the provided label text, before calling further down in the drawer chain. + + + + + + + + + + + + Draws the attribute. + + + + + Draws properties marked with the . + + + + + + + + + + + + Draws the attribute. + + + + + Draws Vector2 properties marked with . + + + + + + + + + + + Draws string properties marked with . + This drawer only works for string fields, unlike . + + + + + + + + + + Draws the property. + + + + + Draws string properties marked with . + This drawer works for both string field and properties, unlike . + + + + + + + + + + Draws the property. + + + + + Draws a warning message for non-serialized properties that sports both the SerializeField and the ShowInInspector attribute. + + + + + Determines if the drawer can draw the property. + + The property to test. + true if the drawer can draw the property; otherwise false. + + + + Initializes the drawer. + + + + + Draws the warning message and calls the next drawer. + + The label for the property. + + + + + When first learning to use the Odin Inspector, it is common for people to misunderstand the OdinSerialize attribute, + and use it in places where it does not achive the deceired goal. + + + This drawer will display a warning message if the OdinSerialize attribute is potentially used in such cases. + + + + + + + Draws The Property. + + + + + Draws properties marked with . + + + + + + + + + + Draws properties marked with . + Calls the method, the attribute is either attached to, or the method that has been specified in the attribute, to allow for custom GUI drawing. + + + + + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + + + + + Draws properties marked with as a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + + + Draws the property. + + + + + Common base implementation for progress bar attribute drawers. + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Generic implementation of progress bar field drawing. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a byte property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a sbyte property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a short property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a ushort property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for an int property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a uint property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a long property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a ulong property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a float property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a double property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws values decorated with . + + + + + + + Draws a progress bar for a decimal property. + + + + + Converts the generic value to a double. + + The generic value to convert. + The generic value as a double. + + + + Draws byte properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws double properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws float properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws decimal properties marked with . + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws short properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws int properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws long properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws sbyte properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws ushort properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws uint properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws ulong properties marked with . + + + + + + + + + + + Initialized the drawer. + + + + + Draws the property. + + + + + Draws a space for properties marked with the PropertySpace attribute. + + + + + Initializes this instance. + + + + + Draws the property. + + + + + Draws byte properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws double properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws float properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws decimal properties marked with . + + + + + Draws the property. + + + + + Draws short properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws int properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws long properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws sbyte properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws ushort properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws uint properties marked with . + + + + + + + + + + + Draws the property. + + + + + Draws ulong properties marked with . + + + + + + + + + + + Draws the property. + + + + + Show drawer chain attribute drawer. + + + + + Draws the property. + + + + + Drawer for the ShowPropertyResolver attribute. + + + + + + Draws properties marked with . + + + + + + Initializes this instance. + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + + + + Draws the property. + + + + + TextArea attribute drawer. + + + + + Draws the property in the Rect provided. This method does not support the GUILayout, and is only called by DrawPropertyImplementation if the GUICallType is set to Rect, which is not the default. + If the GUICallType is set to Rect, both GetRectHeight and DrawPropertyRect needs to be implemented. + If the GUICallType is set to GUILayout, implementing DrawPropertyLayout will suffice. + + The label. This can be null, so make sure your drawer supports that. + + + + Draws properties marked with . + + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + Initializes this instance. + + + + + Draws the property with GUILayout support. This method is called by DrawPropertyImplementation if the GUICallType is set to GUILayout, which is the default. + + + + + Draws all Unity DecoratorDrawers within prepend attribute drawers within Odin. + + + + + Initializes the class. + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + Draws the property. + + + + + Initializes this instance. + + + + + Draws the property with GUILayout support. This method is called by DrawPropertyImplementation if the GUICallType is set to GUILayout, which is the default. + + + + + Draws Vector2Int properties marked with . + + + + + Initializes the drawer by resolving any optional references to members for min/max value. + + + + + Draws the property. + + + + + Vector2Int proprety drawer. + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + Vector3Int property drawer. + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + Draws all properties grouped together with the + + + + + + Initializes this instance. + + + + + Draws the property. + + + + + Draws all properties grouped together with the + + + + + + Draws the property. + + + + + Draws all properties grouped together with the + + + + + + Initializes this instance. + + + + + Draws the property. + + + + + Drawer for the + + + + + + Draws the property. + + + + + Drawer for the ResponsiveButtonGroupAttribute. + + + + + Draws the property with GUILayout support. + + + + + Draws all properties grouped together with the + + + + + + Draws the property. + + + + + Draws properties marked with . + + + + + + + Draws the property. + + + + + Draws all properties grouped together with the + + + + + + Draws the property. + + + + + Drawer for the + + + + + + Draws the property. + + + + + The default method drawer that draws most buttons. + + + + + Initializes this instance. + + + + + Draws the property layout. + + + + + Returns a value that indicates if this drawer can be used for the given property. + + + + + Evaluates all strings, enums and primitive types and ensures EditorGUI.showMixedValue is true if there are any value conflicts in the current selection. + + + + + Sets the drawer to only be evaluated on primitive types, strings and enums. + + + + + Draws the property. + + + + + Adds the right click area. + + + + + Adds the right click area. + + + + + Opens a context menu for any given property on right click. The context menu is populated by all relevant drawers that implements . + + + + + + Initializes the drawer. + + + + + Draws the property. + + + + + Draws all reference type properties, which has already been drawn elsewhere. This drawer adds an additional foldout to prevent infinite draw depth. + + + + + Prevents the drawer from being applied to UnityEngine.Object references since they are shown as an object field, and is not drawn in-line. + + + + + Draws the property. + + + + + Draws properties with a set. + + + + + Draws the property. + + + + + + When multiple objects are selected and inspected, this his drawer ensures UnityEditor.EditorGUI.showMixedValue + gets set to true if there are any conflicts in the selection for any given property. + Otherwise the next drawer is called. + + This drawer also implements and provides a right-click context menu item for resolving conflicts if any. + + + + + Draws the property. + + + + + Animation curve property drawer. + + + + + Bool property drawer. + + + + + Draws the property. + + + + + Byte property drawer. + + + + + Draws the property. + + + + + Char property drawer. + + + + + Draws the property. + + + + + Property drawer for anything that has a . + + + + + Initializes the drawer. + + + + + Draws the property. + + + + + Color32 property drawer. + + + + + Draws the property. + + + + + Color property drawer. + + + + + Draws the property. + + + + + Color palette property drawer. + + + + + Draws the property. + + + + + Drawer for composite properties. + + + + + Draws the property. + + + + + Decimal property drawer. + + + + + Draws the property. + + + + + Delegate property drawer. This drawer is rather simplistic for now, and will receive significant upgrades in the future. + + + + + See . + + + + + Draws the property. + + + + + Property drawer for . + + + + + Draws the property. + + + + + Double property drawer. + + + + + Draws the property. + + + + + Base class to derive from for value drawers that merely wish to cause a value to be drawn by Unity. + + + + + Draws the property. + + + + + Enum property drawer. + + + + + Returns true if the drawer can draw the type. + + + + + Draws the property. + + + + + Gradient property drawer. + + + + + Int property drawer. + + + + + Draws the property. + + + + + The GUIStyleState Drawer + + + + + + Initializes this instance. + + + + + Draws the property with GUILayout support. + + + + + Short property drawer. + + + + + Draws the property. + + + + + Int property drawer. + + + + + Draws the property. + + + + + Long property drawer. + + + + + Draws the property. + + + + + LayerMask property drawer. + + + + + Draws the property. + + + + + Property drawer for nullables. + + + + + Draws the property. + + + + + Quaternion property drawer. + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + SByte property drawer. + + + + + Draws the property. + + + + + Retrieves the index of a filtered item; if the collection is not filtered, it just returns the passed index. + + The index to find. + + + The index in the collection of the filtered item, + or the passed index if the collection is not filtered. + + + + This is thrown if it's unable to find the index in the original collection, + this indicates a discrepancy between the filtered collection and the original collection. + + + + + Float property drawer. + + + + + Draws the property. + + + + + String property drawer. + + + + + Draws the property. + + + + + The TableList attirbute drawer. + + + + + + Determines whether this instance [can draw attribute property] the specified property. + + + + + Initializes this instance. + + + + + Draws the property layout. + + + + + Base class for two-dimensional array drawers. + + + + + Override this method in order to define custom type constraints to specify whether or not a type should be drawn by the drawer. + Note that Odin's has full support for generic class constraints, so most often you can get away with not overriding CanDrawTypeFilter. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Draws the property. + + + + + This method gets called from DrawPropertyLayout right before the table and error message is drawn. + + + + + Compares the element. + + + + + Draws a table cell element. + + The rect. + The input value. + The output value. + + + + Draws the element. + + + + + Type property drawer + + + + + + Draws the property. + + + + + Ushort property drawer. + + + + + Draws the property. + + + + + Uint property drawer. + + + + + Draws the property. + + + + + Ulong property drawer. + + + + + Draws the property. + + + + + Unity event drawer. + + + + + Draws the property. + + + + + Unity object drawer. + + + + + Initializes this instance. + + + + + Draws the property. + + + + + Vector2 proprety drawer. + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + Vector3 property drawer. + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + Vector4 property drawer. + + + + + Draws the property. + + + + + Populates the generic menu for the property. + + + + + Draws properties marked with . + + + + + + + + + Draws the property. + + + + + Draws short properties marked with . + + + + + + Not yet documented. + + + + + Draws int properties marked with . + + + + + + Not yet documented. + + + + + Draws long properties marked with . + + + + + + Not yet documented. + + + + + Draws float properties marked with . + + + + + + Not yet documented. + + + + + Draws double properties marked with . + + + + + + Not yet documented. + + + + + Draws decimal properties marked with . + + + + + + Not yet documented. + + + + + Draws Vector2 properties marked with . + + + + + + Not yet documented. + + + + + Draws Vector3 properties marked with . + + + + + + Not yet documented. + + + + + Draws Vector4 properties marked with . + + + + + + Not yet documented. + + + + + Base drawer to inherit from to draw methods. + + + + + + Base class for attribute drawers. Use this class to create your own custom attribute drawers that will work for all types. + Alternatively you can derive from if you want to only support specific types. + + + + Odin supports the use of GUILayout and takes care of undo for you. It also takes care of multi-selection + in many simple cases. Check the manual for more information on handling multi-selection. + + + + Also note that Odin does not require that your custom attribute inherits from Unity's PropertyAttribute. + + + + The attribute that this drawer should be applied to. + + + Checkout the manual for more information. + + + + Example using the . + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] + public class CustomRangeAttribute : System.Attribute + { + public float Min; + public float Max; + + public CustomRangeAttribute(float min, float max) + { + this.Min = min; + this.Max = max; + } + } + + // Remember to wrap your custom attribute drawer within a #if UNITY_EDITOR condition, or locate the file inside an Editor folder. + + public sealed class CustomRangeAttributeDrawer : OdinAttributeDrawer<CustomRangeAttribute, float> + { + protected override void DrawPropertyLayout(GUIContent label) + { + this.ValueEntry.SmartValue = EditorGUILayout.Slider(label, this.ValueEntry.SmartValue, this.Attribute.Min, this.Attribute.Max); + } + } + + // Usage: + public class MyComponent : MonoBehaviour + { + [CustomRangeAttribute(0, 1)] + public float MyFloat; + } + + + + + Example using the . + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] + public class GUITintColorAttribute : System.Attribute + { + public Color Color; + + public GUITintColorAttribute(float r, float g, float b, float a = 1) + { + this.Color = new Color(r, g, b, a); + } + } + + // Remember to wrap your custom attribute drawer within a #if UNITY_EDITOR condition, or locate the file inside an Editor folder. + + public sealed class GUITintColorAttributeDrawer : OdinAttributeDrawer<GUITintColorAttribute> + { + protected override void DrawPropertyLayout(GUIContent label) + { + Color prevColor = GUI.color; + GUI.color *= this.Attribute.Color; + this.CallNextDrawer(label); + GUI.color = prevColor; + } + } + + // Usage: + public class MyComponent : MonoBehaviour + { + [GUITintColor(0, 1, 0)] + public float MyFloat; + } + + + + + + Odin uses multiple drawers to draw any given property, and the order in which these drawers are + called are defined using the . + Your custom drawer injects itself into this chain of drawers based on its . + If no is defined, a priority is generated automatically based on the type of the drawer. + Each drawer can ether choose to draw the property or not, or pass on the responsibility to the + next drawer by calling CallNextDrawer(), as the f attribute does in the example above. + + + + This means that there is no guarantee that your drawer will be called, sins other drawers + could have a higher priority than yours and choose not to call CallNextDrawer(). + + + + Note that Odin's has full support for generic class constraints, + and if that is not enough, you can also add additional type constraints by overriding CanDrawTypeFilter + + + + Also note that all custom property drawers needs to handle cases where the label provided by the DrawPropertyLayout is null, + otherwise exceptions will be thrown when in cases where the label is hidden. For instance when [HideLabel] is used, or the property is drawn within a list where labels are also not shown. + + + + [DrawerPriority(DrawerPriorityLevel.AttributePriority)] + public sealed class MyCustomAttributeDrawer<T> : OdinAttributeDrawer<MyCustomAttribute, T> where T : class + { + public override bool CanDrawTypeFilter(Type type) + { + return type != typeof(string); + } + + protected override void DrawPropertyLayout(GUIContent label) + { + // Draw property here. + } + } + + + + + + + + + + + + + + + + + + Gets the attribute that the OdinAttributeDrawer draws for. + + + + + Tells whether or not multiple attributes are allowed. + + + + + Draws the property with the given label. + Override this to implement your custom OdinAttributeDrawer. + + Optional label for the property. + + + + Tests if the drawer can draw for the specified property. + + The property to test. + true if the drawer can drawn the property. Otherwise false. + + + + Tests if the attribute drawer can draw for the specified property. + + The property to test. + true if the drawer can drawn the property. Otherwise false. + + + + + Base class for all type specific attribute drawers. For non-type specific attribute drawers see . + + + + Odin supports the use of GUILayout and takes care of undo for you. It also takes care of multi-selection + in many simple cases. Checkout the manual for more information on handling multi-selection. + + + + Also note that Odin does not require that your custom attribute inherits from Unity's PropertyAttribute. + + + + The attribute that this drawer should be applied to. + The type of the value the drawer should be drawing. Note that Odin's has full support for generic constraints. + + + Checkout the manual for more information. + + + + Example using the . + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] + public class CustomRangeAttribute : System.Attribute + { + public float Min; + public float Max; + + public CustomRangeAttribute(float min, float max) + { + this.Min = min; + this.Max = max; + } + } + + // Remember to wrap your custom attribute drawer within a #if UNITY_EDITOR condition, or locate the file inside an Editor folder. + + public sealed class CustomRangeAttributeDrawer : OdinAttributeDrawer<CustomRangeAttribute, float> + { + protected override void DrawPropertyLayout(GUIContent label) + { + this.ValueEntry.SmartValue = EditorGUILayout.Slider(label, this.ValueEntry.SmartValue, this.Attribute.Min, this.Attribute.Max); + } + } + + // Usage: + public class MyComponent : MonoBehaviour + { + [CustomRangeAttribute(0, 1)] + public float MyFloat; + } + + + + + Example using the . + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] + public class GUITintColorAttribute : System.Attribute + { + public Color Color; + + public GUITintColorAttribute(float r, float g, float b, float a = 1) + { + this.Color = new Color(r, g, b, a); + } + } + + // Remember to wrap your custom attribute drawer within a #if UNITY_EDITOR condition, or locate the file inside an Editor folder. + + public sealed class GUITintColorAttributeDrawer : OdinAttributeDrawer<GUITintColorAttribute> + { + protected override void DrawPropertyLayout(GUIContent label) + { + Color prevColor = GUI.color; + GUI.color *= this.Attribute.Color; + this.CallNextDrawer(label); + GUI.color = prevColor; + } + } + + // Usage: + public class MyComponent : MonoBehaviour + { + [GUITintColor(0, 1, 0)] + public float MyFloat; + } + + + + + + Odin uses multiple drawers to draw any given property, and the order in which these drawers are + called is defined using the . + Your custom drawer injects itself into this chain of drawers based on its . + If no is defined, a priority is generated automatically based on the type of the drawer. + Each drawer can ether choose to draw the property or not, or pass on the responsibility to the + next drawer by calling CallNextDrawer(), as the GUITintColor attribute does in the example above. + + + + This means that there is no guarantee that your drawer will be called, since other drawers + could have a higher priority than yours and choose not to call CallNextDrawer(). + + + + Note that Odin's has full support for generic class constraints, + and if that is not enough, you can also add additional type constraints by overriding CanDrawTypeFilter + + + + Also note that all custom property drawers needs to handle cases where the label provided by the DrawPropertyLayout is null, + otherwise exceptions will be thrown when in cases where the label is hidden. For instance when [HideLabel] is used, or the property is drawn within a list where labels are also not shown. + + + + [DrawerPriority(DrawerPriorityLevel.AttributePriority)] + public class MyCustomAttributeDrawer<T> : OdinAttributeDrawer<MyCustomAttribute, T> where T : class + { + public override bool CanDrawTypeFilter(Type type) + { + return type != typeof(string); + } + + protected override void DrawPropertyLayout(GUIContent label) + { + // Draw property here. + } + } + + + + + + + + + + + + + + + + + + Gets the strongly typed ValueEntry of the OdinAttributeDrawer's property. + + + + + Draws the property with the given label. + Override this to implement your custom OdinAttributeDrawer. + + Optional label for the property. + + + + Tests if the drawer can draw for the specified property. + + The property to test. + true if the drawer can drawn the property. Otherwise false. + + + + Tests if the attribute drawer can draw for the specified property. + + The property to test. + true if the drawer can drawn the property. Otherwise false. + + + + + Base class for all Odin drawers. In order to create your own custom drawers you need to derive from one of the following drawers: + + + + + + + + Remember to provide your custom drawer with an in order for it to be located by the . + Drawers require a context, and are instantiated automatically by the . + Odin supports the use of GUILayout and takes care of undo for you. It also takes care of multi-selection in many simple cases. Checkout the manual for more information. + + + + + + + + + + + + + + + + + If true then this drawer will be skipped in the draw chain. Otherwise the drawer will be called as normal in the draw chain. + + + + + Gets a value indicating if the drawer has been initialized yet. + + + + + Gets the property this drawer draws for. + + + + + Override this method in order to define custom type constraints to specify whether or not a type should be drawn by the drawer. + Note that Odin's has full support for generic class constraints, so most often you can get away with not overriding CanDrawTypeFilter. + + The type. + + Returns true by default, unless overridden. + + + + + Initializes the drawer instance. + + + + + + Initializes the drawer instance. Override this to implement your own initialization logic. + + + + + Draws the property with a custom label. + + The label. Null is allow if you wish no label should be drawn. + + + + Draws the property with GUILayout support. + + The label. This can be null, so make sure your drawer supports that. + + + + Calls the next drawer in the draw chain. + + The label to pass on to the next drawer. + + + + Gets a value indicating if the drawer can draw for the specified property. + Override this to implement a custom property filter for your drawer. + + The property to test. + true if the drawer can draw for the property. Otherwise false. + + + + OdinDrawer extensions. + + + + + Gets a persistent value that will survive past multiple Unity Editor Application sessions. + The value is stored in the PersistentContextCache, which has a customizable max cache size. + + + + + Draws the default Odin inspector. + + + + + Draws the default Unity inspector. + + + + + Not yet documented. + + + + + Draws the property tree. + + + + + Called by Unity. + + + + + Called by Unity. + + + + + + Base class for all group drawers. Use this class to create your own custom group drawers. OdinGroupDrawer are used to group multiple properties together using an attribute. + + + + Note that all box group attributes needs to inherit from the + + + + Remember to provide your custom drawer with an + in order for it to be located by the . + + + + + + Checkout the manual for more information. + + + + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + public class MyBoxGroupAttribute : PropertyGroupAttribute + { + public MyBoxGroupAttribute(string group, float order = 0) : base(group, order) + { + } + } + + // Remember to wrap your custom group drawer within a #if UNITY_EDITOR condition, or locate the file inside an Editor folder. + + public class BoxGroupAttributeDrawer : OdinGroupDrawer<MyBoxGroupAttribute> + { + protected override void DrawPropertyGroupLayout(InspectorProperty property, MyBoxGroupAttribute attribute, GUIContent label) + { + GUILayout.BeginVertical("box"); + for (int i = 0; i < property.Children.Count; i++) + { + InspectorUtilities.DrawProperty(property.Children[i]); + } + GUILayout.EndVertical(); + } + } + + // Usage: + public class MyComponent : MonoBehaviour + { + [MyBoxGroup("MyGroup")] + public int A; + + [MyBoxGroup("MyGroup")] + public int B; + + [MyBoxGroup("MyGroup")] + public int C; + } + + + + + + + + + + + + + + + + + + Draws the property with GUILayout support. + + The label. This can be null, so make sure your drawer supports that. + + + + + Base class for all value drawers. Use this class to create your own custom drawers for any specific type. + + + + Remember to provide your custom drawer with an + in order for it to be located by the . + + + + Odin supports the use of GUILayout and takes care of undo for you. It also takes care of multi-selection + in many simple cases. Checkout the manual for more information on handling multi-selection. + + + + + Checkout the manual for more information. + + + + + public class MyCustomBaseType + { + + } + + public class MyCustomType : MyCustomBaseType + { + + } + + // Remember to wrap your custom attribute drawer within a #if UNITY_EDITOR condition, or locate the file inside an Editor folder. + + public sealed class MyCustomBaseTypeDrawer<T> : OdinValueDrawer<T> where T : MyCustomBaseType + { + protected override void DrawPropertyLayout(IPropertyValueEntry<T> entry, GUIContent label) + { + T value = entry.SmartValue; + // Draw your custom drawer here using GUILayout and EditorGUILAyout. + } + } + + // Usage: + // Both values will be drawn using the MyCustomBaseTypeDrawer + public class MyComponent : SerializedMonoBehaviour + { + public MyCustomBaseType A; + + public MyCustomType B; + } + + + + + + Odin uses multiple drawers to draw any given property, and the order in which these drawers are + called are defined using the . + Your custom drawer injects itself into this chain of drawers based on its . + If no is defined, a priority is generated automatically based on the type of the drawer. + Each drawer can ether choose to draw the property or not, or pass on the responsibility to the + next drawer by calling CallNextDrawer(). An example of this is provided in the documentation for . + + + + This means that there is no guarantee that your drawer will be called, sins other drawers + could have a higher priority than yours and choose not to call CallNextDrawer(). + + + + To avoid this, you can tell Odin, that your drawer is a PrependDecorator or an AppendDecorator drawer (see ) as shown in the example shows below. + Prepend and append decorators are always drawn and are also ordered by the . + + + + Note that Odin's have full support for generic class constraints, + and if that is not enough, you can also add additional type constraints by overriding CanDrawTypeFilter(Type type). + + + + Also note that all custom property drawers needs to handle cases where the label provided by the DrawPropertyLayout is null, + otherwise exceptions will be thrown when in cases where the label is hidden. For instance when [HideLabel] is used, or the property is drawn within a list where labels are also not shown. + + + + // [OdinDrawer(OdinDrawerBehaviour.DrawProperty)] // default + // [OdinDrawer(OdinDrawerBehaviour.AppendDecorator)] + [OdinDrawer(OdinDrawerBehaviour.PrependDecorator)] + [DrawerPriority(DrawerPriorityLevel.AttributePriority)] + public sealed class MyCustomTypeDrawer<T> : OdinValueDrawer<T> where T : MyCustomType + { + public override bool CanDrawTypeFilter(Type type) + { + return type != typeof(SomeType); + } + + protected override void DrawPropertyLayout(IPropertyValueEntry<T> entry, GUIContent label) + { + T value = entry.SmartValue; + // Draw property here. + } + } + + + + + + + + + + + + + + + + + + + The value entry of the property. + + + + + Draws the property with GUILayout support. + + The label. This can be null, so make sure your drawer supports that. + + + + Gets a value indicating if the drawer can draw for the specified property. + + The property to test. + true if the drawer can draw for the property. Otherwise false. + + + + Gets a value indicating if the drawer can draw for the specified property. + Override this to implement a custom property filter for your drawer. + + The property to test. + true if the drawer can draw for the property. Otherwise false. + + + + Unity property drawer for abstract types. + + + + + Initializes the property drawer. + + + + + Draws the property. + + + + + Property drawer for primitive composite properties. + + + + + Draws the property. + + + + + Draws the property field. + + + + + Unity property attribute drawer. + + + + + Initializes the drawer. + + + + + Draws the proprety. + + + + + Unity property drawer. + + + + + Initializes the property drawer. + + + + + Draws the property. + + + + + Descripes an attribute example. + + + + + The type of the example object. + + + + + The name of the example. + + + + + The description of the example. + + + + + Raw code of the example. + + + + + The example declared as a Unity component. + + + + + Sorting value of the example. Examples with lower order values should come before examples with higher order values. + + + + + Preview object of the example. + + + + + Checks whether the allocated has data associated with it. + + The index of the to check. + true if the has data associated with it; otherwise false. + + + + Gets the data associated with the at the given ; this is the second parameter assigned in the method. + + The index of the to retrieve the associated data from. + The associated data. + + + + Gets the data associated with the at the given ; this is the second parameter assigned in the method. + + The index of the to retrieve the associated data from. + The expected associated data type. + The associated data. + + + + Gets the indentation set for the at the given . + + The of the to retrieve the indentation for. + The indentation for the . + The indentation is set using during and . + + + + Creates a representing all the visible 's combined. + + The created . + + + + Allocates an in the view, with the option to associate a given with it. + + + + Ensure is called before calling this, and ensure is called after you're done with + + + Temporary. + This implementation will get refactored. + + + Temporary. + This implementation will get refactored. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Whether to allow scene objects. + Determines if the Field is read-only. + Will be used for setting and updating the value, this provides a more consistent way to the handle changes. + If a property is assigned through the parameters, the return value should not be used for setting the , the drawer will handle that. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Whether to allow scene objects. + Determines if the Field is read-only. + Will be used for setting and updating the value, this provides a more consistent way to the handle changes. + If a property is assigned through the parameters, the return value should not be used for setting the , the drawer will handle that. + + + + TODO + + + + + + + + + + + + + + + + If a property is assigned through the parameters, the return value should not be used for setting the , the drawer will handle that. + + + + TODO + + + + + + + + + + + + + + + + If a property is assigned through the parameters, the return value should not be used for setting the , the drawer will handle that. + + + + Contains a set of Unique IDs used for various parts of Odin that don't rely on ControlIds as the ID identifier for OdinObjectSelector. + + + + + Handles instantiating different versions of the Type Selector depending on the context. + + This handler only handles shared constructors between the two versions, for obsolete or unique constructors use the desired selector. + + + + Some drawers don't want to have its GUI disabled, even if the property is read-only or a ReadOnly attribute is defined on the property. + Use this attribute on any drawer to force GUI being enabled in these cases. + + + + + [AllowGUIEnabledForReadonly] + public sealed class SomeDrawerDrawer<T> : OdinValueDrawer<T> where T : class + { + } + + + + + + Extension method for List<Attribute> + + + + + Determines whether the list contains a specific attribute type. + + The type of attribute. + The attribute list. + + true if the specified attribute list has attribute; otherwise, false. + + + + + Adds a new instance of the given type of attribute if it's not in the list. + + The type of attribute. + The attribute list. + + + + + Gets the first instance of an attribute of the given type in the list. + + The type of attribute. + The attribute list. + + + + + Adds a new instance of the attribute to the list. + + The type of attribute. + The attribute list. + + + + + Removes all instances of the given type in the list. + + The type of attribute. + The attribute list. + + + + + + DrawerPriority is used in conjunction with + to specify the priority of any given drawer. It consists of 3 components: + Super, Wrapper, Value, where Super is the most significant component, + and Standard is the least significant component. + + + + + + + + Auto priority is defined by setting all of the components to zero. + If no is defined on a drawer, it will default to AutoPriority. + + + + + The standard priority. Mostly used by s. + + + + + The attribute priority. Mostly used by s. + + + + + The wrapper priority. Mostly used by drawers used to decorate properties. + + + + + The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. + These drawers typically don't draw the property itself, and calls CallNextDrawer. + + + + + The value priority. Mostly used by s and s. + + + + + The wrapper priority. Mostly used by drawers used to decorate properties. + + + + + The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. + These drawers typically don't draw the property itself, and calls CallNextDrawer. + + + + + Initializes a new instance of the struct. + + The priority. + + + + Initializes a new instance of the struct. + + + The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. + These drawers typically don't draw the property itself, and calls CallNextDrawer. + The wrapper priority. Mostly used by drawers used to decorate properties. + The value priority. Mostly used by s and s. + + + + Implements the operator >. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator <. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator <=. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator >=. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator +. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator -. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator ==. + + The LHS. + The RHS. + + The result of the operator. + + + + + Implements the operator !=. + + The LHS. + The RHS. + + The result of the operator. + + + + + Gets the priority level. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + + A that represents this instance. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Equals the specified other. + + The other. + + + + + Compares to. + + The other. + + + + + DrawerPriority is used on inspector drawers and indicates the priority of the drawer. + Use this to make your custom drawer to come before or after other drawers, and potentially hide other drawers. + + + The following example shows how DrawerPriority could be apply to a value drawer. + + [DrawerPriority(DrawerPriorityLevel.ValuePriority)] + + public sealed class MyIntDrawer : InspectorValuePropertyDrawer<int> + { + // ... + } + + + + The following example shows how DrawerPriority is used to mark a custom int drawer as a high priority drawer. + + [DrawerPriority(1, 0, 0)] + + public sealed class MySpecialIntDrawer : InspectorValuePropertyDrawer<int> + { + // ... + } + + + + + + + + The priority of the drawer. + + + + + Indicates the priority of an inspector drawer. + + Option for priority for the inspector drawer. + + + + Indicates the priority of an inspector drawer. + + + The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. + These drawers typically don't draw the property itself, and calls CallNextDrawer. + The wrapper priority. Mostly used by drawers used to decorate properties. + The value priority. Mostly used by s and s. + + + + + DrawerPriorityLevel is used in conjunction with . + + + + + + + + Auto priority is defined by setting all of the components to zero. + If no is defined on a drawer, it will default to AutoPriority. + + + + + The value priority. Mostly used by s. + + + + + The attribute priority. Mostly used by s. + + + + + The wrapper priority. Mostly used by drawers used to decorate properties. + + + + + The super priority. Mostly used by drawers that wants to wrap the entire property but don't draw the actual property. + These drawers typically don't draw the property itself, and calls CallNextDrawer. + + + + + Odin has its own implementations for these attribute drawers; never use Unity's. + + + + + Gets the priority of a given drawer type. + + + + + Base class for emitted MonoBehaviour-derived types that have been created by the . + + + + + The field that backs the value of this MonoBehaviour. + + + + + Sets the value contained in this scriptable object. + + + + + Gets the value contained in this scriptable object. + + + + + Strongly typed base class for emitted MonoBehaviour-derived types that have been created by the . + + + + + Sets the value contained in this scriptable object. + + + + + Gets the value contained in this scriptable object. + + + + + Sets the value contained in this scriptable object. + + + + + Gets the value contained in this scriptable object. + + + + + Base class for emitted ScriptableObject-derived types that have been created by the . + + + + + The field that backs the value of this scriptable object. + + + + + Sets the value contained in this scriptable object. + + + + + Gets the value contained in this scriptable object. + + + + + Strongly typed base class for emitted scriptable object types that have been created by the . + + + + + Sets the value contained in this scriptable object. + + + + + Gets the value contained in this scriptable object. + + + + + Sets the value contained in this scriptable object. + + + + + Gets the value contained in this scriptable object. + + + + + Unwraps TargetInvocationException and TypeInitializationException + + + + + This class fixes Unity's about window, by invoking "UnityEditor.VisualStudioIntegration.UnityVSSupport.GetAboutWindowLabel" before any dynamic assemblies have been defined. + This is because dynamic assemblies in the current AppDomain break that method, and Unity's about window depends on it. + + + + + + If you mark any of Unity's assemblies with the [AssemblyVersion] attribute to get a rolling assembly + version that changes sometimes (or all the time), Odin's hardcoded assembly references to user types + will break. + + + To fix this case, and all other cases of references to wrongly versioned Unity types not being resolved, + we overload the app domain's type resolution and resolve Unity user assemblies properly regardless of + version. + + + + + + This class fixes a bug where Unity's Undo.RecordObject does not mark ScriptableObjects dirty when + a change is recorded for them. It does this by subscribing to the Undo.postprocessModifications + event, and marking all modified ScriptableObjects dirty manually. + + + + + Specifies hows any given drawer should drawer the property. + Changing this behavior, also changes which methods should be overridden in the drawer. + + + + + + + + + GUILayout enabled the use of GUILayout, EditorGUILayout and + + + + + Draws the property using Unity's GUI, and EditorGUI. + + + + + Helper class to get values from InspectorProperties. This class is deprecated and fully replaced by . + + + + + If any error occurred while looking for members, it will be stored here. + + + + + Gets the referenced member information. + + + + + Gets the value. + + + + + Gets all values from all targets. + + + + + Provides a variety of miscellaneous utilities widely used in the inspector. + + + + + Converts an Odin property path to a deep reflection path. + + + + + Converts an Odin property path (without groups included) into a Unity property path. + + + + + Prepares a property tree for drawing, and handles management of undo, as well as marking scenes and drawn assets dirty. + + The tree to be drawn. + Whether to register undo commands for the changes made to the tree. This can only be set to true if the tree has a to represent. + tree is null + + + + Ends drawing a property tree, and handles management of undo, as well as marking scenes and drawn assets dirty. + + The tree. + + + + Draws all properties in a given property tree; must be wrapped by a and . + + The tree to be drawn. + + + + Draws a property in the inspector using a given label. + + + + + Odin property system exception. + + + + + Initializes a new instance of OdinPropertyException. + + The message for the exception. + An inner exception. + + + + Custom types used by the can choose to implement the ITemporaryContext + interface in order to be notified when the context gets reset. + + + + + Called by when the context gets reset. + + + + + Used by all InspectorProperty to tell Odin how to set or get a value on any given property. + + + + + Whether the value is readonly. + + + + + Gets the type of the owner. + + + + + Gets the type of the value. + + + + + Sets the weakly typed value on a given weakly typed owner. + + The owner. + The value. + + + + Gets the value from a given weakly typed owner. + + The weakly typed owner. + The found value. + + + + Used by all to tell Odin how to set or get a value on any given property. + + + + + Sets the value on a given owner. + + The owner. + The value. + + + + Gets the value from a given owner. + + The owner. + + + + The content padding + + + + + Draws the menu tree. + + + + + Gets the value selected value. + + + + + Invokes BuildMenuTree. + + + + + Use this attribute to prevent a type from being included in Odin systems. + The attribute can be applied to Odin drawers, Odin property resolvers and Odin attribute processor types. + + + + + When creating custom property drawers with or etc, + an OdinDrawerAttribute must be defined on the custom drawer class itself in order to specify that the drawer is meant to be included in the inspector. + If no OdinDrawerAttribute is defined, the will ignore your drawer. + + + Checkout the manual for more information. + + + + // Specify that this drawer must be included in the inspector; without this, it will not be drawn + public class MyCustomTypeDrawer<T> : OdinValueDrawer<T> where T : MyCustomBaseType + { + protected override void DrawPropertyLayout(IPropertyValueEntry<T> entry, GUIContent label) + { + T value = entry.SmartValue; + // Draw property here. + + // Optionally, call the next drawer in line. + this.CallNextDrawer(entry, label); + } + } + + + + + + + + + + + + Initializes a new instance of the class. + + + + + Priority for and types. + + + + + Priority of the resolver. + + + + + Initializes a new instance of the class. + + The higher the priority, the earlier it will be processed. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Sirenix preferences window. + + + + + Opens the Odin inspector preferences window. + + + + + Opens the Odin inspector preferences window. + + + + + This class has been made fully obsolete, and has been replaced by . + It was a helper class to handle strings for labels and other similar purposes. + + + + + If any error occurred while looking for members, it will be stored here. + + + + + Obsolete. Use other constructor. + + + + + Obsolete. Use other constructor. + + + + + Creates a StringMemberHelper to get a display string. + + Inspector property to get string from. + The input string. If the first character is a '$', then StringMemberHelper will look for a member string field, property or method, and will try to parse it as an expression if it starts with '@'. + + + + Creates a StringMemberHelper to get a display string. + + Inspector property to get string from. + The input string. If the first character is a '$', then StringMemberHelper will look for a member string field, property or method, and will try to parse it as an expression if it starts with '@'./// The input string. If the first character is a '$', then StringMemberHelper will look for a member string field, property or method. + + + + Gets a value indicating whether or not the string is retrived from a from a member. + + + + + Gets the type of the object. + + + + + Gets the string from the StringMemberHelper. + Only updates the string buffer in Layout events. + + The property entry, to get the instance reference from. + The current display string. + + + + Gets the string from the StringMemberHelper. + Only updates the string buffer in Layout events. + + The property, to get the instance reference from. + The current string. + + + + Gets the string from the StringMemberHelper. + Only updates the string buffer in Layout events. + + The instance, for evt. member references. + The current string. + + + + Gets the string from the StringMemberHelper. + + The property entry, to get the instance reference from. + The current string. + + + + Gets the string from the StringMemberHelper. + + The property, to get the instance reference from. + The current string. + + + + Gets the string from the StringMemberHelper. + + The instance, for evt. member references. + The current string. + + + + To safely change anything in the type cache, you must be holding this lock. + + + + + + + + + This is checked using . + + + + + Gets a unique key for any given property within a drawer. + + + + + public class MyCustomTypeDrawer<T> : OdinValueDrawer<T> where T : MyCustomBaseType + { + protected override void DrawPropertyLayout(IPropertyValueEntry<T> entry, GUIContent label) + { + var isToggled = entry.Context(this, "toggled", false); + isToggled.Value = SirenixEditorGUI.Label(isToggled.Value, label); + if (SirenixEditorGUI.BeginFadeGroup(UniqueDrawerKey.Create(entry, this), isToggled.Value)) + { + EditorGUI.indentLevel++; + this.CallNextDrawer(entry.Property, null); + EditorGUI.indentLevel--; + } + SirenixEditorGUI.EndFadeGroup(); + } + } + + + + + + Gets a unique key for any given property within a drawer. + + The property entry. + The drawer. + + + + + Gets a unique key for any given property within a drawer. + + The property. + The drawer. + + + + + Checks if two keys are identical. + + The other key. + + + + Checks if two keys are identical. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Provides utilities for emitting ScriptableObject and MonoBehaviour-derived types with specific property names and types, and providing instances of with those names and types. + + + + + A handle for a set of emitted Unity objects. When disposed (or collected by the GC) this handle will queue the emitted object instances for destruction. + + + + + The unity property to represent. + + + + + The Unity objects to represent. + + + + + Initializes a new instance of the class. + + The unity property to represent. + The objects to represent. + + + + Finalizes an instance of the class. + + + + + Creates an emitted MonoBehaviour-based . + + Name of the field to emit. + Type of the value to create a property for. + The target count of the tree to create a property for. + The game object that the MonoBehaviour of the property is located on. + + fieldName is null + or + valueType is null + + Target count must be equal to or higher than 1. + + + + Creates an emitted ScriptableObject-based . + + Name of the field to emit. + Type of the value to create a property for. + The target count of the tree to create a property for. + + fieldName is null + or + valueType is null + + Target count must be equal to or higher than 1. + + + + Base class for creating editor windows using Odin. + + + + public class SomeWindow : OdinEditorWindow + { + [MenuItem("My Game/Some Window")] + private static void OpenWindow() + { + GetWindow<SomeWindow>().Show(); + } + + [Button(ButtonSizes.Large)] + public void SomeButton() { } + + [TableList] + public SomeType[] SomeTableData; + } + + + + + public class DrawSomeSingletonInAnEditorWindow : OdinEditorWindow + { + [MenuItem("My Game/Some Window")] + private static void OpenWindow() + { + GetWindow<DrawSomeSingletonInAnEditorWindow>().Show(); + } + + protected override object GetTarget() + { + return MySingleton.Instance; + } + } + + + + + private void InspectObjectInWindow() + { + OdinEditorWindow.InspectObject(someObject); + } + + private void InspectObjectInDropDownWithAutoHeight() + { + var btnRect = GUIHelper.GetCurrentLayoutRect(); + OdinEditorWindow.InspectObjectInDropDown(someObject, btnRect, btnRect.width); + } + + private void InspectObjectInDropDown() + { + var btnRect = GUIHelper.GetCurrentLayoutRect(); + OdinEditorWindow.InspectObjectInDropDown(someObject, btnRect, new Vector2(btnRect.width, 100)); + } + + private void InspectObjectInACenteredWindow() + { + var window = OdinEditorWindow.InspectObject(someObject); + window.position = GUIHelper.GetEditorWindowRect().AlignCenter(270, 200); + } + + private void OtherStuffYouCanDo() + { + var window = OdinEditorWindow.InspectObject(this.someObject); + + window.position = GUIHelper.GetEditorWindowRect().AlignCenter(270, 200); + window.titleContent = new GUIContent("Custom title", EditorIcons.RulerRect.Active); + window.OnClose += () => Debug.Log("Window Closed"); + window.OnBeginGUI += () => GUILayout.Label("-----------"); + window.OnEndGUI += () => GUILayout.Label("-----------"); + } + + + + + + + Occurs when the window is closed. + + + + + Occurs at the beginning the OnGUI method. + + + + + Occurs at the end the OnGUI method. + + + + + Gets the label width to be used. Values between 0 and 1 are treated as percentages, and values above as pixels. + + + + + Gets or sets the window padding. x = left, y = right, z = top, w = bottom. + + + + + Gets a value indicating whether the window should draw a scroll view. + + + + + Gets a value indicating whether the window should draw a Unity editor preview, if possible. + + + + + Gets the default preview height for Unity editors. + + + + + Gets the target which which the window is supposed to draw. By default it simply returns the editor window instance itself. By default, this method is called by (). + + + + + Gets the targets to be drawn by the editor window. By default this simply yield returns the method. + + + + + At the start of each OnGUI event when in the Layout event, the GetTargets() method is called and cached into a list which you can access from here. + + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + This particular overload uses a few frames to calculate the height of the content before showing the window with a height that matches its content. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + Measures the GUILayout content height and adjusts the window height accordingly. + Note that this feature becomes pointless if any layout group expands vertically. + + The max height of the window. + When the window height expands below the screen bounds, it will move the window + upwards when needed, enabling this will move it back down when the window height is decreased. + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + + Pops up an editor window for the given object in a drop-down window which closes when it loses its focus. + + Protip: You can subscribe to OnClose if you want to know when that occurs. + + + + + Pops up an editor window for the given object. + + + + + Inspects the object using an existing OdinEditorWindow. + + + + + Creates an editor window instance for the specified object, without opening the window. + + + + + Creates an editor window instance for the specified object, without opening the window. + + + + + The Odin property tree drawn. + + + + + Draws the Odin Editor Window. + + + + + Calls DrawEditor(index) for each of the currently drawing targets. + + + + + Initialize get called by OnEnable and by OnGUI after assembly reloads + which often happens when you recompile or enter and exit play mode. + + + + + Called when the window is enabled. Remember to call base.OnEnable(); + + + + + Draws the editor for the this.CurrentDrawingTargets[index]. + + + + + Uses the method to draw a preview for the this.CurrentDrawingTargets[index]. + + + + + Called when the window is destroyed. Remember to call base.OnDestroy(); + + + + + Called before starting to draw all editors for the . + + + + + Called after all editors for the has been drawn. + + + + + See ISerializationCallbackReceiver.OnBeforeSerialize for documentation on how to use this method. + + + + + Implement this method to receive a callback after unity serialized your object. + + + + + Draws an editor window with a menu tree. + + + + public class OdinMenuEditorWindowExample : OdinMenuEditorWindow + { + [SerializeField, HideLabel] + private SomeData someData = new SomeData(); + + protected override OdinMenuTree BuildMenuTree() + { + OdinMenuTree tree = new OdinMenuTree(supportsMultiSelect: true) + { + { "Home", this, EditorIcons.House }, // draws the someDataField in this case. + { "Odin Settings", null, SdfIconType.GearFill }, + { "Odin Settings/Color Palettes", ColorPaletteManager.Instance, EditorIcons.EyeDropper }, + { "Odin Settings/AOT Generation", AOTGenerationConfig.Instance, EditorIcons.SmartPhone }, + { "Camera current", Camera.current }, + { "Some Class", this.someData } + }; + + tree.AddAllAssetsAtPath("More Odin Settings", SirenixAssetPaths.OdinEditorConfigsPath, typeof(ScriptableObject), true) + .AddThumbnailIcons(); + + tree.AddAssetAtPath("Odin Getting Started", SirenixAssetPaths.SirenixPluginPath + "Getting Started With Odin.asset"); + + var customMenuItem = new OdinMenuItem(tree, "Menu Style", tree.DefaultMenuStyle); + tree.MenuItems.Insert(2, customMenuItem); + + tree.Add("Menu/Items/Are/Created/As/Needed", new GUIContent()); + tree.Add("Menu/Items/Are/Created", new GUIContent("And can be overridden")); + + // As you can see, Odin provides a few ways to quickly add editors / objects to your menu tree. + // The API also gives you full control over the selection, etc.. + // Make sure to check out the API Documentation for OdinMenuEditorWindow, OdinMenuTree and OdinMenuItem for more information on what you can do! + + return tree; + } + } + + + + + + + + + + + + + Called when the window is destroyed. Remember to call base.OnDestroy(); + + + + + Builds the menu tree. + + + + + Gets or sets the width of the menu. + + + + + Gets a value indicating whether the menu is resizable. + + + + + Gets the menu tree. + + + + + Gets or sets a value indicating whether to draw the menu search bar. + + + + + Gets or sets the custom search function. + + + + + Forces the menu tree rebuild. + + + + + Tries to select the menu item with the specified object. + + + + + Draws the menu tree selection. + + + + + Draws the Odin Editor Window. + + + + + The method that draws the menu. + + + + + A menu item that represents one or more objects. + + + + + + + + + + The default toggled state + + + + + Initializes a new instance of the class. + + The Odin menu tree instance the menu item belongs to. + The name of the menu item. + The instance the value item represents. + + + + Occurs right after the menu item is done drawing, and right before mouse input is handles so you can take control of that. + + + + + Occurs when the user has right-clicked the menu item. + + + + + Gets the child menu items. + + + The child menu items. + + + + + Gets the index location of the menu item. + + + + + Gets or sets a value indicating whether the menu item is visible. + Not that setting this to false will not hide its children as well. For that see use Toggled. + + + + + Gets or sets the icon that is used when the menu item is not selected. + + + + + Gets or sets the icon that is used when the menu item is selected. + + + + + Gets a value indicating whether this instance is selected. + + + + + Determines whether this instance is selectable. + + + + + Determines whether this instance is enabled. + + + + + Gets the menu tree instance. + + + + + Gets or sets the raw menu item name. + + + + + Gets or sets the search string used when searching for menu items. + + + + + Gets the next visual menu item. + + + + + Gets the next selectable visual menu item. + + + + + Gets the parent menu item. + + + + + Gets the previous visual menu item. + + + + + Gets the previous selectable visual menu item. + + + + + Gets the drawn rect. + + + + + Gets the drawn label rect. + + + + + Gets or sets the style. If null is specified, then the menu trees DefaultMenuStyle is used. + + + + + Deselects this instance. + + + + + Selects the specified add to selection. + + + + + Gets the child menu items recursive in a DFS. + + Whether to include it self in the collection. + + + + Gets the child menu items recursive in a DFS. + + Whether to include it self in the collection. + Whether to include the root. + + + + Gets the full menu item path. + + + + + Gets the first object of the + + + + + Gets the object instances the menu item represents + + + + + Sets the object instance + + + + + Sets the object instances + + + + + Gets or sets the value the menu item represents. + + + + + Gets a nice menu item name. If the raw name value is null or a dollar sign, then the name is retrieved from the object itself via ToString(). + + + + + Gets or sets a value indicating whether this is toggled / expanded. This value tries it best to be persistent. + + + + + Gets or sets the icon getter. + + + + + Draws this menu item followed by all of its child menu items + + The indent level. + + + + Draws the menu item with the specified indent level. + + + + + Override this to add custom GUI to the menu items. + This is called right after the menu item is done drawing, and right before mouse input is handles so you can take control of that. + + + + + Handles the mouse events. + + The rect. + The triangle rect. + + + + The style settings used by . + + A nice trick to style your menu is to add the tree.DefaultMenuStyle to the tree itself, + and style it live. Once you are happy, you can hit the Copy CSharp Snippet button, + remove the style from the menu tree, and paste the style directly into your code. + + + + + + + + + + + Gets or sets the default selected style. + + + + + Gets or sets the selected label style. + + + + + The height of the menu item. + + + + + The global offset of the menu item content + + + + + The vertical offset of the menu item label + + + + + The number of pixels to indent per level indent level. + + + + + The size of the icon. + + + + + The size of the icon. + + + + + The transparency of icons when the menu item is not selected. + + + + + The padding between the icon and other content. + + + + + Whether to draw the a foldout triangle for menu items with children. + + + + + The size of the foldout triangle icon. + + + + + The padding between the foldout triangle icon and other content. + + + + + Whether or not to align the triangle left or right of the content. + If right, then the icon is pushed all the way to the right at a fixed position ignoring the indent level. + + + + + Whether to draw borders between menu items. + + + + + The horizontal border padding. + + + + + The border alpha. + + + + + The background color for when a menu item is selected. + + + + + The background color for when a menu item is selected. + + + + + The background color for when a menu item is selected. + + + + + The background color for when a menu item is selected. + + + + + The background color for when a menu item is selected. + + + + + The background color for when a menu item is selected. + + + + + Sets the height of the menu item. + + + + + Sets the global offset of the menu item content + + + + + Sets the number of pixels to indent per level indent level. + + + + + Sets the size of the icon. + + + + + Sets the size of the icon. + + + + + Sets the transparency of icons when the menu item is not selected. + + + + + Sets the padding between the icon and other content. + + + + + Sets whether to draw the a foldout triangle for menu items with children. + + + + + Sets the size of the foldout triangle icon. + + + + + Sets the padding between the foldout triangle icon and other content. + + + + + Sets whether or not to align the triangle left or right of the content. + If right, then the icon is pushed all the way to the right at a fixed position ignoring the indent level. + + + + + Sets whether to draw borders between menu items. + + + + + Sets the border alpha. + + + + + Sets the border alpha. + + + + + Sets the background color for when a menu item is selected. + + + + + Sets the background color for when a menu item is selected. + + + + + Creates and returns an instance of a menu style that makes it look like Unity's project window. + + + + + OdinMenuTree provides a tree of s, and helps with selection, inserting menu items into the tree, and can handle keyboard navigation for you. + + + + OdinMenuTree tree = new OdinMenuTree(supportsMultiSelect: true) + { + { "Home", this, EditorIcons.House }, + { "Odin Settings", null, SdfIconType.GearFill }, + { "Odin Settings/Color Palettes", ColorPaletteManager.Instance, EditorIcons.EyeDropper }, + { "Odin Settings/AOT Generation", AOTGenerationConfig.Instance, EditorIcons.SmartPhone }, + { "Camera current", Camera.current }, + { "Some Class", this.someData } + }; + + tree.AddAllAssetsAtPath("Some Menu Item", "Some Asset Path", typeof(ScriptableObject), true) + .AddThumbnailIcons(); + + tree.AddAssetAtPath("Some Second Menu Item", "SomeAssetPath/SomeAssetFile.asset"); + + var customMenuItem = new OdinMenuItem(tree, "Menu Style", tree.DefaultMenuStyle); + tree.MenuItems.Insert(2, customMenuItem); + + tree.Add("Menu/Items/Are/Created/As/Needed", new GUIContent()); + tree.Add("Menu/Items/Are/Created", new GUIContent("And can be overridden")); + + OdinMenuTrees are typically used with s but is made to work perfectly fine on its own for other use cases. + OdinMenuItems can be inherited and and customized to fit your needs. + + // Draw stuff + someTree.DrawMenuTree(); + // Draw stuff + someTree.HandleKeybaordMenuNavigation(); + + + + + + + + + + + Gets the currently active menu tree. + + + + + Gets the selection. + + + + + Gets the root menu items. + + + + + Gets the root menu item. + + + + + If true, all indent levels will be ignored, and all menu items with IsVisible == true will be drawn. + + + + + Adds a menu item with the specified object instance at the the specified path. + + + + + Adds a menu item with the specified object instance and icon at the the specified path. + + + + + Adds a menu item with the specified object instance and icon at the the specified path. + + + + + Adds a menu item with the specified object instance and icon at the the specified path. + + + + + Adds a menu item with the specified object instance and icon at the the specified path. + + + + + Adds a collection of objects to the menu tree and returns all menu items created in random order. + + + + + Adds a collection of objects to the menu tree and returns all menu items created in random order. + + + + + Gets or sets the default menu item style from Config.DefaultStyle. + + + + + Gets or sets the default drawing configuration. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + if set to true [supports multi select]. + + + + Initializes a new instance of the class. + + if set to true [supports multi select]. + The default menu item style. + + + + Initializes a new instance of the class. + + + + + Sets the focus to the . + + + + + Scrolls to the specified menu item. + + + + + Enumerates the tree with a DFS. + + if set to true then the invisible root menu item is included. + + + + Enumerates the tree with a DFS. + + The predicate. + if set to true then the invisible root menu item is included. + + + + Enumerates the tree with a DFS. + + + + + Draws the menu tree recursively. + + + + + Marks the dirty. This will cause a tree.UpdateTree() in the beginning of the next Layout frame. + + + + + Indicates that the layout has changed and needs to be recomputed. + This is used when is enabled. + + + + + Draws the search toolbar. + + + + + Updates the menu tree. This method is usually called automatically when needed. + + + + + Handles the keyboard menu navigation. Call this at the end of your GUI scope, to prevent the menu tree from stealing input events from other text fields. + + Returns true, if anything was changed via the keyboard. + + + + Handles the keyboard menu navigation. Call this at the end of your GUI scope, to prevent the menu tree from stealing input events from other text fields. + + Returns true, if anything was changed via the keyboard. + + + + The config used by OdinMenuTree to specify which features of the Menu Tree should be used when drawing. + + + + + Gets or sets the default menu item style. + + + + + The automatic scroll on selection changed. True by default. + + + + + Whether to draw the tree in a scrollable view. True by default. + + + + + Whether to handle keyboard navigation after it's done drawing. True by default. + + + + + Whether to draw a searchbar above the menu tree. True by default. + + + + + Whether to the menu items expanded state should be cached. True by default. + + + + + Whether to automatically set focus on the search bar when the tree is drawn for the first time. True by default. + + + + + Whether to select menu items on mouse down, or on click. False by default. + + + + + The scroll-view position. + + + + + The search term. + + + + + The height of the search toolbar. + + + + + Will only handle layouting when there has been a hierarchical change (such as an item being expanded or collapsed). + + + This expects every item to have the same height specified in the style (). + This means no custom layouting is supported with this on. + + + + + Gets or sets the search function. Null by default. + + + + + By default, the MenuTree.Selection is confirmed when menu items are double clicked, + Set this to false if you don't want that behaviour. + + + + + By default, the MenuTree.Selection is confirmed when menu items are double clicked, + Set this to false if you don't want that behaviour. + + + + + Class with utility methods for s and s. + + + + OdinMenuTree tree = new OdinMenuTree(); + tree.AddAllAssetsAtPath("Some Menu Item", "Some Asset Path", typeof(ScriptableObject), true) + .AddThumbnailIcons(); + tree.AddAssetAtPath("Some Second Menu Item", "SomeAssetPath/SomeAssetFile.asset"); + // etc... + + + + + + + + + + + Adds the menu item at the specified menu item path and populates the result list with all menu items created in order to add the menuItem at the specified path. + + The tree instance. + The result list. + The menu item path. + The menu item. + + + + Adds the menu item at specified menu item path, and returns all menu items created in order to add the menuItem at the specified path. + + The tree. + The menu item path. + The menu item. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Gets the menu item at the specified path, returns null non was found. + + + + + Adds all asset instances from the specified path and type into a single at the specified menu item path, and returns all menu items created in order to add the menuItem at the specified path.. + + The tree. + The menu item path. + The asset folder path. + The type of objects. + Whether to search for assets in subdirectories as well. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Adds all assets at the specified path. Each asset found gets its own menu item inside the specified menu item path. + + The tree. + The menu item path. + The asset folder path. + The type. + Whether to search for assets in subdirectories as well. + If true, sub-directories in the assetFolderPath will no longer get its own sub-menu item at the specified menu item path. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Adds all assets at the specified path. Each asset found gets its own menu item inside the specified menu item path. + + The tree. + The menu item path. + The asset folder path. + Whether to search for assets in subdirectories as well. + If true, sub-directories in the assetFolderPath will no longer get its own sub-menu item at the specified menu item path. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Adds the asset at the specified menu item path and returns all menu items created in order to end up at the specified menu path. + + The tree. + The menu item path. + The asset path. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Adds the asset at the specified menu item path and returns all menu items created in order to end up at the specified menu path. + + The tree. + The menu item path. + The asset path. + The type. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Sorts the entire tree of menu items recursively by name with respects to numbers. + + + + + Sorts the collection of menu items recursively by name with respects to numbers. This is a stable sort, meaning that equivalently ordered items will remain in the same order as they start. + + + + + Sorts the collection of menu items recursively using a given custom comparison. This is a stable sort, meaning that equivalently ordered items will remain in the same order as they start. + + + + + Adds the specified object at the specified menu item path and returns all menu items created in order to end up at the specified menu path. + + The tree. + The menu path. + The object instance. + Set this to true if you want Odin serialzied members such as dictionaries and generics to be shown as well. + Returns all menu items created in order to add the menu item at the specified menu item path. + + + + Assigns the specified icon to all menu items in the collection with the specified ObjectInstanceType. + + + + + Assigns the specified icon to all menu items in the collection with the specified ObjectInstanceType. + + + + + Assigns the specified icon to all menu items in the collection. + + + + + Assigns the specified icon to all menu items in the collection. + + + + + Assigns the specified icon to the last menu item in the collection. + + + + + Assigns the specified icon to the last menu item in the collection. + + + + + Assigns the specified icon to the last menu item in the collection. + + + + + Assigns the specified icon to the last menu item in the collection. + + + + + Assigns the specified icon to the last menu item in the collection. + + + + + Assigns the specified icon to all menu items in the collection. + + + + + Assigns the specified icon to all menu items in the collection. + + + + + Assigns the specified icon to all menu items in the collection. + + + + + Assigns the asset mini thumbnail as an icon to all menu items in the collection. If the menu items object is null then a Unity folder icon is assigned. + + + + + Assigns the asset mini thumbnail as an icon to all menu items in the collection. If the menu items object is null then a Unity folder icon is assigned. + + + + + Constants which describe the type of change that was made to the OdinMenuTrees's Selection + + + + + + A menu item was removed. + + + + + A menu item was selected. + + + + + The selection was cleared. + + + + + Handles the selection of a Odin Menu Tree with support for multi selection. + + + + + + + + + + Initializes a new instance of the class. + + if set to true [supports multi select]. + + + + Occurs whenever the selection has changed. + + + + + Occurs whenever the selection has changed. + + + + + Usually occurs whenever the user hits return, or double click a menu item. + + + + + Gets the count. + + + + + Gets the first selected value, returns null if non is selected. + + + + + Gets all selected values. + + + + + Gets or sets a value indicating whether multi selection is supported. + + + + + Gets the at the specified index. + + + + + Adds a menu item to the selection. If the menu item is already selected, then the item is pushed to the bottom of the selection list. + If multi selection is off, then the previous selected menu item is removed first. + Adding a item to the selection triggers . + + The item. + + + + Clears the selection and triggers . + + + + + Determines whether an OdinMenuItem is selected. + + + + + Copies all the elements of the current array to the specified array starting at the specified destination array index. + + + + + Gets the enumerator. + + + + + Searches for the specified menu item and returns the index location. + + + + + Removes the specified menu item and triggers . + + + + + Removes the menu item at the specified index and triggers . + + + + + Triggers OnSelectionConfirmed. + + + + + A feature-rich enum selector with support for flag enums. + + + + KeyCode someEnumValue; + + [OnInspectorGUI] + void OnInspectorGUI() + { + // Use the selector manually. See the documentation for OdinSelector for more information. + if (GUILayout.Button("Open Enum Selector")) + { + EnumSelector<KeyCode> selector = new EnumSelector<KeyCode>(); + selector.SetSelection(this.someEnumValue); + selector.SelectionConfirmed += selection => this.someEnumValue = selection.FirstOrDefault(); + selector.ShowInPopup(); // Returns the Odin Editor Window instance, in case you want to mess around with that as well. + } + + // Draw an enum dropdown field which uses the EnumSelector popup: + this.someEnumValue = EnumSelector<KeyCode>.DrawEnumField(new GUIContent("My Label"), this.someEnumValue); + } + + // All Odin Selectors can be rendered anywhere with Odin. This includes the EnumSelector. + EnumSelector<KeyCode> inlineSelector; + + [ShowInInspector] + EnumSelector<KeyCode> InlineSelector + { + get { return this.inlineSelector ?? (this.inlineSelector = new EnumSelector<KeyCode>()); } + set { } + } + + + + + + + + + + + + By default, the enum type will be drawn as the title for the selector. No title will be drawn if the string is null or empty. + + + + + Gets a value indicating whether this instance is flag enum. + + + + + Initializes a new instance of the class. + + + + + Populates the tree with all enum values. + + + + + When ShowInPopup is called, without a specified window width, this method gets called. + Here you can calculate and give a good default width for the popup. + The default implementation returns 0, which will let the popup window determine the width itself. This is usually a fixed value. + + + + + Gets the currently selected enum value. + + + + + Selects an enum. + + + + + Draws an enum selector field using the enum selector. + + + + + Draws an enum selector field using the enum selector. + + + + + Draws an enum selector field using the enum selector. + + + + + Draws an enum selector field using the enum selector. + + + + + In simple one-off use cases, making a custom OdinSelector might not be needed, as the GenericSelecor + can be populated with anything and customized a great deal. + + + + SomeType someValue; + + [OnInspectorGUI] + void OnInspectorGUI() + { + if (GUILayout.Button("Open Generic Selector Popup")) + { + List<SomeType> source = ...; + GenericSelector<SomeType> selector = new GenericSelector<SomeType>("Title", false, x => x.Path, source); + selector.SetSelection(this.someValue); + selector.SelectionTree.Config.DrawSearchToolbar = false; + selector.SelectionTree.DefaultMenuStyle.Height = 22; + selector.SelectionConfirmed += selection => this.someValue = selection.FirstOrDefault() + var window = selector.ShowInPopup(); + window.OnEndGUI += () => { EditorGUILayout.HelpBox("A quick way of injecting custom GUI to the editor window popup instance.", MessageType.Info); }; + window.OnClose += selector.SelectionTree.Selection.ConfirmSelection; // Confirm selection when window clses. + } + } + + + + + + + + + + + + Gets or sets a value indicating whether [flattened tree]. + + + + + Gets or sets a value indicating whether [checkbox toggle]. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Gets the title. No title will be drawn if the string is null or empty. + + + + + Draws the selection tree. This gets drawn using the OnInspectorGUI attribute. + + + + + Builds the selection tree. + + + + + Used in to associate name to a value in the GenericSelector. + + + + + + The value. + + + + + The name. + + + + + Initializes a new instance of the struct. + + + + + If the + + + + + OdinSelectors is an abstract base class that combines OdinMenuTrees and OdinEditorWindows to help making feature-rich selectors and popup selectors. + + + + public class MySelector : OdinSelector<SomeType> + { + private readonly List<SomeType> source; + private readonly bool supportsMultiSelect; + + public MySelector(List<SomeType> source, bool supportsMultiSelect) + { + this.source = source; + this.supportsMultiSelect = supportsMultiSelect; + } + + protected override void BuildSelectionTree(OdinMenuTree tree) + { + tree.Config.DrawSearchToolbar = true; + tree.Selection.SupportsMultiSelect = this.supportsMultiSelect; + + tree.Add("Defaults/None", null); + tree.Add("Defaults/A", new SomeType()); + tree.Add("Defaults/B", new SomeType()); + + tree.AddRange(this.source, x => x.Path, x => x.SomeTexture); + } + + [OnInspectorGUI] + private void DrawInfoAboutSelectedItem() + { + SomeType selected = this.GetCurrentSelection().FirstOrDefault(); + + if (selected != null) + { + GUILayout.Label("Name: " + selected.Name); + GUILayout.Label("Data: " + selected.Data); + } + } + } + + Usage: + + void OnGUI() + { + if (GUILayout.Button("Open My Selector")) + { + List<SomeType> source = this.GetListOfThingsToSelectFrom(); + MySelector selector = new MySelector(source, false); + + selector.SetSelection(this.someValue); + + selector.SelectionCancelled += () => { }; // Occurs when the popup window is closed, and no slection was confirmed. + selector.SelectionChanged += col => { }; + selector.SelectionConfirmed += col => this.someValue = col.FirstOrDefault(); + + selector.ShowInPopup(); // Returns the Odin Editor Window instance, in case you want to mess around with that as well. + } + } + + // All Odin Selectors can be rendered anywhere with Odin. + [ShowInInspector] + MySelector inlineSelector; + + + + + + + + + + + + If true, a confirm selection button will be drawn in the title-bar. + + + + + Enables the single click to select. + + + + + Occurs when the window is closed, and no slection was confirmed. + + + + + Occurs when the menuTrees selection is changed and IsValidSelection returns true. + + + + + Occurs when the menuTrees selection is confirmed and IsValidSelection returns true. + + + + + Gets the selection menu tree. + + + + + Gets the title. No title will be drawn if the string is null or empty. + + + + + Gets the current selection from the menu tree whether it's valid or not. + + + + + Determines whether the specified collection is a valid collection. + If false, the SlectionChanged and SelectionConfirm events will not be called. + By default, this returns true if the collection contains one or more items. + + + + + Sets the selection. + + + + + Sets the selection. + + + + + Opens up the selector instance in a popup at the specified rect position. + The width of the popup is determined by DefaultWindowWidth, and the height is automatically calculated. + + + + + Opens up the selector instance in a popup at the specified rect position. + + + + + Opens up the selector instance in a popup at the specified rect position. + + + + + The mouse position is used as the position for the window. + Opens up the selector instance in a popup at the specified position. + + + + + Opens up the selector instance in a popup at the specified position. + + + + + Opens up the selector instance in a popup at the specified rect position. + + + + + Opens up the selector instance in a popup at the specified position. + The width of the popup is determined by DefaultWindowWidth, and the height is automatically calculated. + + + + + Opens up the selector instance in a popup with the specified width and height. + The mouse position is used as the position for the window. + + + + + Builds the selection tree. + + + + + When ShowInPopup is called, without a specifed window width, this methods gets called. + Here you can calculate and give a good default width for the popup. + The default implementation returns 0, which will let the popup window determain the width itself. This is usually a fixed value. + + + + + Triggers the selection changed event, but only if the current selection is valid. + + + + + Draw the selecotr manually. + + + + + Draws the selection tree. This gets drawn using the OnInspectorGUI attribute. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Draws dropwdown field, that creates and binds the selector to the dropdown field. + + + + + Builds the selection tree. + + + + + 450 + + + + + Sets the selected types. + + + + + The that was used in the last 'Show' call. + + + + + The key to identify who called the selector. + + + + + The id to identify who called the selector. + + + + + The current selected object. + + + + + True if is used; otherwise false. + + + + + The type of the value used in the last 'Show' call. + + + + + The base type of the value used in the last 'Show' call. + + + + + Shows a selector. + + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + The current value selected. + The base type of the 'value'. + Determines if scene objects are allowed. + Determines if null values are allowed. + The position where the selector should appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + Shows a selector. + + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + + Used to provide values for all parameters in the full declaration of this method. + It also allows for customization of various stages of the selector with attributes. + This also sets the . + + Determines if the default Unity Object Selector should be the one to appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + Shows a selector. + + The position where the selector should appear; can be . + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + + Used to provide values for all parameters in the full declaration of this method. + It also allows for customization of various stages of the selector with attributes. + This also sets the . + + Determines if the default Unity Object Selector should be the one to appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + Shows a selector. + + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + The current value selected. + The base type of the 'value'. + Determines if scene objects are allowed. + Determines if null values are allowed. + Used for various stages of the selector that can be customized with attributes. This also sets the . + Determines if the default Unity Object Selector should be the one to appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + Shows a selector. + + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + The current value selected. + The type of the 'value'. + The base type of the 'value'. + Determines if scene objects are allowed. + Determines if null values are allowed. + Used for various stages of the selector that can be customized with attributes. This also sets the . + Determines if the default Unity Object Selector should be the one to appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + Shows a selector. + + The position where the selector should appear; can be . + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + The current value selected. + The base type of the 'value'. + Determines if scene objects are allowed. + Determines if null values are allowed. + Used for various stages of the selector that can be customized with attributes. This also sets the . + Determines if the default Unity Object Selector should be the one to appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + Shows a selector. + + The position where the selector should appear; can be . + The key used to identify who called the selector; this can be null. + The ID used to identify who called the selector; this can be 0. + The current value selected. + The type of the 'value'. + The base type of the 'value'. + Determines if scene objects are allowed. + Determines if null values are allowed. + Used for various stages of the selector that can be customized with attributes. This also sets the . + Determines if the default Unity Object Selector should be the one to appear. + Thrown if the selector was opened for a case that it didn't expect. + + Either '' or '' must be set, but both can also be set for more consistent results. + + + + + If the object was changed since the last time this method was called, it returns the changed object (); otherwise, it returns the provided value. + + The current value; the value to return if no change has occurred. + The key to identify who showed the current selector. + The ID to identify who showed the current selector. + The type of object to expect as a return value. + if it was marked as changed, otherwise . + + + + Checks if the selector's object is ready to be claimed. + + The key to identify who showed the current selector. + The ID to identify who showed the current selector. + true if the selector's object () is ready to be claimed; otherwise, false. + + + + Determines whether the specified and combination match the currently open selectors. + + The key to match. + The ID to match. + true if the combination is a match; otherwise, false. + + + + Claims the current . + + The if it is ready to be claimed; otherwise, NULL with an accompanying error message. + + + + Claims the current and copies a specified amount () of instances of the . + + The number of instances to copy. + + An array of copies, where element 0 is always the original value, + if the is ready to be claimed; otherwise, NULL with an accompanying error message. + + + + + Claims the current and, if ready, assigns it to the specified . + If the is not ready to be claimed, an error message will be logged. + + The to assign the to. + + + + Context that persists across reloading and restarting Unity. + + + + + Time stamp for when the persistent context value was last used. + Used for purging unused context. + + + + + Instatiates a persistent context. + + + + + Updates the time stamp to now. + + + + + Context that persists across reloading and restarting Unity. + + The type of the context value. + + + + The value of the context. + + + + + Creates a new persistent context object. + + + + + Formats a string with the time stamp, and the value. + + + + + Helper class that provides a local copy of a . + When the local value is changed, it also changed the global value, but the global value does not change the local value. + + The type of the context value. + + + + The value of the context. + Changing this value, also changes the global context value, but the global value does not change the local value. + + + + + Creates a local context object for the provided global context. + + The global context object. + + + + Updates the local value to the current global value. + + + + + Provides context objects that still persist when Unity reloads or is restarted. + + + + + Gets a GlobalPersistentContext object for the specified key. + + The type of the first key. + The type of the value stored in the context object. + The first key. + The default value, used for when the context object is first created. + + + + Gets a GlobalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the value stored in the context object. + The first key. + The second key. + The default value, used for when the context object is first created. + + + + Gets a GlobalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The default value, used for when the context object is first created. + + + + Gets a GlobalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The default value, used for when the context object is first created. + + + + Gets a GlobalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the fifth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The fifth key. + The default value, used for when the context object is first created. + + + + Gets a GlobalPersistentContext object for the specified key. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the value stored in the context object. + The first key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a GlobalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the value stored in the context object. + The first key. + The second key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a GlobalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a GlobalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a GlobalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the fifth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The fifth key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a LocalPersistentContext object for the specified key. + + The type of the first key. + The type of the value stored in the context object. + The first key. + The default value, used for when the context object is first created. + + + + Gets a LocalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the value stored in the context object. + The first key. + The second key. + The default value, used for when the context object is first created. + + + + Gets a LocalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The default value, used for when the context object is first created. + + + + Gets a LocalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The default value, used for when the context object is first created. + + + + Gets a LocalPersistentContext object for the specified keys. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the fifth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The fifth key. + The default value, used for when the context object is first created. + + + + Gets a LocalPersistentContext object for the specified key. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the value stored in the context object. + The first key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a LocalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the value stored in the context object. + The first key. + The second key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a LocalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a LocalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Gets a LocalPersistentContext object for the specified keys. + Returns true when the context is first created. Otherwise false. + + The type of the first key. + The type of the second key. + The type of the third key. + The type of the fourth key. + The type of the fifth key. + The type of the value stored in the context object. + The first key. + The second key. + The third key. + The fourth key. + The fifth key. + The persistent context object. + Returns true when the context is first created. Otherwise false. + + + + Persistent Context cache object. + + + + + Estimated cache size in bytes. + + + + + The current number of context entries in the cache. + + + + + If true then persistent context is disabled entirely. + + + + + If true the context will be saved to a file in the temp directory. + + + + + The max size of the cache in bytes. + + + + + Delete the persistent cache file. + + + + + Put this attribute on a validator class to prevent the ValidatorDrawer from running that validator in the inspector. + Typically you would use this for a validation-related attribute that has its own, complex custom drawer that should + handle the validation and error/warning drawing while the inspector is being drawn, but still needs a validator to + run for the project validation scans. + + + + + Apply this to an assembly to register validators for the validation system. + This enables locating of all relevant validator types very quickly. + + + + + + Use to initialize an empty . + + + + + This attribute can be placed on an assembly to register a value resolver creator that should be queried when a value resolver is being created. + + + + + This attribute can be placed on an assembly to register a value resolver creator that should be queried when a value resolver is being created. + + The resolver + + + + + A ValueResolver resolves a string to a value of a given type, given an InspectorProperty instance to use as context. Call to get an instance of a ValueResolver. + Value resolvers are a globally extendable system that can be hooked into and modified or changed by creating and registering a . + See Odin's tutorials for details and examples of how to use ValueResolvers. + + + + + The context of this ValueResolver, containing all of its configurations and values it needs to function. For performance and simplicity reasons, this is a single very large struct that is passed around by ref to anything that needs it. + + + + + The current error message that the resolver has, or null if there is no error message. This is a shortcut for writing "resolver.Context.ErrorMessage". + + + + + Whether there is an error message at the moment. This is a shortcut for writing "resolver.Context.ErrorMessage != null". + + + + + The type of value that this resolver instance is supposed to get. + + + + + Gets a value from the value resolver in a weakly typed manner. + + The selection index at which to get the value, in the case of multi-selection. Defaults to 0. + The value that was gotten. + + + + Draws an error message box if there is an error, and does nothing if there is no error. + + + + + Creates a new value resolver instance from a pre-built context struct, in a weakly typed fashion, though the result + is the same as using a strongly typed generic overload. This is a more advanced use that requires you to + know how the context needs to be set up before value resolution happens. However, this allows you to do more advanced + things like adjust various context values before string resolution happens. + + The pre-built context that should be used to get a resolver. + + + + Creates a new value resolver instance from a pre-built context struct. This is a more advanced use that requires you to + know how the context needs to be set up before value resolution happens. However, this allows you to do more advanced + things like adjust various context values before string resolution happens. + + The pre-built context that should be used to get a resolver. + + + + Creates a new value resolver instance in a weakly typed fashion, though the result is the same as using a strongly typed generic overload. + This is useful when you don't know at compile time which type you want to resolve. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + + + + Creates a new value resolver instance in a weakly typed fashion, though the result is the same as using a strongly typed generic overload. + This is useful when you don't know at compile time which type you want to resolve. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The extra named args that this resolver has access to. Passing in a named arg that already exists will silently override the pre-existing named arg. + + + + Creates a new value resolver instance. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + + + + Creates a new value resolver instance. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The extra named args that this resolver has access to. Passing in a named arg that already exists will silently override the pre-existing named arg. + + + + Creates a new value resolver instance in a weakly typed fashion, though the result is the same as using a strongly typed generic overload. + This is useful when you don't know at compile time which type you want to resolve. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The value that the resolver should return if the string cannot be resolved to anything, or if there is an error in creating a resolver, or if resolution itself throws an exception. + + + + Creates a new value resolver instance in a weakly typed fashion, though the result is the same as using a strongly typed generic overload. + This is useful when you don't know at compile time which type you want to resolve. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The value that the resolver should return if the string cannot be resolved to anything, or if there is an error in creating a resolver, or if resolution itself throws an exception. + The extra named args that this resolver has access to. Passing in a named arg that already exists will silently override the pre-existing named arg. + + + + Creates a new value resolver instance meant to resolve a string value in particular. This is a shorthand for creating a string resolver that has the resolved string as a fallback value. + This special case will get you the behaviour where, if you pass in a string that is not meant to be resolved in a special way, the value resolver will just pass you that string back as the result value. + + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + + + + Creates a new value resolver instance meant to resolve a string value in particular. This is a shorthand for creating a string resolver that has the resolved string as a fallback value. + This special case will get you the behaviour where, if you pass in a string that is not meant to be resolved in a special way, the value resolver will just pass you that string back as the result value. + + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The extra named args that this resolver has access to. Passing in a named arg that already exists will silently override the pre-existing named arg. + + + + Creates a new value resolver instance. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The value that the resolver should return if the string cannot be resolved to anything, or if there is an error in creating a resolver, or if resolution itself throws an exception. + + + + Creates a new value resolver instance. + + The type of value that the new resolver should resolve. + The property that is the context for the resolution to happen in. + The string that should be resolved to a value. + The value that the resolver should return if the string cannot be resolved to anything, or if there is an error in creating a resolver, or if resolution itself throws an exception. + The extra named args that this resolver has access to. Passing in a named arg that already exists will silently override the pre-existing named arg. + + + + Gets a nicely formatted string that lists all the errors in the given set of value resolvers. The returned value is null if there are no errors. + + + + + Gets a nicely formatted string that lists all the errors in the given set of value resolvers. The returned value is null if there are no errors. + + + + + Draws error boxes for all errors in the given value resolvers, or does nothing if there are no errors. This is equivalent to calling DrawError() on all resolvers passed to this method. + + + + + Draws error boxes for all errors in the given value resolvers, or does nothing if there are no errors. This is equivalent to calling DrawError() on all resolvers passed to this method. + + + + + A ValueResolver resolves a string to a value of a given type, given an InspectorProperty instance to use as context. Call to get an instance of a ValueResolver. + Value resolvers are a globally extendable system that can be hooked into and modified or changed by creating and registering a . + See Odin's tutorials for details and examples of how to use ValueResolvers. + + + + + The delegate that does the actual value resolution. You should not call this manually, but instead call . + + + + + The type of value that this resolver instance is supposed to get. Always equal to typeof(). + + + + + Gets a value from the value resolver. + + The selection index at which to get the value, in the case of multi-selection. Defaults to 0. + The value that was gotten. + + + + Gets a value from the value resolver in a weakly typed manner. + + The selection index at which to get the value, in the case of multi-selection. Defaults to 0. + The value that was gotten. + + + + This struct contains all of a ValueResolver's configurations and values it needs to function. For performance and simplicity reasons, this is a single very large struct that lives on a ValueResolver instance and is passed around by ref to anything that needs it. + + + + + The property that *provides* the context for the value resolution. This is the instance that was passed to the resolver when it was created. Note that this is different from , which is based on this value, but almost always isn't the same InspectorProperty instance. + + + + + The error message, if a valid value resolution wasn't found, or if creation of the value resolver failed because was invalid, or if value resolution was run but threw an exception. (In this last case, will be true.) + + + + + The named values that are available to the value resolver. Use this field only to get and set named values - once the ValueResolver has been created, new named values will have no effect. + + + + + This is the fallback value that the value resolver will return if there is an error or failed resolution for any reason. + + + + + Whether there is a fallback value. This boolean exists because then null is also a valid fallback value. This boolean will always be true if an overload is used that takes a fallback value parameter. + + + + + This will be true if is not null and the message was caused by an exception thrown by code invoked during an actual value resolution. + + + + + Whether exceptions thrown during value resolution should be logged to the console. + + + + + The type of value that the resolver is resolving. + + + + + The string that is resolved to get a value. + + + + + Whether the value resolver should sync ref parameters of invoked methods with named values. If this is true, then if a ref or out parameter value is changed during value resolution, the named value associated with that parameter will also be changed to the same value. + + + + + Whether this context has been resolved. + + + + + The type that is the parent of the value resolution, ie, the type that is the context. This is the same as .ValueEntry.TypeOfValue. + + + + + The property that *is* the context for the value resolution. This is not the instance that was passed to the resolver when it was created, but this value is based on that instance. This is the property that provides the actual context - for example, if is for a member of a type - or for an element in a collection contained by a member - this value will be the parent property for the type that contains that member. Only if is the tree's root property is the same as . + + + + + Gets the parent value which provides the context of the resolver. + + The selection index of the parent value to get. + + + + Sets the parent value which provides the context of the resolver. + + The selection index of the parent value to set. + The value to set. + + + + Adds the default named values of "property" and "value" to the context's named values. + This method is usually automatically invoked when a resolver is created, so there + is no need to invoke it manually. + + + + + Opens a window which displays a list of all icons available from . + + + + + Opens a window which displays a list of all icons available from . + + + + + Builds the selection tree. + + + + + Gets a texture of an odin bg symbol. + + + + + Adds menu items to the Unity Editor, draws the About window, and the preference window found under Edit > Preferences > Odin Inspector. + + + + + Access the StaticInspectorWindow from Tools > Odin > Inspector > Static Inspector. + + + + + Member filter for access modifiers. + + + + + include public members. + + + + + Include Non-public members. + + + + + Include both public and non-public members. + + + + + Member filter for member types. + + + + + No members included. + + + + + Include field members. + + + + + Include property members. + + + + + Include method members. + + + + + Include group members. + + + + + Include members from the base types. + + + + + Include members marked with the Obsolete attribute. + + + + + Include all members except members marked with the Obsolete attribute. + + + + + Shows the window. + + + + + Opens a new static inspector window for the given type. + + + + + Draws the Odin Editor Window. + + + + + Draws the editor for the this.CurrentDrawingTargets[index]. + + + + + Contains references to UnityEngine.Networking types. These types have been removed in Unity 2019+, and thus may be null. + + + + + Contains configuration for generating an assembly that provides increased AOT support in Odin. + + + + + + Whether to automatically scan the project and generate an AOT dll, right before builds. This will only affect platforms that are in the list. + + + **This will only work on Unity 5.6 and higher!** + + + + + + Whether to automatically delete the generated AOT dll after a build has completed. + + + + + A list of platforms to automatically scan the project and generate an AOT dll for, right before builds. This will do nothing unless is true. + + + + + The path to the AOT folder that the AOT .dll and linker file is created in, relative to the current project folder. + + + + + Scans the entire project for types to support AOT serialization for. + + + + + Generates an AOT DLL, using the current configuration of the AOTGenerationConfig instance. + + + + + Defines the ODIN_INSPECTOR symbol. + + + + + The Odin Inspector Serialization Debugger Window. + + + + + + Opens the Serialization Debugger Window with the last debugged type. + + + + + Opens the Serialization Debugger Window and debugs the given type. + + The type to debug serialization of. + + + + Initializes the Serialization Debugger Window. + + + + diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml.meta new file mode 100644 index 0000000..9015656 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a4865f1ab4504ed8a368670db22f096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.dll new file mode 100644 index 0000000..67f7ee4 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.dll.meta new file mode 100644 index 0000000..2de0af9 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: afbf832bc46149f5a291e87cab63e46d +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.xml new file mode 100644 index 0000000..589bb1f --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.xml @@ -0,0 +1,39 @@ + + + + Sirenix.OdinValidator.Editor + + + + + Result can be null. + + + + + Result will be null if the object is deleted. + + + + + Defines the ODIN_VALIDATOR symbol. + + + + + + Apply this to an assembly to register validation rules for the validation system. + This enables locating of all relevant validator types very quickly. + + + Only use this to register types derived from Validator! It is important to understand + that a rule is simply a serialized Validator instance that can be enabled, disabled, + and have its contained values modified from the rules management GUI in the Odin Validator + window. + + Read our Odin Validator tutorials for more information. + + + + + diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.xml.meta new file mode 100644 index 0000000..ca8afda --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: afbf832bc46149f5a291e87cab63096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll new file mode 100644 index 0000000..067fe78 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll.meta new file mode 100644 index 0000000..5c91f29 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 61824742f78323c439d83403f8272d41 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll new file mode 100644 index 0000000..71f0849 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll.meta new file mode 100644 index 0000000..cc2b4d3 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 74721b9f0af448f5ae2e91102a1a5edd +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 1 + settings: + Exclude Android: 0 + Exclude Editor: 0 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude N3DS: 0 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude PS4: 0 + Exclude PSM: 0 + Exclude PSP2: 0 + Exclude SamsungTV: 0 + Exclude Tizen: 0 + Exclude WebGL: 0 + Exclude WiiU: 0 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 0 + Exclude XboxOne: 0 + Exclude iOS: 0 + Exclude tvOS: 0 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml new file mode 100644 index 0000000..f9e16ab --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml @@ -0,0 +1,202 @@ + + + + Sirenix.Serialization.Config + + + + + A helper class for quickly and easily defining custom loggers. + + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Specifies a data format to read and write in. + + + + + A custom packed binary format. This format is most efficient and almost allocation-free, + but its serialized data is not human-readable. + + + + + A JSON format compliant with the json specification found at "http://www.json.org/". + + This format has rather sluggish performance and allocates frightening amounts of string garbage. + + + + + A format that does not serialize to a byte stream, but to a list of data nodes in memory + which can then be serialized by Unity. + + This format is highly inefficient, and is primarily used for ensuring that Unity assets + are mergeable by individual values when saved in Unity's text format. This makes + serialized values more robust and data recovery easier in case of issues. + + This format is *not* recommended for use in builds. + + + + + Defines default loggers for serialization and deserialization. This class and all of its loggers are thread safe. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + The policy for handling errors during serialization and deserialization. + + + + + Attempts will be made to recover from errors and continue serialization. Data may become invalid. + + + + + Exceptions will be thrown when errors are logged. + + + + + Exceptions will be thrown when warnings or errors are logged. + + + + + Not yet documented. + + + + + Text for the cautionary serialization warning shown in the inspector. + + + + + Text for the hide button for the cautionary serialization warning shown in the inspector. + + + + + Text for the hide button for the cautionary prefab warning shown in the inspector. + + + + + Whether the user has chosen to hide the cautionary serialization warning. + + + + + Whether the user has chosen to hide the warning messages related to the OdinSerialize attribute. + + + + + Whether the user has chosen to hide the warning messages related to the SerializeField and ShowInInspector attributes on non-serialized members. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Implements methods for logging warnings, errors and exceptions during serialization and deserialization. + + + + + Logs a warning. + + The warning to log. + + + + Logs an error. + + The error to log. + + + + Logs an exception. + + The exception to log. + + + + The policy for which level of logging to do during serialization and deserialization. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml.meta new file mode 100644 index 0000000..4334acc --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 74721b9f0af448f5ae2e91102a1a096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll new file mode 100644 index 0000000..130c906 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll.meta new file mode 100644 index 0000000..063427b --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 5f3147f7af4c49739579b966c458f5e4 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml new file mode 100644 index 0000000..84808d2 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml @@ -0,0 +1,9864 @@ + + + + Sirenix.Serialization + + + + + Provides basic functionality and overridable abstract methods for implementing a data reader. + + If you inherit this class, it is VERY IMPORTANT that you implement each abstract method to the *exact* specifications the documentation specifies. + + + + + + + Initializes a new instance of the class. + + The base stream of the reader. + The deserialization context to use. + The stream or context is null. + Cannot read from stream. + + + + Gets the current node id. If this is less than zero, the current node has no id. + + + The current node id. + + + + + Gets the current node depth. In other words, the current count of the node stack. + + + The current node depth. + + + + + Gets the name of the current node. + + + The name of the current node. + + + + + Gets or sets the base stream of the reader. + + + The base stream of the reader. + + value + Cannot read from stream + + + + Gets the deserialization context. + + + The deserialization context. + + + + + Tries to enter a node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + + This call will change the values of the , , and properties to the correct values for the current node. + + The type of the node. This value will be null if there was no metadata, or if the reader's serialization binder failed to resolve the type name. + true if entering a node succeeded, otherwise false + + + + Exits the current node. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the current node. + + true if the method exited a node, false if it reached the end of the stream. + + + + Tries to enters an array node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + + This call will change the values of the , , and properties to the correct values for the current array node. + + The length of the array that was entered. + true if an array was entered, otherwise false + + + + Exits the closest array. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the exited array node. + + true if the method exited an array, false if it reached the end of the stream. + + + + Reads a primitive array value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The element type of the primitive array. Valid element types can be determined using . + The resulting primitive array. + true if reading a primitive array succeeded, otherwise false + + + + Peeks ahead and returns the type of the next entry in the stream. + + The name of the next entry, if it has one. + The type of the next entry. + + + + Reads an internal reference id. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The internal reference id. + true if reading the value succeeded, otherwise false + + + + Reads an external reference index. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference index. + true if reading the value succeeded, otherwise false + + + + Reads an external reference guid. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference guid. + true if reading the value succeeded, otherwise false + + + + Reads an external reference string. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference string. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the string of the entry is longer than 1 character, the first character of the string will be taken as the result. + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a null value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + true if reading the value succeeded, otherwise false + + + + Skips the next entry value, unless it is an or an . If the next entry value is an or an , all of its contents will be processed, deserialized and registered in the deserialization context, so that internal reference values are not lost to entries further down the stream. + + + + + Disposes all resources and streams kept by the data reader. + + + + + Tells the reader that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same reader is used to deserialize several different, unrelated values. + + + + + Gets a dump of the data being read by the writer. The format of this dump varies, but should be useful for debugging purposes. + + + + + Peeks the current entry. + + The peeked entry. + + + + Consumes the current entry, and reads to the next one. + + The next entry. + + + + Implements functionality that is shared by both data readers and data writers. + + + + + Gets or sets the context's or writer's serialization binder. + + + The reader's or writer's serialization binder. + + + + + Gets a value indicating whether the reader or writer is in an array node. + + + true if the reader or writer is in an array node; otherwise, false. + + + + + Gets the current node depth. In other words, the current count of the node stack. + + + The current node depth. + + + + + Gets the current nodes array. The amount of nodes contained in it is stored in the property. The remainder of the array's length is buffer space. + + + The current node array. + + + + + Gets the current node, or if there is no current node. + + + The current node. + + + + + Pushes a node onto the node stack. + + The node to push. + + + + Pushes a node with the given name, id and type onto the node stack. + + The name of the node. + The id of the node. + The type of the node. + + + + Pushes an array node onto the node stack. This uses values from the current node to provide extra info about the array node. + + + + + Pops the current node off of the node stack. + + The name of the node to pop. + + There are no nodes to pop. + or + Tried to pop node with given name, but the current node's name was different. + + + + + Pops the current node if the current node is an array node. + + + + + Provides basic functionality and overridable abstract methods for implementing a data writer. + + If you inherit this class, it is VERY IMPORTANT that you implement each abstract method to the *exact* specifications the documentation specifies. + + + + + + + Initializes a new instance of the class. + + The base stream of the writer. + The serialization context to use. + The stream or context is null. + Cannot write to the stream. + + + + Gets or sets the base stream of the writer. + + + The base stream of the writer. + + value + Cannot write to stream + + + + Gets the serialization context. + + + The serialization context. + + + + + Flushes everything that has been written so far to the writer's base stream. + + + + + Writes the beginning of a reference node. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the reference node. + The type of the reference node. If null, no type metadata will be written. + The id of the reference node. This id is acquired by calling . + + + + Begins a struct/value type node. This is essentially the same as a reference node, except it has no internal reference id. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the struct node. + The type of the struct node. If null, no type metadata will be written. + + + + Ends the current node with the given name. If the current node has another name, an is thrown. + + The name of the node to end. This has to be the name of the current node. + + + + Begins an array node of the given length. + + The length of the array to come. + + + + Ends the current array node, if the current node is an array node. + + + + + Writes a primitive array to the stream. + + The element type of the primitive array. Valid element types can be determined using . + The primitive array to write. + + + + Writes a null value to the stream. + + The name of the value. If this is null, no name will be written. + + + + Writes an internal reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external index reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external guid reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external string reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Disposes all resources and streams kept by the data writer. + + + + + Tells the writer that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same writer is used to serialize several different, unrelated values. + + + + + Gets a dump of the data currently written by the writer. The format of this dump varies, but should be useful for debugging purposes. + + + + + Reads data from a stream that has been written by a . + + + + + + Initializes a new instance of the class. + + The base stream of the reader. + The deserialization context to use. + + + + Disposes all resources kept by the data reader, except the stream, which can be reused later. + + + + + Peeks ahead and returns the type of the next entry in the stream. + + The name of the next entry, if it has one. + + The type of the next entry. + + + + + Tries to enters an array node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + This call will change the values of the , , and properties to the correct values for the current array node. + + The length of the array that was entered. + + true if an array was entered, otherwise false + + + + + Tries to enter a node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + This call will change the values of the , , and properties to the correct values for the current node. + + The type of the node. This value will be null if there was no metadata, or if the reader's serialization binder failed to resolve the type name. + + true if entering a node succeeded, otherwise false + + + + + Exits the closest array. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the exited array node. + + + true if the method exited an array, false if it reached the end of the stream. + + + + + Exits the current node. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the current node. + + + true if the method exited a node, false if it reached the end of the stream. + + + + + Reads a primitive array value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The element type of the primitive array. Valid element types can be determined using . + The resulting primitive array. + + true if reading a primitive array succeeded, otherwise false + + Type + typeof(T).Name + is not a valid primitive array type. + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the string of the entry is longer than 1 character, the first character of the string will be taken as the result. + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an external reference guid. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference guid. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an external reference index. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference index. + + true if reading the value succeeded, otherwise false + + + + + Reads an external reference string. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference string. + + true if reading the value succeeded, otherwise false + + + + + Reads a null value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + + true if reading the value succeeded, otherwise false + + + + + Reads an internal reference id. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The internal reference id. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Tells the reader that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same reader is used to deserialize several different, unrelated values. + + + + + Peeks the current entry. + + The peeked entry. + + + + Consumes the current entry, and reads to the next one. + + The next entry. + + + + Writes data to a stream that can be read by a . + + + + + + Initializes a new instance of the class. + + The base stream of the writer. + The serialization context to use. + + + + Begins an array node of the given length. + + The length of the array to come. + + + + Writes the beginning of a reference node. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the reference node. + The type of the reference node. If null, no type metadata will be written. + The id of the reference node. This id is acquired by calling . + + + + Begins a struct/value type node. This is essentially the same as a reference node, except it has no internal reference id. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the struct node. + The type of the struct node. If null, no type metadata will be written. + + + + Disposes all resources kept by the data writer, except the stream, which can be reused later. + + + + + Ends the current array node, if the current node is an array node. + + + + + Ends the current node with the given name. If the current node has another name, an is thrown. + + The name of the node to end. This has to be the name of the current node. + + + + Writes a primitive array to the stream. + + The element type of the primitive array. Valid element types can be determined using . + The primitive array to write. + Type + typeof(T).Name + is not a valid primitive array type. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external guid reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external index reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external string reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a null value to the stream. + + The name of the value. If this is null, no name will be written. + + + + Writes an internal reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Tells the writer that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same writer is used to serialize several different, unrelated values. + + + + + Entry types in the binary format written by . + + + + + An invalid entry. + + + + + Entry denoting a named start of a reference node. + + + + + Entry denoting an unnamed start of a reference node. + + + + + Entry denoting a named start of a struct node. + + + + + Entry denoting an unnamed start of a struct node. + + + + + Entry denoting an end of node. + + + + + Entry denoting the start of an array. + + + + + Entry denoting the end of an array. + + + + + Entry denoting a primitive array. + + + + + Entry denoting a named internal reference. + + + + + Entry denoting an unnamed internal reference. + + + + + Entry denoting a named external reference by index. + + + + + Entry denoting an unnamed external reference by index. + + + + + Entry denoting a named external reference by guid. + + + + + Entry denoting an unnamed external reference by guid. + + + + + Entry denoting a named sbyte. + + + + + Entry denoting an unnamed sbyte. + + + + + Entry denoting a named byte. + + + + + Entry denoting an unnamed byte. + + + + + Entry denoting a named short. + + + + + Entry denoting an unnamed short. + + + + + Entry denoting a named ushort. + + + + + Entry denoting an unnamed ushort. + + + + + Entry denoting a named int. + + + + + Entry denoting an unnamed int. + + + + + Entry denoting a named uint. + + + + + Entry denoting an unnamed uint. + + + + + Entry denoting a named long. + + + + + Entry denoting an unnamed long. + + + + + Entry denoting a named ulong. + + + + + Entry denoting an unnamed ulong. + + + + + Entry denoting a named float. + + + + + Entry denoting an unnamed float. + + + + + Entry denoting a named double. + + + + + Entry denoting an unnamed double. + + + + + Entry denoting a named decimal. + + + + + Entry denoting an unnamed decimal. + + + + + Entry denoting a named char. + + + + + Entry denoting an unnamed char. + + + + + Entry denoting a named string. + + + + + Entry denoting an unnamed string. + + + + + Entry denoting a named guid. + + + + + Entry denoting an unnamed guid. + + + + + Entry denoting a named boolean. + + + + + Entry denoting an unnamed boolean. + + + + + Entry denoting a named null. + + + + + Entry denoting an unnamed null. + + + + + Entry denoting a type name. + + + + + Entry denoting a type id. + + + + + Entry denoting that the end of the stream has been reached. + + + + + Entry denoting a named external reference by string. + + + + + Entry denoting an unnamed external reference by string. + + + + + Provides a set of methods for reading data stored in a format written by a corresponding class. + + If you implement this interface, it is VERY IMPORTANT that you implement each method to the *exact* specifications the documentation specifies. + + It is strongly recommended to inherit from the class if you wish to implement a new data reader. + + + + + + Gets or sets the reader's serialization binder. + + + The reader's serialization binder. + + + + + Gets or sets the base stream of the reader. + + + The base stream of the reader. + + + + + Gets a value indicating whether the reader is in an array node. + + + true if the reader is in an array node; otherwise, false. + + + + + Gets the name of the current node. + + + The name of the current node. + + + + + Gets the current node id. If this is less than zero, the current node has no id. + + + The current node id. + + + + + Gets the current node depth. In other words, the current count of the node stack. + + + The current node depth. + + + + + Gets the deserialization context. + + + The deserialization context. + + + + + Gets a dump of the data being read by the writer. The format of this dump varies, but should be useful for debugging purposes. + + + + + Tries to enter a node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + + This call will change the values of the , , and properties to the correct values for the current node. + + The type of the node. This value will be null if there was no metadata, or if the reader's serialization binder failed to resolve the type name. + true if entering a node succeeded, otherwise false + + + + Exits the current node. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the current node. + + true if the method exited a node, false if it reached the end of the stream. + + + + Tries to enters an array node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + + This call will change the values of the , , and properties to the correct values for the current array node. + + The length of the array that was entered. + true if an array was entered, otherwise false + + + + Exits the closest array. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the exited array node. + + true if the method exited an array, false if it reached the end of the stream. + + + + Reads a primitive array value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The element type of the primitive array. Valid element types can be determined using . + The resulting primitive array. + true if reading a primitive array succeeded, otherwise false + + + + Peeks ahead and returns the type of the next entry in the stream. + + The name of the next entry, if it has one. + The type of the next entry. + + + + Reads an internal reference id. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The internal reference id. + true if reading the value succeeded, otherwise false + + + + Reads an external reference index. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference index. + true if reading the value succeeded, otherwise false + + + + Reads an external reference guid. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference guid. + true if reading the value succeeded, otherwise false + + + + Reads an external reference string. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference string. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the string of the entry is longer than 1 character, the first character of the string will be taken as the result. + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + true if reading the value succeeded, otherwise false + + + + Reads a null value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + true if reading the value succeeded, otherwise false + + + + Skips the next entry value, unless it is an or an . If the next entry value is an or an , all of its contents will be processed, deserialized and registered in the deserialization context, so that internal reference values are not lost to entries further down the stream. + + + + + Tells the reader that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same reader is used to deserialize several different, unrelated values. + + + + + Provides a set of methods for reading data stored in a format that can be read by a corresponding class. + + If you implement this interface, it is VERY IMPORTANT that you implement each method to the *exact* specifications the documentation specifies. + + It is strongly recommended to inherit from the class if you wish to implement a new data writer. + + + + + + Gets or sets the reader's serialization binder. + + + The reader's serialization binder. + + + + + Gets or sets the base stream of the writer. + + + The base stream of the writer. + + + + + Gets a value indicating whether the writer is in an array node. + + + true if the writer is in an array node; otherwise, false. + + + + + Gets the serialization context. + + + The serialization context. + + + + + Gets a dump of the data currently written by the writer. The format of this dump varies, but should be useful for debugging purposes. + + + + + Flushes everything that has been written so far to the writer's base stream. + + + + + Writes the beginning of a reference node. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the reference node. + The type of the reference node. If null, no type metadata will be written. + The id of the reference node. This id is acquired by calling . + + + + Begins a struct/value type node. This is essentially the same as a reference node, except it has no internal reference id. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the struct node. + The type of the struct node. If null, no type metadata will be written. + + + + Ends the current node with the given name. If the current node has another name, an is thrown. + + The name of the node to end. This has to be the name of the current node. + + + + Begins an array node of the given length. + + The length of the array to come. + + + + Ends the current array node, if the current node is an array node. + + + + + Writes a primitive array to the stream. + + The element type of the primitive array. Valid element types can be determined using . + The primitive array to write. + + + + Writes a null value to the stream. + + The name of the value. If this is null, no name will be written. + + + + Writes an internal reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external index reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external guid reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external string reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Tells the writer that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same writer is used to serialize several different, unrelated values. + + + + + Contains various string constants used by the , and classes. + + + + + The named of a node id entry. + + + + + The name of a type entry. + + + + + The name of a regular array length entry. + + + + + The name of a primitive array length entry. + + + + + The name of a regular array content entry. + + + + + The name of a primitive array content entry. + + + + + The beginning of the content of an internal reference entry. + + + + + The beginning of the content of an external reference by index entry. + + + + + The beginning of the content of an external reference by guid entry. + + + + + The beginning of the content of an external reference by string entry. This is an old entry using an invalid data format where the ref string is dumped inline without escaping. + + + + + The beginning of the content of an external reference by string entry. This is a new entry using the valid format where the ref string is written as an escaped string. + + + + + Reads json data from a stream that has been written by a . + + + + + + Initializes a new instance of the class. + + The base stream of the reader. + The deserialization context to use. + + + + Gets or sets the base stream of the reader. + + + The base stream of the reader. + + + + + Disposes all resources kept by the data reader, except the stream, which can be reused later. + + + + + Peeks ahead and returns the type of the next entry in the stream. + + The name of the next entry, if it has one. + + The type of the next entry. + + + + + Tries to enter a node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + This call will change the values of the , , and properties to the correct values for the current node. + + The type of the node. This value will be null if there was no metadata, or if the reader's serialization binder failed to resolve the type name. + + true if entering a node succeeded, otherwise false + + + + + Exits the current node. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the current node. + + + true if the method exited a node, false if it reached the end of the stream. + + + + + Tries to enters an array node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + This call will change the values of the , , and properties to the correct values for the current array node. + + The length of the array that was entered. + + true if an array was entered, otherwise false + + + + + Exits the closest array. This method will keep skipping entries using until an is reached, or the end of the stream is reached. + + This call MUST have been preceded by a corresponding call to . + + This call will change the values of the , , and to the correct values for the node that was prior to the exited array node. + + + true if the method exited an array, false if it reached the end of the stream. + + + + + Reads a primitive array value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The element type of the primitive array. Valid element types can be determined using . + The resulting primitive array. + + true if reading a primitive array succeeded, otherwise false + + Type + typeof(T).Name + is not a valid primitive array type. + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an internal reference id. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The internal reference id. + + true if reading the value succeeded, otherwise false + + + + + Reads an external reference index. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference index. + + true if reading the value succeeded, otherwise false + + + + + Reads an external reference guid. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference guid. + + true if reading the value succeeded, otherwise false + + + + + Reads an external reference string. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The external reference string. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the string of the entry is longer than 1 character, the first character of the string will be taken as the result. + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads an value. This call will succeed if the next entry is an . + + If the value of the stored integer is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a value. This call will succeed if the next entry is an or an . + + If the stored integer or floating point value is smaller than or larger than , the result will be default(). + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The value that has been read. + + true if reading the value succeeded, otherwise false + + + + + Reads a null value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + + true if reading the value succeeded, otherwise false + + + + + Tells the reader that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same reader is used to deserialize several different, unrelated values. + + + + + Peeks the current entry. + + The peeked entry. + + + + Consumes the current entry, and reads to the next one. + + The next entry. + + + + Writes json data to a stream that can be read by a . + + + + + + Initializes a new instance of the class. + + The base stream of the writer. + The serialization context to use.> + Whether the json should be packed, or formatted as human-readable. + + + + Gets or sets a value indicating whether the json should be packed, or formatted as human-readable. + + + true if the json should be formatted as human-readable; otherwise, false. + + + + + Whether to enable an optimization that ensures any given type name is only written once into the json stream, and thereafter kept track of by ID. + + + + + Enable the "just started" flag, causing the writer to start a new "base" json object container. + + + + + Flushes everything that has been written so far to the writer's base stream. + + + + + Writes the beginning of a reference node. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the reference node. + The type of the reference node. If null, no type metadata will be written. + The id of the reference node. This id is acquired by calling . + + + + Begins a struct/value type node. This is essentially the same as a reference node, except it has no internal reference id. + + This call MUST eventually be followed by a corresponding call to , with the same name. + + The name of the struct node. + The type of the struct node. If null, no type metadata will be written. + + + + Ends the current node with the given name. If the current node has another name, an is thrown. + + The name of the node to end. This has to be the name of the current node. + + + + Begins an array node of the given length. + + The length of the array to come. + + + + Ends the current array node, if the current node is an array node. + + + + + Writes a primitive array to the stream. + + The element type of the primitive array. Valid element types can be determined using . + The primitive array to write. + Type + typeof(T).Name + is not a valid primitive array type. + array + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a null value to the stream. + + The name of the value. If this is null, no name will be written. + + + + Writes an internal reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes a value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external index reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external guid reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an external string reference to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Writes an value to the stream. + + The name of the value. If this is null, no name will be written. + The value to write. + + + + Disposes all resources kept by the data writer, except the stream, which can be reused later. + + + + + Tells the writer that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions. + This method is only relevant when the same writer is used to serialize several different, unrelated values. + + + + + Parses json entries from a stream. + + + + + + The current deserialization context used by the text reader. + + + + + Initializes a new instance of the class. + + The stream to parse from. + The deserialization context to use. + The stream is null. + Cannot read from the stream. + + + + Resets the reader instance's currently peeked char and emergency playback queue. + + + + + Disposes all resources kept by the text reader, except the stream, which can be reused later. + + + + + Reads to (but not past) the beginning of the next json entry, and returns the entry name, contents and type. + + The name of the entry that was parsed. + The content of the entry that was parsed. + The type of the entry that was parsed. + + + + A serialization node as used by the format. + + + + + The name of the node. + + + + + The entry type of the node. + + + + + The data contained in the node. Depending on the entry type and name, as well as nodes encountered prior to this one, the format can vary wildly. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Tries to enters an array node. This will succeed if the next entry is an . + + This call MUST (eventually) be followed by a corresponding call to + This call will change the values of the , , and properties to the correct values for the current array node. + + The length of the array that was entered. + + true if an array was entered, otherwise false + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Reads a primitive array value. This call will succeed if the next entry is an . + + If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an . + + The element type of the primitive array. Valid element types can be determined using . + The resulting primitive array. + + true if reading a primitive array succeeded, otherwise false + + Type + typeof(T).Name + is not a valid primitive array type. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Peeks the current entry. + + The peeked entry. + + + + Consumes the current entry, and reads to the next one. + + The next entry. + + + + Shared config class for and . + + + + + The string to use to separate node id's from their names. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Begins an array node of the given length. + + The length of the array to come. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Utility class for locating and caching formatters for all non-primitive types. + + + + + Editor-only event that fires whenever an emittable formatter has been located. + This event is used by the AOT formatter pre-emitter to locate types that need to have formatters pre-emitted. + + + + + Editor-only event that fires whenever a formatter has been located. + + + + + This event is invoked before everything else when a formatter is being resolved for a given type. If any invoked delegate returns a valid formatter, that formatter is used and the resolve process stops there. + + This can be used to hook into and extend the serialization system's formatter resolution logic. + + + + + Gets a formatter for the type . + + The type to get a formatter for. + The serialization policy to use if a formatter has to be emitted. If null, is used. + + A formatter for the type . + + + + + Gets a formatter for a given type. + + The type to get a formatter for. + The serialization policy to use if a formatter has to be emitted. If null, is used. + + A formatter for the given type. + + The type argument is null. + + + + Gets a formatter for a given type. + + The type to get a formatter for. + The serialization policy to use if a formatter has to be emitted. If null, is used. + Whether to allow the use of weak fallback formatters which do not implement the strongly typed , but which conversely do not need to have had AOT support generated. + + A formatter for the given type. + + The type argument is null. + + + + Formatter for all non-primitive one-dimensional arrays. + + The element type of the formatted array. + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom formatter for the type . + + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Provides common functionality for serializing and deserializing values of type , and provides automatic support for the following common serialization conventions: + + , , , , and . + + The type which can be serialized and deserialized by the formatter. + + + + + The on serializing callbacks for type . + + + + + The on serialized callbacks for type . + + + + + The on deserializing callbacks for type . + + + + + The on deserialized callbacks for type . + + + + + Whether the serialized value is a value type. + + + + + Gets the type that the formatter can serialize. + + + The type that the formatter can serialize. + + + + + Serializes a value using a specified . + + The value to serialize. + The writer to use. + + + + Deserializes a value using a specified . + + The reader to use. + + The deserialized value. + + + + + Deserializes a value of type using a specified . + + The reader to use. + + The deserialized value. + + + + + Serializes a value of type using a specified . + + The value to serialize. + The writer to use. + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins. + You will have to call and immediately after creating the object yourself during deserialization. + + An uninitialized object of type . + + + + Registers the given object reference in the deserialization context. + + NOTE that this method only does anything if is not a value type. + + The value to register. + The reader which is currently being used. + + + + Invokes all methods on the object with the [OnDeserializing] attribute. + + WARNING: This method will not be called automatically if you override GetUninitializedObject and return null! You will have to call it manually after having created the object instance during deserialization. + + The value to invoke the callbacks on. + The deserialization context. + + + + Invokes all methods on the object with the [OnDeserializing] attribute. + + WARNING: This method will not be called automatically if you override GetUninitializedObject and return null! You will have to call it manually after having created the object instance during deserialization. + + The value to invoke the callbacks on. + The deserialization context. + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Provides common functionality for serializing and deserializing weakly typed values of a given type, and provides automatic support for the following common serialization conventions: + + , , , , and . + + + + + + Serializes a value using a specified . + + The value to serialize. + The writer to use. + + + + Deserializes a value using a specified . + + The reader to use. + + The deserialized value. + + + + + Registers the given object reference in the deserialization context. + + NOTE that this method only does anything if is not a value type. + + The value to register. + The reader which is currently being used. + + + + Invokes all methods on the object with the [OnDeserializing] attribute. + + WARNING: This method will not be called automatically if you override GetUninitializedObject and return null! You will have to call it manually after having created the object instance during deserialization. + + The value to invoke the callbacks on. + The deserialization context. + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Formatter for all delegate types. + + This formatter can handle anything but delegates for dynamic methods. + + + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins. + You will have to call and immediately after creating the object yourself during deserialization. + + + An uninitialized object of type . + + + + + Emergency hack class to support serialization of types derived from dictionary + + + + + Returns null. + + + A value of null. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom generic formatter for the generic type definition . + + The type of the dictionary key. + The type of the dictionary value. + + + + + Creates a new instance of . + + + + + Returns null. + + + A value of null. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom Odin serialization formatter for . + + Type of primary key. + Type of secondary key. + Type of value. + + + + Creates a new instance of . + + + + + Returns null. + + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides an easy way of implementing custom formatters. + + The type which can be serialized and deserialized by the formatter. + + + + Reads through all entries in the current node one at a time, and calls for each entry. + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Calls directly. + + The value to serialize. + The writer to serialize with. + + + + Reads a data entry into the value denoted by the entry name. + + The value to read into. + The name of the entry. + The type of the entry. + The reader currently used for deserialization. + + + + Write the serialized values of a value of type . + + The value to serialize. + The writer currently used for serialization. + + + + Indicates that this formatter type has been emitted. Never put this on a type! + + + + + A formatter for empty types. It writes no data, and skips all data that is to be read, deserializing a "default" value. + + + + + Skips the entry to read. + + + + + Does nothing at all. + + + + + Utility class for emitting formatters using the namespace. + + NOTE: Some platforms do not support emitting. Check whether you can emit on the current platform using . + + + + + Used for generating unique formatter helper type names. + + + + + The name of the pre-generated assembly that contains pre-emitted formatters for use on AOT platforms where emitting is not supported. Note that this assembly is not always present. + + + + + The name of the runtime-generated assembly that contains runtime-emitted formatters for use on non-AOT platforms where emitting is supported. Note that this assembly is not always present. + + + + + Base type for all AOT-emitted formatters. + + + + + Shortcut class that makes it easier to emit empty AOT formatters. + + + + + Skips the entry to read. + + + + + Does nothing at all. + + + + + Gets an emitted formatter for a given type. + + NOTE: Some platforms do not support emitting. On such platforms, this method logs an error and returns null. Check whether you can emit on the current platform using . + + The type to emit a formatter for. + The serialization policy to use to determine which members the emitted formatter should serialize. If null, is used. + The type of the emitted formatter. + The type argument is null. + + + + Emits a formatter for a given type into a given module builder, using a given serialization policy to determine which members to serialize. + + Type to create a formatter for. + The module builder to emit a formatter into. + The serialization policy to use for creating the formatter. + The fully constructed, emitted formatter type. + + + + Utility class for the class. + + + + + Determines whether the specified type can be formatted by a . + + The following criteria are checked: type implements , type is not abstract, type is not a generic type definition, type is not an interface, type has a public parameterless constructor. + + The collection type to check. + The element type of the collection. + true if the type can be formatted by a , otherwise false + The type argument is null. + + + + Formatter for all eligible types that implement the interface , and which have no other formatters specified. + + Eligibility for formatting by this class is determined by the method. + + The type of the collection. + The type of the element. + + + + Creates a new instance of . + + + + + Gets a new object of type . + + + A new object of type . + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Gets a new object of type . + + + A new object of type . + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom generic formatter for the generic type definition . + + The element type of the formatted list. + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Serializes and deserializes a given type. + + NOTE that if you are implementing a custom formatter and registering it using the , it is not enough to implement - you have to implement . + + + + + Gets the type that the formatter can serialize. + + + The type that the formatter can serialize. + + + + + Serializes a value using a specified . + + The value to serialize. + The writer to use. + + + + Deserializes a value using a specified . + + The reader to use. + + The deserialized value. + + + + + Serializes and deserializes a given type T. + + The type which can be serialized and deserialized by the formatter. + + + + Serializes a value of type using a specified . + + The value to serialize. + The writer to use. + + + + Deserializes a value of type using a specified . + + The reader to use. + + The deserialized value. + + + + + Custom generic formatter for the generic type definition . + + The type of the key. + The type of the value. + + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Custom generic formatter for the generic type definition . + + The element type of the formatted list. + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom formatter for MethodInfo, since Unity Mono's MethodInfo ISerializable implementation will often crash if the method no longer exists upon deserialization. + + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins. + You will have to call and immediately after creating the object yourself during deserialization. + + + An uninitialized object of type . + + + + + Minimal baseline formatter. Doesn't come with all the bells and whistles of any of the other BaseFormatter classes. + Common serialization conventions aren't automatically supported, and common deserialization callbacks are not automatically invoked. + + The type which can be serialized and deserialized by the formatter. + + + + Whether the serialized value is a value type. + + + + + Gets the type that the formatter can serialize. + + + The type that the formatter can serialize. + + + + + Deserializes a value of type using a specified . + + The reader to use. + + The deserialized value. + + + + + Serializes a value of type using a specified . + + The value to serialize. + The writer to use. + + + + Serializes a value using a specified . + + The value to serialize. + The writer to use. + + + + Deserializes a value using a specified . + + The reader to use. + + The deserialized value. + + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered. + You will have to call immediately after creating the object yourself during deserialization. + + An uninitialized object of type . + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Registers the given object reference in the deserialization context. + + NOTE that this method only does anything if is not a value type. + + The value to register. + The reader which is currently being used. + + + + Whether the serialized value is a value type. + + + + + Gets the type that the formatter can serialize. + + + The type that the formatter can serialize. + + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered. + You will have to call immediately after creating the object yourself during deserialization. + + An uninitialized object of type . + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Registers the given object reference in the deserialization context. + + NOTE that this method only does anything if the serialized type is not a value type. + + The value to register. + The reader which is currently being used. + + + + Formatter for all arrays with more than one dimension. + + The type of the formatted array. + The element type of the formatted array. + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Formatter for all types. + + The type that is nullable. + + + + + Creates a new instance of . + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Formatter for all primitive one-dimensional arrays. + + The element type of the formatted array. This type must be an eligible primitive array type, as determined by . + + + + + Returns null. + + + A null value. + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Returns null. + + + A null value. + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom generic formatter for the generic type definition . + + The element type of the formatted queue. + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Final fallback formatter for all types which have no other formatters. This formatter relies on reflection to work, and is thus comparatively slow and creates more garbage than a custom formatter. + + The type which can be serialized and deserialized by the formatter. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Formatter for types that implement the interface. + + + + + + + Calls on the value to deserialize. + + + + + Calls on the value to deserialize. + + + + + Calls on the value to deserialize. + + + + + Calls on the value to deserialize. + + + + + Formatter for all types that implement the ISerializable interface. + + The type which can be serialized and deserialized by the formatter. + + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins. + You will have to call and immediately after creating the object yourself during deserialization. + + + An uninitialized object of type . + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Creates and reads into a instance using a given reader and context. + + The reader to use. + + The which was read. + + + + + Writes the given using the given writer. + + The to write. + The writer to use. + + + + Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins. + You will have to call and immediately after creating the object yourself during deserialization. + + + An uninitialized object of type . + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom generic formatter for the generic type definition and types derived from it. + + The element type of the formatted stack. + + + + + Returns null. + + + A null value. + + + + + Provides the actual implementation for deserializing a value of type . + + The uninitialized value to serialize into. This value will have been created earlier using . + The reader to deserialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Provides the actual implementation for serializing a value of type . + + The value to serialize. + The writer to serialize with. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Formatter for the type which uses the reader/writer's to bind types. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Returns null. + + null. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + + Applying this attribute to a type indicates that in the case where, when expecting to deserialize an instance of the type + or any of its derived types, but encountering an incompatible, uncastable type in the data being read, the serializer + should attempt to deserialize an instance of the expected type using the stored, possibly invalid data. + + + This is equivalent to the option, expect type-specific instead + of global. + + + + + + Use this attribute to specify that a type that implements the + interface should *always* format itself regardless of other formatters being specified. + + This means that the interface will be used to format all types derived from the type that + is decorated with this attribute, regardless of custom formatters for the derived types. + + + + + + This class gathers info about the current architecture for the purpose of determinining + the unaligned read/write capabilities that we have to work with. + + + + + This will be false on some ARM architectures, such as ARMv7. + In these cases, we will have to perform slower but safer int-by-int read/writes of data. + + Since this value will never change at runtime, performance hits from checking this + everywhere should hopefully be negligible, since branch prediction from speculative + execution will always predict it correctly. + + + + + Provides a way of claiming and releasing cached array buffers. + + The element type of the array to buffer. + + + + + Gets the total element count of the buffered array. This will always be a power of two. + + + The total element count of the buffered array. + + Cannot access a buffer while it is freed. + + + + Gets the buffered array. + + + The buffered array. + + Cannot access a buffer while it is freed. + + + + Gets a value indicating whether this buffer is free. + + + true if this buffer is free; otherwise, false. + + + + + Claims a buffer with the specified minimum capacity. Note: buffers always have a capacity equal to or larger than 256. + + The minimum capacity. + A buffer which has a capacity equal to or larger than the specified minimum capacity. + Requested size of buffer must be larger than 0. + + + + Frees the specified buffer. + + The buffer to free. + The buffer argument is null. + + + + Frees this buffer. + + + + + Frees this buffer. + + + + + Attribute indicating that a class which implements the interface somewhere in its hierarchy is a custom formatter for the type T. + + + + + + The priority of the formatter. Of all the available custom formatters, the formatter with the highest priority is always chosen. + + + + + Initializes a new instance of the class with priority 0. + + + + + Initializes a new instance of the class. + + The priority of the formatter. Of all the available custom formatters, the formatter with the highest priority is always chosen. + + + + Attribute indicating that a generic type definition class which implements the interface somewhere in its hierarchy is a custom formatter for *any variation* of the generic type definition T. + + The formatter's generic type parameters are mapped onto the serialized type's generic type parameters. + + For example, implements , where T is . + + + + + + The generic type definition of the serialized type. + + + + + Initializes a new instance of the class. + + The generic type definition of the serialized type. + The priority of the formatter. Of all the available custom formatters, the formatter with the highest priority is always chosen. + was null. + The type given in is not a generic type definition. + + + + Helper class for quickly and easily implementing the interface. + + + + + Initializes a new instance of the class. + + The policy ID. + if set to true non serializable types will be allowed. + The delegate to use for determining whether members should be serialized. + + The id argument or the shouldSerializeFunc argument was null. + + + + + Gets the identifier of the policy. This can be stored in the serialization metadata, so the policy used to serialize it can be recovered without knowing the policy at runtime. This ID should preferably be unique. + + + The identifier of the policy. + + + + + Gets a value indicating whether to allow non serializable types. (Types which are not decorated with .) + + + true if serializable types are allowed; otherwise, false. + + + + + Gets a value indicating whether a given should be serialized or not. + + The member to check. + + true if the given member should be serialized, otherwise, false. + + + + + An attribute that lets you help the DefaultSerializationBinder bind type names to types. This is useful if you're renaming a type, + that would result in data loss, and what to specify the new type name to avoid loss of data. + + + + + [assembly: OdinSerializer.BindTypeNameToType("Namespace.OldTypeName", typeof(Namespace.NewTypeName))] + //[assembly: OdinSerializer.BindTypeNameToType("Namespace.OldTypeName, OldFullAssemblyName", typeof(Namespace.NewTypeName))] + + namespace Namespace + { + public class SomeComponent : SerializedMonoBehaviour + { + public IInterface test; // Contains an instance of OldTypeName; + } + + public interface IInterface { } + + public class NewTypeName : IInterface { } + + //public class OldTypeName : IInterface { } + } + + + + + + Initializes a new instance of the class. + + Old old full type name. If it's moved to new a new assembly you must specify the old assembly name as well. See example code in the documentation. + The new type. + + + + Provides a default, catch-all implementation. This binder only includes assembly names, without versions and tokens, in order to increase compatibility. + + + + + + + Bind a type to a name. + + The type to bind. + The debug context to log to. + + The name that the type has been bound to. + + The type argument is null. + + + + Determines whether the specified type name is mapped. + + + + + Binds a name to type. + + The name of the type to bind. + The debug context to log to. + + The type that the name has been bound to, or null if the type could not be resolved. + + The typeName argument is null. + + + + The context of a given deserialization session. This class maintains all internal and external references during deserialization. + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The streaming context to use. + + + + Initializes a new instance of the class. + + The formatter converter to use. + + + + Initializes a new instance of the class. + + The streaming context to use. + The formatter converter to use. + The formatterConverter parameter is null. + + + + Gets or sets the context's type binder. + + + The context's serialization binder. + + + + + Gets or sets the string reference resolver. + + + The string reference resolver. + + + + + Gets or sets the Guid reference resolver. + + + The Guid reference resolver. + + + + + Gets or sets the index reference resolver. + + + The index reference resolver. + + + + + Gets the streaming context. + + + The streaming context. + + + + + Gets the formatter converter. + + + The formatter converter. + + + + + Gets or sets the serialization configuration. + + + The serialization configuration. + + + + + Registers an internal reference to a given id. + + The id to register the reference with. + The reference to register. + + + + Gets an internal reference from a given id, or null if the id has not been registered. + + The id of the reference to get. + An internal reference from a given id, or null if the id has not been registered. + + + + Gets an external object reference by index, or null if the index could not be resolved. + + The index to resolve. + An external object reference by the given index, or null if the index could not be resolved. + + + + Gets an external object reference by guid, or null if the guid could not be resolved. + + The guid to resolve. + An external object reference by the given guid, or null if the guid could not be resolved. + + + + Gets an external object reference by an id string, or null if the id string could not be resolved. + + The id string to resolve. + An external object reference by an id string, or null if the id string could not be resolved. + + + + Resets the deserialization context completely to baseline status, as if its constructor has just been called. + This allows complete reuse of a deserialization context, with all of its internal reference buffers. + + + + + An entry type which is part of a stream being read by a . + + + + + Could not parse entry. + + + + + Entry is a primitive value of type string or char. + + + + + Entry is a primitive value of type guid. + + + + + Entry is a primitive value of type sbyte, byte, short, ushort, int, uint, long or ulong. + + + + + Entry is a primitive value of type float, double or decimal. + + + + + Entry is a primitive boolean value. + + + + + Entry is a null value. + + + + + Entry marks the start of a node, IE, a complex type that contains values of its own. + + + + + Entry marks the end of a node, IE, a complex type that contains values of its own. + + + + + Entry contains an ID that is a reference to a node defined previously in the stream. + + + + + Entry contains the index of an external object in the DeserializationContext. + + + + + Entry contains the guid of an external object in the DeserializationContext. + + + + + Entry marks the start of an array. + + + + + Entry marks the end of an array. + + + + + Entry marks a primitive array. + + + + + Entry indicating that the reader has reached the end of the data stream. + + + + + Entry contains the string id of an external object in the DeserializationContext. + + + + + + Causes Odin's inspector to completely ignore a given member, preventing it from even being included in an Odin PropertyTree, + and such will not cause any performance hits in the inspector. + + Note that Odin can still serialize an excluded member - it is merely ignored in the inspector itself. + + + + + Provides an array of utility methods which are commonly used by serialization formatters. + + + + + Gets a map of all serializable members on the given type. This will also properly map names extracted from and to their corresponding members. + + The type to get a map for. + The serialization policy to use. If null, is used. + A map of all serializable members on the given type. + + + + Gets an array of all serializable members on the given type. + + The type to get serializable members for. + The serialization policy to use. If null, is used. + An array of all serializable members on the given type. + + + + Creates a fake Unity null value of a given type, for the given -derived owning type. + + Unity uses these kinds of values to indicate missing object references. + + Type of the null value. + Type of the owning value. This is the value which changes the which you get. + A fake Unity null value of a given type. + The nullType or owningType parameter is null. + + The type given in the nullType parameter is not a Unity object. + or + The type given in the owningType parameter is not a Unity object. + + + + + Determines whether a given type is a primitive type to the serialization system. + + The following criteria are checked: type.IsPrimitive or type.IsEnum, or type is a , or . + + The type to check. + true if the given type is a primitive type; otherwise, false. + + + + Determines whether a given type is a primitive array type. Namely, arrays with primitive array types as elements are primitive arrays. + + The following types are primitive array types: , , , , , , , , , , , , and . + + The type to check. + true if the given type is a primitive array type; otherwise, false. + + + + Gets the type contained in the given . Currently only and is supported. + + The to get the contained type of. + The type contained in the given . + Can't get the contained type of the given type. + + + + Gets the value contained in a given . Currently only and is supported. + + The to get the value of. + The instance to get the value from. + The value contained in the given . + Can't get the value of the given type. + + + + Sets the value of a given MemberInfo. Currently only and is supported. + + The to set the value of. + The object to set the value on. + The value to set. + + Property has no setter + or + Can't set the value of the given type. + + + + + Gets an aliased version of a member, with the declaring type name included in the member name, so that there are no conflicts with private fields and properties with the same name in different classes in the same inheritance hierarchy. + + Marked internal in Odin because this method MUST NOT BE CALLED FROM ODIN'S INSPECTOR CODE. + Odin has its own version of this, and there must be no conflict. These aliases must not be + mixed into Odin's own. Use InspectorPropertyInfoUtility.GetPrivateMemberAlias instead. + + + + + Resolves external guid references to reference objects during serialization and deserialization. + + + + + Gets or sets the next resolver in the chain. + + + The next resolver in the chain. + + + + + Tries to resolve a reference from a given Guid. + + The Guid to resolve. + The resolved value. + true if the value was resolved; otherwise, false. + + + + Determines whether this resolver can reference the specified value with a Guid. + + The value to check. + The Guid which references the value. + true if the value can be referenced; otherwise, false. + + + + Resolves external index references to reference objects during serialization and deserialization. + + + + + Tries to resolve the given reference index to a reference value. + + The index to resolve. + The resolved value. + true if the index could be resolved to a value, otherwise false. + + + + Determines whether the specified value can be referenced externally via this resolver. + + The value to reference. + The index of the resolved value, if it can be referenced. + true if the reference can be resolved, otherwise false. + + + + Resolves external strings references to reference objects during serialization and deserialization. + + + + + Gets or sets the next resolver in the chain. + + + The next resolver in the chain. + + + + + Tries to resolve a reference from a given Guid. + + The to resolve. + The resolved value. + true if the value was resolved; otherwise, false. + + + + Determines whether this resolver can reference the specified value with a string. + + The value to check. + The string which references the value. + true if the value can be referenced; otherwise, false. + + + + Specifies that a type is capable of serializing itself using an and an + . + + The deserialized type instance will be created without a constructor call using the + + method if it is a reference type, otherwise it will be created using default(type). + + Use to specify that a class which implements this + interface should *always* format itself regardless of other formatters being specified. + + + + + Serializes the instance's data using the given writer. + + + + + Deserializes data into the instance using the given reader. + + + + + Defines which members to serialize and deserialize when there aren't any custom formatters for a type. + Usually, it governs the behaviour of the and classes. + + + + + Gets the identifier of the policy. This can be stored in the serialization metadata, so the policy used to serialize can be recovered upon deserialization without knowing the policy ahead of time. This ID should preferably be unique. + + + The identifier of the policy. + + + + + Gets a value indicating whether to allow non serializable types. (Types which are not decorated with .) + + + true if serializable types are allowed; otherwise, false. + + + + + Gets a value indicating whether a given should be serialized or not. + + The member to check. + true if the given member should be serialized, otherwise, false. + + + + Contains information about a node during deserialization and serialization. + + + + + An empty node. + + + + + The name of the node. + + + + + The id of the node, or -1 if the node has no id. + + + + + The type of the node, or null if the node has no type metadata. + + + + + Whether the node is an array or not. + + + + + Whether the node is an empty node. + + + + + Initializes a new instance of the struct. + + The name of the node. + The id of the node. + The type of the node. + If set to true the node is an array node. + + + + Implements the operator == between and . + + The first . + The second . + + true if the nodes were equal; otherwise, false. + + + + + Implements the operator != between and . + + The first . + The second . + + true if the nodes were not equal; otherwise, false. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Indicates that an instance field or auto-property should be serialized by Odin. + + + + + + An Odin-serialized prefab modification, containing all the information necessary to apply the modification. + + + + + The type of modification to be made. + + + + + The deep reflection path at which to make the modification. + + + + + A list of all deep reflection paths in the target object where the value referenced by this modification was also located. + + + + + The modified value to set. + + + + + The new list length to set. + + + + + The dictionary keys to add. + + + + + The dictionary keys to remove. + + + + + Applies the modification to the given Object. + + + + + Types of prefab modification that can be applied. + + + + + A value has been changed at a given path. + + + + + A list length has been changed at a given path. + + + + + A dictionary has been changed at a given path. + + + + + Indicates that an instance field or auto-property was previously serialized with a different name, so that values serialized with the old name will be properly deserialized into this member. + + This does the same as Unity's FormerlySerializedAs attribute, except it can also be applied to properties. + + + + + + The former name. + + + + + Initializes a new instance of the class. + + The former name. + + + + Corresponds to the .NET class, but works only with buffers and so never allocates garbage. + + This class always writes and reads bytes in a little endian format, regardless of system architecture. + + + + + Converts a byte array into a hexadecimal string. + + + + + Converts a hexadecimal string into a byte array. + + + + + Reads two bytes from a buffer and converts them into a value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads two bytes from a buffer and converts them into a value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads four bytes from a buffer and converts them into an value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads four bytes from a buffer and converts them into an value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads eight bytes from a buffer and converts them into a value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads eight bytes from a buffer and converts them into an value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads four bytes from a buffer and converts them into an value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads eight bytes from a buffer and converts them into an value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads sixteen bytes from a buffer and converts them into a value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Reads sixteen bytes from a buffer and converts them into a value. + + The buffer to read from. + The index to start reading at. + The converted value. + + + + Turns a value into two bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns an value into two bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns an value into four bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns an value into four bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns a value into eight bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns an value into eight bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns a value into four bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns a value into eight bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns a value into sixteen bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + Turns a value into sixteen bytes and writes those bytes to a given buffer. + + The buffer to write to. + The index to start writing at. + The value to write. + + + + An exception thrown when the serialization system has encountered an issue so severe that serialization is being aborted. If this exception is caught in the serialization system somewhere, it should be rethrown. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exception. + + + + Defines the configuration during serialization and deserialization. This class is thread-safe. + + + + + Initializes a new instance of the class. + + + + + + Setting this member to true indicates that in the case where, when expecting to deserialize an instance of a certain type, + but encountering an incompatible, uncastable type in the data being read, the serializer should attempt to deserialize an + instance of the expected type using the stored, possibly invalid data. + + + This is equivalent to applying the attribute, except global + instead of specific to a single type. Note that if this member is set to false, individual types may still be deserialized + with invalid data if they are decorated with the attribute. + + + + + + Gets or sets the serialization policy. This value is never null; if set to null, it will default to . + + + The serialization policy. + + + + + Gets or sets the debug context. This value is never null; if set to null, a new default instance of will be created upon the next get. + + + The debug context. + + + + + Resets the configuration to a default configuration, as if the constructor had just been called. + + + + + Defines a context for debugging and logging during serialization and deserialization. This class is thread-safe. + + + + + The logger to use for logging messages. + + + + + The logging policy to use. + + + + + The error handling policy to use. + + + + + Log a warning. Depending on the logging policy and error handling policy, this message may be suppressed or result in an exception being thrown. + + + + + Log an error. Depending on the logging policy and error handling policy, this message may be suppressed or result in an exception being thrown. + + + + + Log an exception. Depending on the logging policy and error handling policy, this message may be suppressed or result in an exception being thrown. + + + + + The context of a given serialization session. This class maintains all internal and external references during serialization. + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The streaming context to use. + + + + Initializes a new instance of the class. + + The formatter converter to use. + + + + Initializes a new instance of the class. + + The streaming context to use. + The formatter converter to use. + The formatterConverter parameter is null. + + + + Gets or sets the context's type binder. + + + The context's serialization binder. + + + + + Gets the streaming context. + + + The streaming context. + + + + + Gets the formatter converter. + + + The formatter converter. + + + + + Gets or sets the index reference resolver. + + + The index reference resolver. + + + + + Gets or sets the string reference resolver. + + + The string reference resolver. + + + + + Gets or sets the Guid reference resolver. + + + The Guid reference resolver. + + + + + Gets or sets the serialization configuration. + + + The serialization configuration. + + + + + Tries to get the id of an internally referenced object. + + The reference to get the id of. + The id that was found, or -1 if no id was found. + true if a reference was found, otherwise false. + + + + Tries to register an internal reference. Returns true if the reference was registered, otherwise, false when the reference has already been registered. + + The reference to register. + The id of the registered reference. + true if the reference was registered, otherwise, false when the reference has already been registered. + + + + Tries to register an external index reference. + + The object to reference. + The index of the referenced object. + true if the object could be referenced by index; otherwise, false. + + + + Tries to register an external guid reference. + + The object to reference. + The guid of the referenced object. + true if the object could be referenced by guid; otherwise, false. + + + + Tries to register an external string reference. + + The object to reference. + The id string of the referenced object. + true if the object could be referenced by string; otherwise, false. + + + + Resets the context's internal reference map. + + + + + Resets the serialization context completely to baseline status, as if its constructor has just been called. + This allows complete reuse of a serialization context, with all of its internal reference buffers. + + + + + Contains a set of default implementations of the interface. + + NOTE: Policies are not necessarily compatible with each other in intuitive ways. + Data serialized with the policy + will for example fail to deserialize auto-properties with , + even if only strict data is needed. + It is best to ensure that you always use the same policy for serialization and deserialization. + + This class and all of its policies are thread-safe. + + + + + Tries to get a serialization policy by its id, in case a serialization graph has the policy used for serialization stored by name. + + + + + All fields not marked with are serialized. If a field is marked with both and , then the field will be serialized. + + + + + Public fields, as well as fields or auto-properties marked with or and not marked with , are serialized. + + There are two exceptions: + 1) All fields in tuples, as well as in private nested types marked as compiler generated (e.g. lambda capture classes) are also serialized. + 2) Virtual auto-properties are never serialized. Note that properties specified by an implemented interface are automatically marked virtual by the compiler. + + + + + Only fields and auto-properties marked with or and not marked with are serialized. + + There are two exceptions: + 1) All fields in private nested types marked as compiler generated (e.g. lambda capture classes) are also serialized. + 2) Virtual auto-properties are never serialized. Note that properties specified by an implemented interface are automatically marked virtual by the compiler. + + + + + Provides an array of utility wrapper methods for easy serialization and deserialization of objects of any type. + + + + + Creates an for a given format. + + The stream to write to. + The serialization context to use. + The format to write. + + An for a given format. + + + + + + Creates an for a given format. + + The stream to read from. + The deserialization context to use. + The format to read. + + An for a given format. + + + + + + Serializes the given value using the given writer. + + The value to serialize. + The writer to use. + + + + Serializes the given value, using the given writer. + + The value to serialize. + The writer to use. + A list of the Unity objects which were referenced during serialization. + + + + Serializes the given value using the given writer. + + The type of the value to serialize. + The value to serialize. + The writer to use. + + + + Serializes the given value, using the given writer. + + The type of the value to serialize. + The value to serialize. + The writer to use. + A list of the Unity objects which were referenced during serialization. + + + + Serializes the given value to a given stream in the specified format. + + The value to serialize. + The stream to serialize to. + The format to serialize in. + The context. + + + + Serializes the given value to a given stream in the specified format. + + The value to serialize. + The stream to serialize to. + The format to serialize in. + A list of the Unity objects which were referenced during serialization. + The context. + + + + Serializes the given value to a given stream in the specified format. + + The type of the value to serialize. + The value to serialize. + The stream to serialize to. + The format to serialize in. + The context. + + + + Serializes the given value to a given stream in the specified format. + + The type of the value to serialize. + The value to serialize. + The stream to serialize to. + The format to serialize in. + A list of the Unity objects which were referenced during serialization. + The context. + + + + Serializes the given value using the specified format, and returns the result as a byte array. + + The value to serialize. + The format to use. + The context. + A byte array containing the serialized value. + + + + Serializes the given value using the specified format, and returns the result as a byte array. + + The value to serialize. + The format to use. + A list of the Unity objects which were referenced during serialization. + A byte array containing the serialized value. + + + + Serializes the given value using the specified format, and returns the result as a byte array. + + The type of the value to serialize. + The value to serialize. + The format to use. + The context to use. + A byte array containing the serialized value. + + + + Serializes the given value using the specified format and returns the result as a byte array. + + The type of the value to serialize. + The value to serialize. + The format to use. + A list of the Unity objects which were referenced during serialization. + The context to use. + A byte array containing the serialized value. + + + + Deserializes a value from the given reader. This might fail with primitive values, as they don't come with metadata. + + The reader to use. + The deserialized value. + + + + Deserializes a value from the given reader, using the given list of Unity objects for external index reference resolution. This might fail with primitive values, as they don't come with type metadata. + + The reader to use. + The list of Unity objects to use for external index reference resolution. + + The deserialized value. + + + + + Deserializes a value from the given reader. + + The type to deserialize. + The reader to use. + The deserialized value. + + + + Deserializes a value of a given type from the given reader, using the given list of Unity objects for external index reference resolution. + + The type to deserialize. + The reader to use. + The list of Unity objects to use for external index reference resolution. + + The deserialized value. + + + + + Deserializes a value from the given stream in the given format. This might fail with primitive values, as they don't come with type metadata. + + The reader to use. + The format to read. + The context. + + The deserialized value. + + + + + Deserializes a value from the given stream in the given format, using the given list of Unity objects for external index reference resolution. This might fail with primitive values, as they don't come with type metadata. + + The stream to read from. + The format to read. + The list of Unity objects to use for external index reference resolution. + The context. + + The deserialized value. + + + + + Deserializes a value of a given type from the given stream in the given format. + + The type to deserialize. + The stream to read from. + The format to read. + The context. + + The deserialized value. + + + + + Deserializes a value of a given type from the given stream in the given format, using the given list of Unity objects for external index reference resolution. + + The type to deserialize. + The stream to read from. + The format to read. + The list of Unity objects to use for external index reference resolution. + The context. + + The deserialized value. + + + + + Deserializes a value from the given byte array in the given format. This might fail with primitive values, as they don't come with type metadata. + + The bytes to deserialize from. + The format to read. + The context. + + The deserialized value. + + + + + Deserializes a value from the given byte array in the given format, using the given list of Unity objects for external index reference resolution. This might fail with primitive values, as they don't come with type metadata. + + The bytes to deserialize from. + The format to read. + The list of Unity objects to use for external index reference resolution. + + The deserialized value. + + + + + Deserializes a value of a given type from the given byte array in the given format. + + The type to deserialize. + The bytes to deserialize from. + The format to read. + The context to use. + + The deserialized value. + + + + + Deserializes a value of a given type from the given byte array in the given format, using the given list of Unity objects for external index reference resolution. + + The type to deserialize. + The bytes to deserialize from. + The format to read. + The list of Unity objects to use for external index reference resolution. + The context to use. + + The deserialized value. + + + + + Creates a deep copy of an object. Returns null if null. All Unity objects references will remain the same - they will not get copied. + Similarly, strings are not copied, nor are reflection types such as System.Type, or types derived from System.Reflection.MemberInfo, + System.Reflection.Assembly or System.Reflection.Module. + + + + + Binds types to strings during serialization, and strings to types during deserialization. + + + + + Provides a default, catch-all implementation. This binder only includes assembly names, without versions and tokens, in order to increase compatibility. + + + + + Bind a type to a name. + + The type to bind. + The debug context to log to. + The name that the type has been bound to. + + + + Binds a name to a type. + + The name of the type to bind. + The debug context to log to. + The type that the name has been bound to, or null if the type could not be resolved. + + + + Determines whether the specified type name is mapped. + + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for all complex types; IE, types which are not primitives as determined by the method. + + The type which the can serialize and deserialize. + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for all enums. + + The type of the enum to serialize and deserialize. + + + + + Reads an enum value of type . + + The reader to use. + + The value which has been read. + + + + + Writes an enum value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializes and deserializes a given type, and wraps serialization and deserialization with all the proper calls to free formatters from tedious boilerplate. + + Whenever serializing or deserializing anything, it is *strongly recommended* to use to get a proper wrapping serializer for that type. + + NOTE: This class should NOT be inherited from; it is hard-coded into the system. + + To extend the serialization system, instead create custom formatters, which are used by the class. + + + + + Editor-only event that fires whenever a serializer serializes a type. + + + + + Fires the event. + + + + + Gets a for the given value. If the value is null, it will be treated as a value of type . + + The value to get a for. + A for the given value. + + + + Gets a for type T. + + The type to get a for. + A for type T. + + + + Gets a for the given type. + + The type to get a for. + A for the given type. + The type argument is null. + + + + Reads a value weakly, casting it into object. Use this method if you don't know what type you're going to be working with at compile time. + + The reader to use. + The value which has been read. + + + + Writes a weakly typed value. Use this method if you don't know what type you're going to be working with at compile time. + + The value to write. + The writer to use. + + + + Writes a weakly typed value with a given name. Use this method if you don't know what type you're going to be working with at compile time. + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializes and deserializes the type , and wraps serialization and deserialization with all the proper calls to free formatters from tedious boilerplate. + + Whenever serializing or deserializing anything, it is *strongly recommended* to use to get a proper wrapping serializer for that type. + + NOTE: This class should NOT be inherited from; it is hard-coded into the system. + + To extend the serialization system, instead create custom formatters, which are used by the class. + + The type which the can serialize and deserialize. + + + + Reads a value of type weakly, casting it into object. Use this method if you don't know what type you're going to be working with at compile time. + + The reader to use. + + The value which has been read. + + + + + Writes a weakly typed value of type with a given name. Use this method if you don't know what type you're going to be working with at compile time. + + The name of the value to write. + The value to write. + The writer to use. + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The value to write. + The writer to use. + + + + Writes a value of type with a given name. + + The name of the value to write. + The value to write. + The writer to use. + + + + Fires the event with the T generic argument of the serializer. + + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Serializer for the type. + + + + + + Reads a value of type . + + The reader to use. + + The value which has been read. + + + + + Writes a value of type . + + The name of the value to write. + The value to write. + The writer to use. + + + + Scans the project's build scenes and resources, plus their dependencies, for serialized types to support. Progress bars are shown during the scan. + + The serialized types to support. + Whether to scan the project's build scenes. + Whether to scan all the project's asset bundles. + Whether to scan the project's preloaded assets. + Whether to scan the project's resources. + An optional list of the resource paths to scan. Only has an effect if the scanResources argument is true. All the resources will be scanned if null. + true if the scan succeeded, false if the scan failed or was cancelled + + + + Generates an AOT DLL, using the given parameters. + + + + + Not yet documented. + + Not yet documented. + + + + Not yet documented. + + + + + Not yet documented. + + Not yet documented. + Not yet documented. + + + + Not yet documented. + + Not yet documented. + Not yet documented. + + + + Not yet documented. + + Not yet documented. + Not yet documented. + Not yet documented. + + + + Provides utility methods for handling dictionary keys in the prefab modification system. + + + + + A smart comparer for dictionary keys, that uses the most appropriate available comparison method for the given key types. + + + + + Not yet documented. + + Not yet documented. + Not yet documented. + Not yet documented. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Gets the provider identifier. + + + + + Gets the path string from key. + + The key. + + + + Gets the key from path string. + + The path string. + + + + Compares the specified x. + + The x. + The y. + + + + Not yet documented. + + + + + Gets the path string from key. + + The key. + + + + Gets the key from path string. + + The path string. + + + + Compares the specified x. + + The x. + The y. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Dictionary key path provider for + + + + + Custom formatter for the type. + + + + + + Returns null. + + + A null value. + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + + Custom formatter for the type. + This serializes nothing and always deserializes null, + and only exists to ensure that no coroutine instances + are ever created by the serialization system, since they + will in almost all cases be invalid instances. + + + Invalid coroutine instances crash Unity instantly when + they are garbage collected. + + + + + + Gets the type that the formatter can serialize. + + + The type that the formatter can serialize. + + + + + Returns null. + + + + + Returns null. + + + + + Does nothing. + + + + + Does nothing. + + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom generic formatter for the , , and types. + + The type of UnityEvent that this formatter can serialize and deserialize. + + + + + Get an uninitialized object of type . + + + An uninitialized object of type . + + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Custom formatter for the type. + + + + + + Reads into the specified value using the specified reader. + + The value to read into. + The reader to use. + + + + Writes from the specified value using the specified writer. + + The value to write from. + The writer to use. + + + + Indicates that an Odin-serialized Unity object controls its own serialization format. Every time it is serialized, it will be asked which format to use. + + + + + Gets the format to use for serialization. + + + + + Indicates that an Odin-serialized Unity object provides its own serialization policy rather than using the default policy. + + Note that THE VALUES RETURNED BY THIS INTERFACE WILL OVERRIDE THE PARAMETERS PASSED TO and . + + + + + Indicates that an Odin-serialized Unity object supports prefab serialization. + + + + + Gets or sets the serialization data of the object. + + + + + Unity serialized data struct that contains all data needed by Odin serialization. + + + + + The name of the field. + + + + + The name of the field. + + + + + The name of the field. + + + + + The data format used by the serializer. This field will be automatically set to the format specified in the global serialization config + when the Unity object gets serialized, unless the Unity object implements the interface. + + + + + The serialized data when serializing with the Binray format. + + + + + All serialized Unity references. + + + + + Whether the object contains any serialized data. + + + + + Gets a value indicating whether the struct contains any data. + If this is false, then it could mean that Unity has not yet deserialized the struct. + + + + + The serialized data when serializing with the JSON format. + + + + + The reference to the prefab this is only populated in prefab scene instances. + + + + + All serialized Unity references. + + + + + All Odin serialized prefab modifications. + + + + + The serialized data when serializing with the Nodes format. + + + + + Resets all data. + + + + + Resolves external index references to Unity objects. + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a list of Unity objects. + + The referenced Unity objects. + + + + Gets the currently referenced Unity objects. + + A list of the currently referenced Unity objects. + + + + Sets the referenced Unity objects of the resolver to a given list, or a new list if the value is null. + + The referenced Unity objects to set, or null if a new list is required. + + + + Determines whether the specified value can be referenced externally via this resolver. + + The value to reference. + The index of the resolved value, if it can be referenced. + + true if the reference can be resolved, otherwise false. + + + + + Tries to resolve the given reference index to a reference value. + + The index to resolve. + The resolved value. + + true if the index could be resolved to a value, otherwise false. + + + + + Resets this instance. + + + + + Utility class which initializes the Sirenix serialization system to be compatible with Unity. + + + + + Initializes the Sirenix serialization system to be compatible with Unity. + + + + + Provides an array of utility wrapper methods for easy serialization and deserialization of Unity objects of any type. + Note that, during serialization, it is always assumed that we are running on Unity's main thread. Deserialization can + happen on any thread, and all API's interacting with deserialization are thread-safe. + + Note that setting the IndexReferenceResolver on contexts passed into methods on this class will have no effect, as it will always + be set to a UnityReferenceResolver. + + + + + From the new scriptable build pipeline package + + + + + Note: it is assumed that code calling this is holding the DeserializePrefabCaches_LOCK lock, and will continue to hold it while the returned hashset is being modified + + + + + Whether to always force editor mode serialization. This member only exists in the editor. + + + + + Not yet documented. + + + + + Checks whether Odin will serialize a given member. + + The member to check. + Whether to allow serialization of members that will also be serialized by Unity. + The policy that Odin should be using for serialization of the given member. If this parameter is null, it defaults to . + True if Odin will serialize the member, otherwise false. + + + + Guesses whether or not Unity will serialize a given member. This is not completely accurate. + + The member to check. + True if it is guessed that Unity will serialize the member, otherwise false. + The parameter is null. + + + + Guesses whether or not Unity will serialize a given type. This is not completely accurate. + + The type to check. + True if it is guessed that Unity will serialize the type, otherwise false. + The parameter is null. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Creates an object with default values initialized in the style of Unity; strings will be "", classes will be instantiated recursively with default values, and so on. + + + + + In 2020.1, Unity changed EditorApplication.delayCall from a field to an event, meaning + we now have to use reflection to access it consistently across all versions of Unity. + + + + + FieldInfo method extensions. + + + + + Determines whether the specified field is an alias. + + The field to check. + + true if the specified field is an alias; otherwise, false. + + + + + Returns the original, backing field of an alias field if the field is an alias. + + The field to check. + /// if set to true an exception will be thrown if the field is not aliased. + + The field was not aliased; this only occurs if throwOnNotAliased is true. + + + + Garbage free enumerator methods. + + + + + Garbage free enumerator for lists. + + + + + Garbage free enumerator for dictionaries. + + + + + Garbage free enumator for dictionary values. + + + + + Garbage free enumerator for hashsets. + + + + + List iterator. + + + + + Creates a list iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Hashset iterator. + + + + + Creates a hashset iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Dictionary iterator. + + + + + Creates a dictionary iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Dictionary value iterator. + + + + + Creates a dictionary value iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Various LinQ extensions. + + + + + Perform an action on each item. + + The source. + The action to perform. + + + + Perform an action on each item. + + The source. + The action to perform. + + + + Add a collection to the end of another collection. + + The collection. + The collection to append. + + + + MemberInfo method extensions. + + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this member + + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this member + + + + + Returns the first found custom attribute of type T on this member + Returns null if none was found + + + + + Returns the first found non-inherited custom attribute of type T on this member + Returns null if none was found + + + + + Gets all attributes of the specified generic type. + + The member. + + + + Gets all attributes of the specified generic type. + + The member. + If true, specifies to also search the ancestors of element for custom attributes. + + + + Gets all attribute instances defined on a MemeberInfo. + + The member. + + + + Gets all attribute instances on a MemberInfo. + + The member. + If true, specifies to also search the ancestors of element for custom attributes. + + + + If this member is a method, returns the full method name (name + params) otherwise the member name paskal splitted + + + + + Determines whether a FieldInfo, PropertyInfo or MethodInfo is static. + + The member. + + true if the specified member is static; otherwise, false. + + + + + + Determines whether the specified member is an alias. + + The member to check. + + true if the specified member is an alias; otherwise, false. + + + + + Returns the original, backing member of an alias member if the member is an alias. + + The member to check. + /// if set to true an exception will be thrown if the member is not aliased. + + The member was not aliased; this only occurs if throwOnNotAliased is true. + + + + Various extensions for MethodInfo. + + + + + Returns the specified method's full name "methodName(argType1 arg1, argType2 arg2, etc)" + Uses the specified gauntlet to replaces type names, ex: "int" instead of "Int32" + + + + + Returns a string representing the passed method parameters names. Ex "int num, float damage, Transform target" + + + + + Returns the specified method's full name. + + + + + Tests if a method is an extension method. + + + + + Determines whether the specified method is an alias. + + The method to check. + + true if the specified method is an alias; otherwise, false. + + + + + Returns the original, backing method of an alias method if the method is an alias. + + The method to check. + /// if set to true an exception will be thrown if the method is not aliased. + + The method was not aliased; this only occurs if throwOnNotAliased is true. + + + + Determines the type of operator. + + + + + + The == operator. + + + + + The != operator. + + + + + The + operator. + + + + + The - operator. + + + + + The * operator. + + + + + The / operator. + + + + + The < operator. + + + + + The > operator. + + + + + The <= operator. + + + + + The >= operator. + + + + + The % operator. + + + + + The >> operator. + + + + + The << operator. + + + + + The & operator. + + + + + The | operator. + + + + + The ^ operator. + + + + + The ~ operator. + + + + + The && operator. + + + + + The || operator. + + + + + The ! operator. + + + + + DirectoryInfo method extensions. + + + + + Determines whether the directory has a given directory in its hierarchy of children. + + The parent directory. + The sub directory. + + + + PropertyInfo method extensions. + + + + + Determines whether a property is an auto property with a usable getter and setter. + + + + + Determines whether the specified property is an alias. + + The property to check. + + true if the specified property is an alias; otherwise, false. + + + + + Returns the original, backing property of an alias property if the property is an alias. + + The property to check. + /// if set to true an exception will be thrown if the property is not aliased. + + The property was not aliased; this only occurs if throwOnNotAliased is true. + + + + String method extensions. + + + + + Eg MY_INT_VALUE => MyIntValue + + + + + Returns true if this string is null, empty, or contains only whitespace. + + The string to check. + true if this string is null, empty, or contains only whitespace; otherwise, false. + + + + Type method extensions. + + + + + Type name alias lookup. + TypeNameAlternatives["Single"] will give you "float", "UInt16" will give you "ushort", "Boolean[]" will give you "bool[]" etc.. + + + + + Checks whether a given string is a valid CSharp identifier name. This also checks full type names including namespaces. + + The identifier to check. + + + + Determines whether a type can be casted to another type. + + From. + To. + if set to true an implicit or explicit operator must be defined on the given type. + + + + If a type can be casted to another type, this provides a function to manually convert the type. + + From. + To. + if set to true an implicit or explicit operator must be defined on the given type. + + + + If a type can be casted to another type, this provides a function to manually convert the type. + + if set to true an implicit or explicit operator must be defined on the given type. + + + + If a type can be casted to another type, this provides the method info of the method in charge of converting the type. + + From. + To. + if set to true an implicit or explicit operator must be defined on the given type. + + + + Gets an equality comparer delegate used to compare the equality of values of a given type. In order, this will be: + + 1. The == operator, if one is defined on the type. + 2. A delegate that uses , if the type implements that interface. + 3. .NET's own + + + Note that in the special case of the type , a special equality comparer is returned that only checks whether all the Quaternion components are equal. + This is because, by default, Quaternion's equality operator is broken when operating on invalid quaternions; "default(Quaternion) == default(Quaternion)" evaluates to false, and this causes a multitude of problems. + Special delegates are also returned for float and double, that consider float.NaN to be equal to float.NaN, and double.NaN to be equal to double.NaN. + + + + + Gets the first attribute of type T. Returns null in the no attribute of type T was found. + + The type. + If true, specifies to also search the ancestors of element for custom attributes. + + + + Determines whether a type implements or inherits from another type. + + The type. + To. + + + + Determines whether a type implements an open generic interface or class such as IList<> or List<>. + + Type of the candidate. + Type of the open generic type. + + + + + Determines whether a type implements an open generic interface such as IList<>. + + Type of the candidate. + Type of the open generic interface. + + Type " + openGenericInterfaceType.Name + " is not a generic type definition and an interface. + + + + Determines whether a type implements an open generic class such as List<>. + + Type of the candidate. + Type of the open generic interface. + + + + Gets the generic arguments of an inherited open generic class or interface. + + Type of the candidate. + The open generic type to get the arguments of. + + + + Gets the generic arguments of an inherited open generic class. + + Type of the candidate. + Type of the open generic class. + + + + Gets the generic arguments of an inherited open generic interface. + + Type of the candidate. + Type of the open generic interface. + + + + Gets the MethodInfo of a specific operator kind, with the given left and right operands. This overload is *far* faster than any of the other GetOperatorMethod implementations, and should be used whenever possible. + + + + + Gets the MethodInfo of a specific operator type. + + + + + Gets the MethodInfo of a specific operator type. + + + + + Gets all members from a given type, including members from all base types if the flag isn't set. + + + + + Gets all members from a given type, including members from all base types. + + + + + Gets all members of a specific type from a type, including members from all base types, if the flag isn't set. + + + + + Gets the generic type definition of an open generic base type. + + + + + Gets the generic type definition of an open generic base type. + + + + + Returns a lazy enumerable of all the base types of this type including interfaces and classes + + + + + Returns a lazy enumerable of all the base classes of this type + + + + + Used to filter out unwanted type names. Ex "int" instead of "Int32" + + + + + Returns a nicely formatted name of a type. + + + + + Returns a nicely formatted full name of a type. + + + + + Gets the name of the compilable nice. + + The type. + + + + Gets the full name of the compilable nice. + + The type. + + + + Returns the first found custom attribute of type T on this type + Returns null if none was found + + + + + Returns the first found non-inherited custom attribute of type T on this type + Returns null if none was found + + + + + Gets all attributes of type T. + + The type. + + + + Gets all attributes of type T. + + The type + If true, specifies to also search the ancestors of element for custom attributes. + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this type + + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this type + + + + + Determines whether a type inherits or implements another type. Also include support for open generic base types such as List<>. + + + + + + Determines whether a type inherits or implements another type. Also include support for open generic base types such as List<>. + + + + + + + Gets the number of base types between given type and baseType. + + + + + Determines whether a method has the specified parameter types. + + + + + FieldInfo will return the fieldType, propertyInfo the PropertyType, MethodInfo the return type and EventInfo will return the EventHandlerType. + + The MemberInfo. + + + + Gets the value contained in a given . Currently only and is supported. + + The to get the value of. + The instance to get the value from. + The value contained in the given . + Can't get the value of the given type. + + + + Sets the value of a given MemberInfo. Currently only and is supported. + + The to set the value of. + The object to set the value on. + The value to set. + + Property has no setter + or + Can't set the value of the given type. + + + + + Tries to infer a set of valid generic parameters for a generic type definition, given a subset of known parameters. + + The generic type definition to attempt to infer parameters for. + The inferred parameters, if inferral was successful. + The known parameters to infer from. + True if the parameters could be inferred, otherwise, false. + + genericTypeDefinition is null + or + knownParameters is null + + The genericTypeDefinition parameter must be a generic type definition. + + + + Checks whether an array of types satisfy the constraints of a given generic type definition. + If this method returns true, the given parameters can be safely used with with the given generic type definition. + + The generic type definition to check. + The parameters to check validity for. + + genericType is null + or + types is null + + The genericType parameter must be a generic type definition. + + + + Checks whether an array of types satisfy the constraints of a given generic method definition. + If this method returns true, the given parameters can be safely used with with the given generic method definition. + + The generic method definition to check. + The parameters to check validity for. + + genericType is null + or + types is null + + The genericMethod parameter must be a generic method definition. + + + + Before calling this method we must ALWAYS hold a lock on the GenericConstraintsSatisfaction_LOCK object, as that is an implicit assumption it works with. + + + + + Not yet documented. + + + + + Formats a string with the specified generic parameter constraints on any given type. Example output: where T : class + + + + + Determines whether a generic type contains the specified generic argument constraints. + + The type. + The generic argument types. + + + + Determines whether a type is a fully constructed generic type. + + + + + Determines whether a type is nullable by ensuring the type is neither a PrimitiveType, ValueType or an Enum. + + + + + Gets the enum bitmask in a ulong. + + enumType + + + + Extends various Unity classes. + + + + + Determines whether a Unity object is null or "fake null", + without ever calling Unity's own equality operators. + This method is useful for checking if a Unity object is + null, destroyed or missing at times when it is not allowed + to call Unity's own equality operators, for example when + not running on the main thread. + + The Unity object to check. + True if the object is null, missing or destroyed; otherwise false. + + + + Defines how an assembly's import settings should be configured. + + + + + Include the assembly in the build, but not in the editor. + + + + + Include the assembly in the editor, but not in the build. + + + + + Include the assembly in both the build and in the editor. + + + + + Exclude the assembly from both the build and from the editor. + + + + + Utility for correctly setting import on OdinSerializer assemblies based on platform and scripting backend. + + + + + All valid Unity BuildTarget platforms. + + + + + All valid Unity BuildTarget platforms that support Just In Time compilation. + + + + + All scripting backends that support JIT. + + + + + All API compatibility levels that support JIT. + + + + + Set the import settings on the assembly. + + The path to the assembly to configure import settings from. + The import settings to configure for the assembly at the path. + + + + Set the import settings on the assembly. + + The path to the assembly to configure import settings from. + Indicates if the assembly should be included in the build. + Indicates if the assembly should be included in the Unity editor. + + + + Gets the current scripting backend for the build from the Unity editor. This method is Unity version independent. + + + + + + Gets the current API compatibility level from the Unity Editor. This method is Unity version independent. + + + + + + Gets a value that indicates if the specified platform supports JIT. + + The platform to test. + true if the platform supports JIT; otherwise false. + + + + Gets a value that indicates if the specified scripting backend supports JIT. + + The backend to test. + true if the backend supports JIT; otherwise false. + + + + Gets a value that indicates if the specified api level supports JIT. + + The api level to test. + true if the api level supports JIT; otherwise false. + + + + Gets a value that indicates if the specified build settings supports JIT. + + The platform build setting. + The scripting backend build settting. + The api level build setting. + true if the build settings supports JIT; otherwise false. + + + + Provides an easy way of claiming and freeing cached values of any non-abstract reference type with a public parameterless constructor. + + Cached types which implement the interface will receive notifications when they are claimed and freed. + + Only one thread should be holding a given cache instance at a time if is implemented, since the invocation of + is not thread safe, IE, weird stuff might happen if multiple different threads are trying to free + the same cache instance at the same time. This will practically never happen unless you're doing really strange stuff, but the case is documented here. + + The type which is cached. + + + + + Gets or sets the maximum size of the cache. This value can never go beneath 1. + + + The maximum size of the cache. + + + + + The cached value. + + + + + Gets a value indicating whether this cached value is free. + + + true if this cached value is free; otherwise, false. + + + + + Claims a cached value of type . + + A cached value of type . + + + + Releases a cached value. + + The cached value to release. + The cached value to release is null. + + + + Performs an implicit conversion from to . + + The cache to convert. + + The result of the conversion. + + + + + Releases this cached value. + + + + + Releases this cached value. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Provides utilities for using the namespace. + + This class is due for refactoring. Use at your own peril. + + + + + Gets a value indicating whether emitting is supported on the current platform. + + + true if the current platform can emit; otherwise, false. + + + + + Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the field to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the field to set a value to. + The instance describing the field to create a setter for. + A delegate which sets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The instance describing the field to create a setter for. + A delegate which sets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the instance to get a value from. + The type of the field to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the field to get a value from. + The of the instance to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the weakly typed value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The of the instance to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the instance to set a value on. + The type of the field to set a value to. + The instance describing the field to create a setter for. + A delegate which sets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the field to set a value to. + Type of the instance. + The instance describing the field to create a setter for. + + A delegate which sets the value of the given field. + + The fieldInfo parameter is null. + Field cannot be static. + + + + Creates a delegate which sets the weakly typed value of a field on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + Type of the instance. + The instance describing the field to create a setter for. + + A delegate which sets the value of the given field. + + The fieldInfo parameter is null. + Field cannot be static. + + + + Creates a delegate which gets the weakly typed value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The of the instance to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the weakly typed value of a property on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + Type of the instance. + The instance describing the property to create a setter for. + + A delegate which sets the value of the given field. + + The fieldInfo parameter is null. + Property cannot be static. + + + + Creates a delegate which sets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the property to set a value to. + The instance describing the property to create a setter for. + A delegate which sets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a delegate which gets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the property to get a value from. + The instance describing the property to create a getter for. + A delegate which gets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a delegate which sets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the instance to set a value on. + The type of the property to set a value to. + The instance describing the property to create a setter for. + A delegate which sets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a delegate which gets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the instance to get a value from. + The type of the property to get a value from. + The instance describing the property to create a getter for. + A delegate which gets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a fast delegate method which calls a given parameterless instance method and returns the result. + + The type of the class which the method is on. + The type which is returned by the given method info. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given parameterless static method. + + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given parameterless weakly typed instance method. + + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Not yet documented. + + + + + Creates a fast delegate method which calls a given weakly typed instance method with one argument and returns a value. + + The type of the result. + The type of the first argument. + The method info instance which is used. + + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + methodInfo + + Given method ' + methodInfo.Name + ' is static when it has to be an instance method. + or + Given method ' + methodInfo.Name + ' must return type + typeof(TResult) + . + or + Given method ' + methodInfo.Name + ' must have exactly one parameter. + or + The first parameter of the method ' + methodInfo.Name + ' must be of type + typeof(TArg1) + . + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Creates a fast delegate method which calls a given parameterless instance method on a reference type. + + The type of the class which the method is on. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given instance method with a given argument on a reference type. + + The type of the class which the method is on. + The type of the argument with which to call the method. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given parameterless instance method. + + The type of the class which the method is on. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given instance method with a given argument on a struct type. + + The type of the class which the method is on. + The type of the argument with which to call the method. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Compares types by reference before comparing them using the default type equality operator. + This can constitute a *significant* speedup when used as the comparer for dictionaries. + + + + + + This class encapsulates common combinations. + + + + + Search criteria encompassing all public and non-public members, including base members. + Note that you also need to specify either the Instance or Static flag. + + + + + Search criteria encompassing all public instance members, including base members. + + + + + Search criteria encompassing all non-public instance members, including base members. + + + + + Search criteria encompassing all public and non-public instance members, including base members. + + + + + Search criteria encompassing all public static members, including base members. + + + + + Search criteria encompassing all non-public static members, including base members. + + + + + Search criteria encompassing all public and non-public static members, including base members. + + + + + Search criteria encompassing all public instance members, excluding base members. + + + + + Search criteria encompassing all non-public instance members, excluding base members. + + + + + Search criteria encompassing all public and non-public instance members, excluding base members. + + + + + Search criteria encompassing all public static members, excluding base members. + + + + + Search criteria encompassing all non-public static members, excluding base members. + + + + + Search criteria encompassing all public and non-public static members, excluding base members. + + + + + Search criteria encompassing all members, including base and static members. + + + + + Search criteria encompassing all members (public and non-public, instance and static), including base members. + + + + + Provides notification callbacks for values that are cached using the class. + + + + + Called when the cached value is freed. + + + + + Called when the cached value is claimed. + + + + + Interface for immutable list. + + + + + Interface for generic immutable list. + + + + + Index accessor. + + + + + Immutable list wraps another list, and allows for reading the inner list, without the ability to change it. + + + + + Creates an immutable list around another list. + + + + + Number of items in the list. + + + + + Immutable list cannot be changed directly, so it's size is always fixed. + + + + + Immutable list are always readonly. + + + + + Returns true if the inner list is synchronized. + + + + + Gets the sync root object. + + + + + Index accessor. + + Index. + + + + Returns true if the item is contained in the list. + + The item's value. + + + + Copy the list to an array, + + Target array. + Index. + + + + Copy the list to an array, + + Target array. + Index. + + + + Gets an enumerator. + + + + + Get the index of a value. + + The item's value. + + + + Immutable list cannot be edited. + + Index. + + + + Immutable list cannot be edited. + + Index. + Item. + + + + Immutable list cannot be edited. + + Item. + + + + Immutable list cannot be edited. + + + + + Immutable list cannot be edited. + + Item. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Immutable list wraps another list, and allows for reading the inner list, without the ability to change it. + + + + + Creates an immutable list around another list. + + + + + Number of items in the list. + + + + + Immutable list are always readonly. + + + + + Index accessor. + + Index. + + + + Returns true if the item is contained in the list. + + + + + Copies the list to an array. + + + + + Gets an enumerator. + + + + + Gets the index of an item. + + + + + Provides a methods of representing imaginary fields which are unique to serialization. + + We aggregate the FieldInfo associated with this member and return a mangled form of the name. + + + + + + The default fake name separator string. + + + + + Initializes a new instance of the class. + + The field to alias. + The name prefix to use. + + + + Initializes a new instance of the class. + + The field to alias. + The name prefix to use. + The separator string to use. + + + + Gets the aliased field. + + + The aliased field. + + + + + Gets the module in which the type that declares the member represented by the current is defined. + + + + + Gets a value that identifies a metadata element. + + + + + Gets the name of the current member. + + + + + Gets the class that declares this member. + + + + + Gets the class object that was used to obtain this instance of MemberInfo. + + + + + Gets the type of the field. + + + The type of the field. + + + + + Gets a RuntimeFieldHandle, which is a handle to the internal metadata representation of a field. + + + + + Gets the attributes. + + + The attributes. + + + + + When overridden in a derived class, returns an array of all custom attributes applied to this member. + + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. + + + + + When overridden in a derived class, returns an array of custom attributes applied to this member and identified by . + + The type of attribute to search for. Only attributes that are assignable to this type are returned. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied. + + + + + When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. + + The type of custom attribute to search for. The search includes derived types. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + True if one or more instances of or any of its derived types is applied to this member; otherwise, false. + + + + + Gets the value of the field. + + The object instance to get the value from. + The value of the field. + + + + When overridden in a derived class, sets the value of the field supported by the given object. + + The object whose field value will be set. + The value to assign to the field. + A field of Binder that specifies the type of binding that is desired (for example, Binder.CreateInstance or Binder.ExactBinding). + A set of properties that enables the binding, coercion of argument types, and invocation of members through reflection. If is null, then Binder.DefaultBinding is used. + The software preferences of a particular culture. + + + + Provides a methods of representing aliased methods. + + In this case, what we're representing is a method on a parent class with the same name. + + We aggregate the MethodInfo associated with this member and return a mangled form of the name. + The name that we return is "parentname+methodName". + + + + + + The default fake name separator string. + + + + + Initializes a new instance of the class. + + The method to alias. + The name prefix to use. + + + + Initializes a new instance of the class. + + The method to alias. + The name prefix to use. + The separator string to use. + + + + Gets the aliased method. + + + The aliased method. + + + + + Gets the custom attributes for the return type. + + + + + Gets a handle to the internal metadata representation of a method. + + + + + Gets the attributes associated with this method. + + + + + Gets the class that declares this member. + + + + + Gets the name of the current member. + + + + + Gets the class object that was used to obtain this instance of MemberInfo. + + + + + When overridden in a derived class, returns the MethodInfo object for the method on the direct or indirect base class in which the method represented by this instance was first declared. + + + A MethodInfo object for the first implementation of this method. + + + + + When overridden in a derived class, returns an array of all custom attributes applied to this member. + + true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. + + + + + When overridden in a derived class, returns an array of custom attributes applied to this member and identified by . + + The type of attribute to search for. Only attributes that are assignable to this type are returned. + true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied. + + + + + When overridden in a derived class, returns the flags. + + + The MethodImplAttributes flags. + + + + + When overridden in a derived class, gets the parameters of the specified method or constructor. + + + An array of type ParameterInfo containing information that matches the signature of the method (or constructor) reflected by this MethodBase instance. + + + + + When overridden in a derived class, invokes the reflected method or constructor with the given parameters. + + The object on which to invoke the method or constructor. If a method is static, this argument is ignored. If a constructor is static, this argument must be null or an instance of the class that defines the constructor. + A bitmask that is a combination of 0 or more bit flags from . If is null, this parameter is assigned the value ; thus, whatever you pass in is ignored. + An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects via reflection. If is null, the default binder is used. + An argument list for the invoked method or constructor. This is an array of objects with the same number, order, and type as the parameters of the method or constructor to be invoked. If there are no parameters, this should be null.If the method or constructor represented by this instance takes a ByRef parameter, there is no special attribute required for that parameter in order to invoke the method or constructor using this function. Any object in this array that is not explicitly initialized with a value will contain the default value for that object type. For reference-type elements, this value is null. For value-type elements, this value is 0, 0.0, or false, depending on the specific element type. + An instance of CultureInfo used to govern the coercion of types. If this is null, the CultureInfo for the current thread is used. (This is necessary to convert a String that represents 1000 to a Double value, for example, since 1000 is represented differently by different cultures.) + + An Object containing the return value of the invoked method, or null in the case of a constructor, or null if the method's return type is void. Before calling the method or constructor, Invoke checks to see if the user has access permission and verifies that the parameters are valid.CautionElements of the array that represent parameters declared with the ref or out keyword may also be modified. + + + + + When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. + + The type of custom attribute to search for. The search includes derived types. + true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + true if one or more instances of or any of its derived types is applied to this member; otherwise, false. + + + + + Provides a methods of representing imaginary properties which are unique to serialization. + + We aggregate the PropertyInfo associated with this member and return a mangled form of the name. + + + + + + The default fake name separator string. + + + + + Initializes a new instance of the class. + + The property to alias. + The name prefix to use. + + + + Initializes a new instance of the class. + + The property to alias. + The name prefix to use. + The separator string to use. + + + + The backing PropertyInfo that is being aliased. + + + + + Gets the module in which the type that declares the member represented by the current is defined. + + + + + Gets a value that identifies a metadata element. + + + + + Gets the name of the current member. + + + + + Gets the class that declares this member. + + + + + Gets the class object that was used to obtain this instance of MemberInfo. + + + + + Gets the type of the property. + + + The type of the property. + + + + + Gets the attributes. + + + The attributes. + + + + + Gets a value indicating whether this instance can read. + + + true if this instance can read; otherwise, false. + + + + + Gets a value indicating whether this instance can write. + + + true if this instance can write; otherwise, false. + + + + + When overridden in a derived class, returns an array of all custom attributes applied to this member. + + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. + + + + + When overridden in a derived class, returns an array of custom attributes applied to this member and identified by . + + The type of attribute to search for. Only attributes that are assignable to this type are returned. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied. + + + + + When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. + + The type of custom attribute to search for. The search includes derived types. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + True if one or more instances of or any of its derived types is applied to this member; otherwise, false. + + + + + Returns an array whose elements reflect the public and, if specified, non-public get, set, and other accessors of the property reflected by the current instance. + + Indicates whether non-public methods should be returned in the MethodInfo array. true if non-public methods are to be included; otherwise, false. + + An array of objects whose elements reflect the get, set, and other accessors of the property reflected by the current instance. If is true, this array contains public and non-public get, set, and other accessors. If is false, this array contains only public get, set, and other accessors. If no accessors with the specified visibility are found, this method returns an array with zero (0) elements. + + + + + When overridden in a derived class, returns the public or non-public get accessor for this property. + + Indicates whether a non-public get accessor should be returned. true if a non-public accessor is to be returned; otherwise, false. + + A MethodInfo object representing the get accessor for this property, if is true. Returns null if is false and the get accessor is non-public, or if is true but no get accessors exist. + + + + + Gets the index parameters of the property. + + The index parameters of the property. + + + + When overridden in a derived class, returns the set accessor for this property. + + Indicates whether the accessor should be returned if it is non-public. true if a non-public accessor is to be returned; otherwise, false. + + Value Condition A object representing the Set method for this property. The set accessor is public.-or- is true and the set accessor is non-public. null is true, but the property is read-only.-or- is false and the set accessor is non-public.-or- There is no set accessor. + + + + + Gets the value of the property on the given instance. + + The object to invoke the getter on. + The to invoke with. + The binder to use. + The indices to use. + The culture to use. + The value of the property on the given instance. + + + + Sets the value of the property on the given instance. + + The object to set the value on. + The value to set. + The to invoke with. + The binder to use. + The indices to use. + The culture to use. + + + + Compares objects by reference only, ignoring equality operators completely. This is used by the property tree reference dictionaries to keep track of references. + + + + + A default, cached instance of this generic variant of the reference equality comparer. + + + + + Returns true if the object references are equal. + + + + + Returns the result of the object's own GetHashCode method. + + + + + Utility class indicating current Unity version. + + + + + Tests current Unity version is equal or greater. + + Minimum major version. + Minimum minor version. + true if the current Unity version is greater. Otherwise false. + + + + The current Unity version major. + + + + + The current Unity version minor. + + + + + Contains utilities for performing common unsafe operations. + + + + + Blindly creates an array of structs from an array of bytes via direct memory copy/blit. + + + + + Blindly creates an array of structs from an array of bytes via direct memory copy/blit. + + + + + Blindly copies an array of structs into an array of bytes via direct memory copy/blit. + + + + + Blindly copies an array of structs into an array of bytes via direct memory copy/blit. + + + + + Creates a new string from the contents of a given byte buffer. + + + + + Writes the contents of a string into a given byte buffer. + + + + + Blindly mem-copies a given number of bytes from the memory location of one object to another. WARNING: This method is ridiculously dangerous. Only use if you know what you're doing. + + + + + A Unity Behaviour which is serialized by the Sirenix serialization system. + + + + + Invoked after deserialization has taken place. + + + + + Invoked before serialization has taken place. + + + + + A Unity Component which is serialized by the Sirenix serialization system. + + + + + Invoked after deserialization has taken place. + + + + + Invoked before serialization has taken place. + + + + + A Unity MonoBehaviour which is serialized by the Sirenix serialization system. + + + + + Invoked after deserialization has taken place. + + + + + Invoked before serialization has taken place. + + + + + A Unity ScriptableObject which is serialized by the Sirenix serialization system. + + + + + Invoked after deserialization has taken place. + + + + + Invoked before serialization has taken place. + + + + + A Unity StateMachineBehaviour which is serialized by the Sirenix serialization system. + + + + + Invoked after deserialization has taken place. + + + + + Invoked before serialization has taken place. + + + + + A Unity ScriptableObject which is serialized by the Sirenix serialization system. + + + + + Invoked after deserialization has taken place. + + + + + Invoked before serialization has taken place. + + + + diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml.meta new file mode 100644 index 0000000..dc046e8 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5f3147f7af4c49739579b966c458096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll new file mode 100644 index 0000000..66b5ef8 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll.meta new file mode 100644 index 0000000..66668bb --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 5c65184932ff4fd48a343e2360256baf +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml new file mode 100644 index 0000000..d2ec54d --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml @@ -0,0 +1,9764 @@ + + + + Sirenix.Utilities.Editor + + + + + Icon for using in editor GUI. + + + + + Gets the raw input icon texture. + + + + + Gets the icon's highlighted texture. + + + + + Gets the icon's active texture. + + + + + Gets the icon's inactive texture. + + + + + Gets a GUIContent object with the active texture. + + + + + Gets a GUIContent object with the inactive texture. + + + + + Gets a GUIContent object with the highlighted texture. + + + + + Draws the icon in a square rect, with a custom shader that makes the icon look better when down-scaled. + This also handles mouseover effects, and linier color spacing. + + + + + Draws the icon in a square rect, with a custom shader that makes the icon look better when down-scaled. + This also handles mouseover effects, and linier color spacing. + + + + + Draws the icon in a square rect, with a custom shader that makes the icon look better when down-scaled. + This also handles mouseover effects, and linier color spacing. + + + + + Collection of EditorIcons for use in GUI drawing. + + + + + Gets an icon of an airplane symbol. + + + + + Gets an icon of an alert circle symbol. + + + + + Gets an icon of an alert triangle symbol. + + + + + Gets an icon of an arrow down symbol. + + + + + Gets an icon of an arrow left symbol. + + + + + Gets an icon of an arrow right symbol. + + + + + Gets an icon of an arrow up symbol. + + + + + Gets an icon of a bell symbol. + + + + + Gets an icon of a car symbol. + + + + + Gets an icon of a char1 symbol. + + + + + Gets an icon of a char2 symbol. + + + + + Gets an icon of a char3 symbol. + + + + + Gets an icon of a char graph symbol. + + + + + Gets an icon of a checkmark symbol. + + + + + Gets an icon of a clock symbol. + + + + + Gets an icon of a clouds symbol. + + + + + Gets an icon of a clouds rainy symbol. + + + + + Gets an icon of a clouds rainy sunny symbol. + + + + + Gets an icon of a clouds rainy thunder symbol. + + + + + Gets an icon of a clouds thunder symbol. + + + + + Gets an icon of a crosshair symbol. + + + + + Gets an icon of a cut symbol. + + + + + Gets an icon of a day calendar symbol. + + + + + Gets an icon of a download symbol. + + + + + Gets an icon of an eject symbol. + + + + + Gets an icon of an eye dropper symbol. + + + + + Gets an icon of a female symbol. + + + + + Gets an icon of a file symbol. + + + + + Gets an icon of a file cabinet symbol. + + + + + Gets an icon of a finnish banner symbol. + + + + + Gets an icon of a flag symbol. + + + + + Gets an icon of a flag finnish symbol. + + + + + Gets an icon of a folder symbol. + + + + + Gets an icon of a folder back symbol. + + + + + Gets an icon of a gKey symbol. + + + + + Gets an icon of a globe symbol. + + + + + Gets an icon of a grid blocks symbol. + + + + + Gets an icon of a grid image text symbol. + + + + + Gets an icon of a grid image text list symbol. + + + + + Gets an icon of a grid layout symbol. + + + + + Gets an icon of a hamburger menu symbol. + + + + + Gets an icon of a house symbol. + + + + + Gets an icon of an image symbol. + + + + + Gets an icon of an image collection symbol. + + + + + Gets an icon of an info symbol. + + + + + Gets an icon of a letter symbol. + + + + + Gets an icon of a light bulb symbol. + + + + + Gets an icon of a link symbol. + + + + + Gets an icon of a list symbol. + + + + + Gets an icon of a loading bar symbol. + + + + + Gets an icon of a lock locked symbol. + + + + + Gets an icon of a lock unlocked symbol. + + + + + Gets an icon of a lock unlocked symbol. Obsolete; use the correctly spelled LockUnlocked instead. + + + + + Gets an icon of a magnifying glass symbol. + + + + + Gets an icon of a male symbol. + + + + + Gets an icon of a marker symbol. + + + + + Gets an icon of a maximize symbol. + + + + + Gets an icon of a microphone symbol. + + + + + Gets an icon of a minimize symbol. + + + + + Gets an icon of a minus symbol. + + + + + Gets an icon of a mobile phone symbol. + + + + + Gets an icon of a money symbol. + + + + + Gets an icon of a move symbol. + + + + + Gets an icon of a multi user symbol. + + + + + Gets an icon of a next symbol. + + + + + Gets an icon of a pacman ghost symbol. + + + + + Gets an icon of a paperclip symbol. + + + + + Gets an icon of a pause symbol. + + + + + Gets an icon of a pen symbol. + + + + + Gets an icon of a pen add symbol. + + + + + Gets an icon of a pen minus symbol. + + + + + Gets an icon of a play symbol. + + + + + Gets an icon of a plus symbol. + + + + + Gets an icon of a podium symbol. + + + + + Gets an icon of a previous symbol. + + + + + Gets an icon of a reception signal symbol. + + + + + Gets an icon of a redo symbol. + + + + + Gets an icon of a refresh symbol. + + + + + Gets an icon of a rotate symbol. + + + + + Gets an icon of a ruler symbol. + + + + + Gets an icon of a ruler rect symbol. + + + + + Gets an icon of a settings cog symbol. + + + + + Gets an icon of a shopping basket symbol. + + + + + Gets an icon of a shopping cart symbol. + + + + + Gets an icon of a single user symbol. + + + + + Gets an icon of a smart phone symbol. + + + + + Gets an icon of a sound symbol. + + + + + Gets an icon of a speech bubble round symbol. + + + + + Gets an icon of a speech bubble square symbol. + + + + + Gets an icon of a speech bubbles round symbol. + + + + + Gets an icon of a speech bubbles square symbol. + + + + + Gets an icon of a star pointer symbol. + + + + + Gets an icon of a stop symbol. + + + + + Gets an icon of a stretch symbol. + + + + + Gets an icon of a table symbol. + + + + + Gets an icon of a tag symbol. + + + + + Gets an icon of a test tube symbol. + + + + + Gets an icon of a timer symbol. + + + + + Gets an icon of a traffic stop light symbol. + + + + + Gets an icon of a transparent symbol. + + + + + Gets an icon of a tree symbol. + + + + + Gets an icon of a triangle down symbol. + + + + + Gets an icon of a triangle left symbol. + + + + + Gets an icon of a triangle right symbol. + + + + + Gets an icon of a triangle up symbol. + + + + + Gets an icon of an undo symbol. + + + + + Gets an icon of an upload symbol. + + + + + Gets an icon of a wifi signal symbol. + + + + + Gets an icon of an x symbol. + + + + + Gets a texture of a test inconclusive symbol. + + + + + Gets a texture of a test failed symbol. + + + + + Gets a texture of a test normal symbol. + + + + + Gets a texture of a test passed symbol. + + + + + Gets a texture of a console info icon symbol. + + + + + Gets a texture of a console warnicon symbol. + + + + + Gets a texture of a console error icon symbol. + + + + + Gets a texture of an odin inspector logo symbol. + + + + + Gets a texture of a scene asset icon symbol. + + + + + Gets an icon representing a GameObject. + + + + + Gets an icon of a unity info icon. + + + + + Gets an icon of a unity warning icon. + + + + + Gets an icon of a unity error icon. + + + + + Gets an icon of a unity folder. + + + + + Gets the dark mode version of the ObjectFieldButton texture. + + + + + Gets the light mode version of the ObjectFieldButton texture. + + + + + Gets the ObjectFieldButton texture based on the current active theme. + + + + + Lazy loading Editor Icon. + + + + + Loads an EditorIcon from the spritesheet. + + + + + Gets the icon's highlight texture. + + + + + Gets the icon's active texture. + + + + + Gets the icon's inactive texture. + + + + + Not yet documented. + + + + + Gets a texture of an odin logo symbol. + + + + + Gets a texture of an odin inspector logo symbol. + + + + + Gets a texture of an odin serializer logo symbol. + + + + + Gets a texture of an odin validator logo symbol. + + + + + Gets a texture of an odin validator black symbol. + + + + + Utility for parsing and emitting expression delegates. + + + + + The time that the expression cache waits to clear expressions + since the last time they have been used. + + + + Parses an expression and tries to emit a delegate method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted delegate if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and tries to emit a delegate method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + The parameters of the expression delegate. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted delegate if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and tries to emit a delegate method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + The parameters of the expression delegate. + The names of the expression's parameters, for use with the named parameter syntax. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted delegate if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and tries to emit a delegate method. + The expression to parse. + The emit context. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted delegate if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and tries to emit a delegate of the specified type. + The expression to parse. + The emit context. + The type of the delegate to emit. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted delegate if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionFunc method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionFunc if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + Parses an expression and emits an ExpressionAction method. + The expression to parse. + Indicates if the expression should be static instead of instanced. + The context type for the execution of the expression. + Output for any errors that may occur. + If true then error message will be formatted with color tags. Otherwise, the error message will be formatted with text only. + Returns the emitted ExpressionAction if the expression is compiled successfully. Otherwise, null. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + This class is due to undergo refactoring. Use the new DragAndDropUtilities instead. + + + + + + This class is due to undergo refactoring. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Drag and drop utilities for both Unity and non-unity objects. + + + + + Gets the position from where the last drag started from in screen space. + + + + + Gets the delta position between the currrent mouse position and where the last drag originated from. + + + + + Gets the hovering accepted drop zone ID. + + + + + Gets a value indicating whether an instance is currently being dragged. + + + + + Gets the currently dragging identifier. + + + + + Gets the current hovering drop zone identifier. + + + + + Gets a more percistent id for drag and drop. + + + + + Draws a objectpicker button in the given rect. This one is designed to look good on top of DrawDropZone(). + + + + + Draws a objectpicker butter, in the given rect. This one is designed to look good on top of DrawDropZone(). + + + + + Draws the graphics for a DropZone. + + + + + Draws the graphics for a DropZone. + + + + + A draggable zone for both Unity and non-unity objects. + + + + + A draggable zone for both Unity and non-unity objects. + + + + + A drop zone area for both Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + A drop zone area for bot Unity and non-unity objects. + + + + + Disalloweds the drop area for next drag zone. Follow this function call by a DragZone. + + + + + A draggable zone for both Unity and non-unity objects. + + + + + A draggable zone for both Unity and non-unity objects. + + + + + A draggable zone for both Unity and non-unity objects. + + + + + A draggable zone for both Unity and non-unity objects. + + + + + This class is due to undergo refactoring. + + + + + This class is due to undergo refactoring. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + This class is due to undergo refactoring. + + + + + This class is due to undergo refactoring. + + + + + Collection of extension methods for . + + + + + Returns true when the users mouse is hovering over the specified + + The . + The to check. + true if the mouse is over the specified otherwise false. + + + + Returns true when the user presses the specified mouse button. + + The . + The mouse button the user has to press. + If true then the method will call on the event. + true on mouse down events with the specified button. Otherwise false. + + + + Returns true when the user clicks a rect with the mouse. + + The event. + The rect the user can click on. + The button the user has to press. + If true then the method will call on the event. + true on mouse down events with the specified button. Otherwise false. + + + + Returns true when the user releases the specified mouse button. + + The . + The mouse button the user has to release. + If true then the method will call on the event. + true on mouse up events, with the specified button. Otherwise false. + + + + Returns true when the user releases the specified mouse button over the specified rect. + + The . + The rect the user has to release the mouse button over. + The mouse button the user has to release. + If true then the method will call on the event. + true on mouse up events, with the specified button and over the specified rect. Otherwise false. + + + + Returns true when the user left clicks a rect. + + The . + The rect the user can click. + If true then the method will call on the event. + true on left click events, on the specified rect. Otherwise false. + + + + Returns true when the user right clicks a rect. + + The . + The rect the user can right click. + If true then the method will call on the event. + true on context click events, on the specified rect. Otherwise false. + + + + Returns true when the user presses the specified key. + + The . + The key the user has to press. + If true then the method will call on the event. + true on key down events with the specified key code. Otherwise false. + + + + Returns true when the user releases the specified key. + + The . + The key the user has to release. + If true then the method will call on the event. + true on key up events with the specified key code. Otherwise false. + + + + Returns true whene the user moves or drags the mouse. + + The . + If true then the method will call on the event. + true on mouse move or mouse drag events. Otherwise false. + + + + Returns true when the user hovers the mouse over the specified rect. + + The . + The rect the user can hover. + true on any event where the mouse is hovering the specified rect. Otherwise false. + + + + Returns true on repaint events. + + The . + true on repaint events. Otherwise false. + + + + Returns true on layout events. + + The . + true on layout events. Otherwise false. + + + + Returns true on the specified event. + + The . + The required event type. + true on the specified event. Otherwise false. + + + + Collection of extension methods for . + + + + + Removes all menu items with a given name from the GenericMenu. + + The GenericMenu to remove items from. + The name of the items to remove. + True if any items were removed, otherwise false. + + + + Replaces the first found menu item with a given name with a new menu item, or if no such element is found, adds a new one. + + The GenericMenu to replace items in. + The name of the items to remove. + The func to replace or add. + The on value to set the new menu item with. + True if an item was replaced, otherwise false. + + + + Replaces the first found menu item with a given name with a new menu item, or if no such element is found, adds a new one. + + The GenericMenu to replace items in. + The name of the items to remove. + The on value to set the new menu item with. + The func to replace or add. + The user data. + + True if an item was replaced, otherwise false. + + + + + Emitted wrapper for the internal "UnityEngine.GUIClip" class. + + + + + Not yet documented. + + + + + Gets the top most clipped rect. + + + + + Gets the visible rect. + + + + + Gets the top rect. + + + + + Unclips the specified position. + + The position. + + + + + Unclips the specified rect. + + The rect. + + + + + This class is due to undergo refactoring. + + + + + The value. + + + + + Performs an implicit conversion from to . + + + + + Various helper function for GUI. + + + + + Gets the bold default font. + + + + + An alternative to GUI.FocusControl(null), which does not take focus away from the current GUI.Window. + + + + + Whether the inspector is currently in the progress of drawing a dictionary key. + + + + + Hides the following draw calls. Remember to call when done. + + + + + Unhides the following draw calls after having called . + + + + + Determines whether the specified EditorWindow is docked. + + The editor window. + true if the editor window is docked. Otherwise false. + + + + Not yet documented. + + + + + Opens a new inspector window for the specified object. + + The unity object. + unityObj + + + + Gets or sets a value indicating whether labels are currently bold. + + + true if this instance is bold label; otherwise, false. + + + + + Gets the size of the current window border. + + + The size of the current window border. + + + + + Gets the editor screen point offset. + + + The editor screen point offset. + + + + + Gets the current editor gui context width. Only set these if you know what it does. + Setting this has been removed. Use PushContextWidth and PopContextWidth instead. + + + + + Unity EditorGUIUtility.labelWidth only works reliablly in Repaint events. + BetterLabelWidth does a better job at giving you the correct LabelWidth in non-repaint events. + + + + + Odin will set this for you whenever an Odin property tree is drawn. + But if you're using BetterLabelWidth and BetterContextWidth without Odin, then + you need to set BetterContextWidth in the beginning of each GUIEvent. + + + + + Gets the current indent amount. + + + The current indent amount. + + + + + Gets the mouse screen position. + + + The mouse screen position. + + + + + Gets the current editor window. + + + The current editor window. + + + + + Gets a value indicating whether the current editor window is focused. + + + true if the current window has focus. Otherwise, false. + + + + + Gets the ID of the current editor window. + + + The ID of the current editor window. + + + + + Gets a value indicating whether a repaint has been requested. + + + true if repaint has been requested. Otherwise false. + + + + + Gets or sets the actual EditorGUIUtility.LabelWidth, regardless of the current hierarchy mode or context width. + + + + + Requests a repaint. + + + + + Calls , if the is not NULL. + + + + + Requests a repaint. + + + + + Begins the layout measuring. Remember to end with . + + + + + Begins the layout measuring. Remember to end with . + + + + + Ends the layout measuring started by + + The measured rect. + + + + Ends the layout measuring started by + + The measured rect. + + + + Gets the current layout rect. + + The current layout rect. + + + + Gets the current layout rect. + + The current layout rect. + + + + Gets the playmode color tint. + + The playmode color tint. + + + + Pushes a context width to the context width stack. + Remember to pop the value again with . + + The width to push. + + + + Pops a value pushed by . + + + + + Pushes a color to the GUI color stack. Remember to pop the color with . + + The color to push the GUI color.. + if set to true blend with alpha. + + + + Takes a screenshot of the GUI within the specified rect. + + The rect. + The screenshot as a render texture. + + + + Pops the GUI color pushed by . + + + + + Pushes a state to the GUI enabled stack. Remember to pop the state with . + + If set to true GUI will be enabled. Otherwise GUI will be disabled. + + + + Pops the GUI enabled pushed by + + + + + Pushes a state to the IsDrawingDictionaryKey stack. Remember to pop the state with . + + + + + Pops the state pushed by + + + + + Pushes the hierarchy mode to the stack. Remember to pop the state with . + + The hierachy mode state to push. + Changing hierachy mode also changes how label-widths are calcualted. By default, we try to keep the current label width. + + + + Pops the hierarchy mode pushed by . + + + + + Pushes bold label state to the stack. Remember to pop with . + + Value indicating if labels should be bold or not. + + + + Pops the bold label state pushed by . + + + + + Pushes the indent level to the stack. Remember to pop with . + + The indent level to push. + + + + Pops the indent level pushed by . + + + + + Pushes the content color to the stack. Remember to pop with . + + The content color to push.. + If set to true blend with alpha. + + + + Pops the content color pushed by . + + + + + Pushes the label color to the stack. Remember to pop with . + + The label color to push. + + + + Pops the label color pushed by . + + + + + Pushes the GUI position offset to the stack. Remember to pop with . + + The GUI offset. + + + + Pops the GUI position offset pushed by . + + + + + Pushes a GUI matrix to the stack. Remember to pop with . + + The GUI matrix to push. + + + + Pops the GUI matrix pushed by . + + + + + Ignores input on following GUI calls. Remember to end with . + + + + + Ends the ignore input started by . + + + + + Pushes the event type to the stack. Remember to pop with . + + The type of event to push. + + + + Pops the event type pushed by . + + + + + Pushes the width to the editor GUI label width to the stack. Remmeber to Pop with . + + The editor GUI label width to push. + + + + Pops editor gui label widths pushed by . + + + + + Pushes the value to the responsive vector component fields stack. Remeber to pop with . + + + + + Pops responsive vector component fields value pushed by . + + + + + Pushes the value to the fade group duration stack. Remeber to pop with . + + + + + Pops fade group duration value pushed by . + + + + + Pushes the value to the tab page slide animation duration stack. Remember to pop with . + + + + + + Pops tab page slide animation duration value pushed by . + + + + + Clears the repaint request. + + + + + Gets a temporary value context. + + The type of the config value. + The key for the config. + The name of the config. + GUIConfig for the specified key and name. + + + + Gets a temporary value context. + + The type of the value. + The key for the config. + The ID for the config. + GUIConfig for the specified key and ID. + + + + Gets a temporary value context. + + The type of the value. + The primary key. + The secondary key. + GUIConfig for the specified primary and secondary key. + + + + Gets a temporary value context. + + The type of the value. + The key for the context. + GUIConfig for the specified key. + + + + Gets a temporary nullable value context. + + Key for context. + Name for the context. + + + + Gets a temporary nullable value context. + + Key for context. + Id of the context. + + + + Gets a temporary nullable value context. + + Primary key for the context. + Secondary key for the context. + + + + Gets a temporary nullable value context. + + Key for the context. + + + + Gets a temporary context. + + Key for the context. + Name for the context. + Default value of the context. + + + + Gets a temporary context. + + Key for the context. + Id for the context. + Default value of the context. + + + + Gets a temporary context. + + Primary key for the context. + Secondary key for the context. + Default value of the context. + + + + Gets a temporary context. + + Key for the context. + Default value of the context. + + + + Gets a temporary GUIContent with the specified text. + + The text for the GUIContent. + Temporary GUIContent instance. + + + + Gets a temporary GUIContent with the specified text and tooltip. + + The text for the GUIContent. + The tooltip for the GUIContent. + Temporary GUIContent instance. + + + + Gets a temporary GUIContent with the specified image and tooltip. + + The image for the GUIContent. + The tooltip for the GUIContent. + Temporary GUIContent instance. + + + + Gets a temporary GUIContent with the specified text, image and tooltip. + + The text for the GUIContent. + The image for the GUIContent. + The tooltip for the GUIContent. + Temporary GUIContent instance. + + + + Indents the rect by the current indent amount. + + The rect to indent. + Indented rect. + + + + Indents the rect by the current indent amount. + + The rect to indent. + + + + Repaints the EditorWindow if a repaint has been requested. + + The window to repaint. + + + + Repaints the editor if a repaint has been requested. If the currently rendering window is not an InspectorWindow, Repaint() will be called on the current window as well. + + The editor to repaint. + + + + Gets the best thumbnail icon given the provided arguments provided. + + + + + + + + + Gets a preview texture for the provided object. + + + + + + + Measures the size of a given , if it would be presented with this . + + The to present the as. + The to measure. + A consisting of the width () & height (), as the size of the in GUI-space. + + + + Measures the height of a given , if it would be presented with this . + + The to present the as. + The to measure. + The width of the area the is being presented in. + The height of the . + + + + Measures the width of a given , if it would be presented with this . + + The to present the as. + The to measure. + The width of the . + + + + Measures the width of a given , if it would be presented with this . + + The to present the as. + The to measure. + The width of the . + + + + Measures the min- & max width of a given , if it would be presented with this . + + The to present the as. + The to measure. + The minimum width of the . + The maximum width of the . + The min- & max width of the , as out parameters. + + + + A helper class to control paging of n number of elements in various situations. + + + + + Disables the paging, and show all elements. + + + + + Initializes a new instance of the class. + + + + + Updates all values based on and . + + + Call update right before using and in your for loop. + + The total number of elements to apply paging for. + + + + Gets or sets a value indicating whether this instance is enabled. + + + true if this instance is enabled; otherwise, false. + + + + + Gets a value indicating whether this instance is on the frist page. + + + true if this instance is on frist page; otherwise, false. + + + + + Gets a value indicating whether this instance is on the last page. + + + true if this instance is on last page; otherwise, false. + + + + + Gets or sets the number of items per page. + + + The number of items pr page. + + + + + Gets or sets the current page. + + + The current page. + + + + + Gets the start index. + + + The start index. + + + + + Gets the end index. + + + The end index. + + + + + Gets or sets the page count. + + + The page count. + + + + + Gets the total number of elements. + Use to change the value. + + + + + Draws right-aligned toolbar paging buttons. + + + + + The GUITabGroup is a utility class to draw animated tab groups. + + + + var tabGroup = SirenixEditorGUI.CreateAnimatedTabGroup(someKey); + // Register your tabs before starting BeginGroup. + var tab1 = tabGroup.RegisterTab("tab 1"); + var tab2 = tabGroup.RegisterTab("tab 2"); + + tabGroup.BeginGroup(drawToolbar: true); + { + if (tab1.BeginPage()) + { + // Draw GUI for the first tab page; + } + tab1.EndPage(); + + if (tab2.BeginPage()) + { + // Draw GUI for the second tab page; + } + tab2.EndPage(); + } + tabGroup.EndGroup(); + + // Control the animation speed. + tabGroup.AnimationSpeed = 0.2f; + + // If true, the tab group will have the height equal to the biggest page. Otherwise the tab group will animate in height as well when changing page. + tabGroup.FixedHeight = true; + + // You can change page by calling: + tabGroup.GoToNextPage(); + tabGroup.GoToPreviousPage(); + + + + + + + The animation speed + + + + + Gets the outer rect of the entire tab group. + + + + + The inner rect of the current tab page. + + + + + If true, the tab group will have the height equal to the biggest page. Otherwise the tab group will animate in height as well when changing page. + + + Sets the current page. + + The page to switch to. + + + + Gets the current page. + + + + + Gets the t. + + + + + The height of the tab buttons. + + + + + Registers the tab. + + + + + Begins the group. + + if set to true a tool-bar for changing pages is drawn. + The style. + + + + Ends the group. + + + + + Goes to page. + + + + + Goes to next page. + + + + + Goes to previous page. + + + + + A Utility class for creating tables in Unity's editor GUI. + A table can either be created from scratch using new GUITable(xCount,yCount), or created using one of the static GUITable.Create overloads. + See the online documentation, for examples and more information. + + + Creating a matrix table for a two-dimentional array. + + private GUITable table; + + private void Init() + { + bool[,] boolArr = new bool[20,20]; + + this.table = GUITable.Create( + twoDimArray: boolArr, + drawElement: (rect, x, y) => boolArr[x, y] = EditorGUI.Toggle(rect, boolArr[x, y]), + horizontalLabel: "Optional Horizontal Label", // horizontalLabel is optional and can be null. + columnLabels: (rect, x) => GUI.Label(rect, x.ToString()), // columnLabels is optional and can be null. + verticalLabel: "Optional Vertical Label", // verticalLabel is optional and can be null. + rowLabels: (rect, x) => GUI.Label(rect, x.ToString()) // rowLabels is optional and can be null. + ); + } + + private void OnGUI() + { + this.table.DrawTable(); + } + + + + Creating a table for a list. + + private GUITable table; + + private void Init() + { + Listt<SomeClasst> someList = new List<SomeClass>() { new SomeClass(), new SomeClass(), new SomeClass() }; + + this.table = GUITable.Create(someList, "Optional Title", + new GUITableColumn() + { + ColumnTitle = "A", + OnGUI = (rect, i) => someList[i].A = EditorGUI.TextField(rect, someList[i].A), + Width = 200, + MinWidth = 100, + }, + new GUITableColumn() + { + ColumnTitle = "B", + OnGUI = (rect, i) => someList[i].B = EditorGUI.IntField(rect, someList[i].B), + Resizable = false, + }, + new GUITableColumn() + { + ColumnTitle = "C", + OnGUI = (rect, i) => someList[i].C = EditorGUI.IntField(rect, someList[i].C), + SpanColumnTitle = true, + } + ); + } + + private void OnGUI() + { + this.table.DrawTable(); + } + + private class SomeClass + { + public string A; + public int B; + public int C; + public int D; + } + + + + Styling a cell. + Each has two events, OnGUI and OnGUIStyle. OnGUIStyle is called right before OnGUI, but only in repaint events. + + guiTable[x,y].GUIStyle += rect => EditorGUI.DrawRect(rect, Color.red); + + + + Row and column span. + A cell will span and cover all neighbour cells that are null. + + // Span horizontally: + guiTable[x - 2,y] = null; + guiTable[x - 1,y] = null; + guiTable[x,y].SpanX = true; + guiTable[x + 1,y] = null; + + // Span vertically: + guiTable[x,y - 2] = null; + guiTable[x,y - 1] = null; + guiTable[x,y].SpanY = true; + guiTable[x,y + 1] = null; + + + + + + + + The row count. + + + + + The column count. + + + + + The Table Rect. + + + + + Whether to respect the current GUI indent level. + + + + + Gets or sets a from the . + + + + + Initializes a new instance of the class. + + + + + Draws the table. + + + + + Recaluclates cell and column sizes in the next frame. + + + + + Recalculates the layout for the entire table. + This method gets called whenever the table is initialized, resized or adjusted. If you are manipulating + the width or height of individual table cells, remember to call this method when you're done. + + + + + Creates a table. + + + + + Creates a table. + + + + + Creates a table. + + + + + Creates a table. + + + + + A cell of a + + + + + The minimum width. + + + + + The width of the cell. Default is width is 0. + The width the column is determained by the widest cell in the column. + Width = 0 = auto. + + + + + The height of the cell. Default is height is 22. + The height the column is determained by the tallest cell in the row. + + + + + If true, the cell will expand vertically, covering all neighbour null cells. + + + + + If true, the cell will expand horizontally, covering all neighbour null cells. + + + + + The table column index. + + + + + The table row index. + + + + + The GUI style + + + + + Gets the rect. + + + + + GUITableColumns used creating a table list using GUITable.Create(). + + + + + + + Draws a cell at the given row index for this column. + + + + + The column title text. If there are is columns with a title, there we not be rendered an additional table row for column titles. + + + + + The minimum with of the column. + + + + + The width of the Column. + 0 = auto, and is also the default. + + + + + If true, the column becomes resiziable. + Default is true. + + + + + If true, the column title cell, will span horizontally to neighbour columns, which column titles are null. + Default is false. + + + + + Whether to draw a draw scroll view. + + + + + The number of pixels before a scroll view appears. + + + + + The maximum scroll view height. + + + + + The scroll position + + + + + The cell style + + + + + Gets the rect containing all rows. + + + + + Gets the first visible row index. + + + + + Gets the last visible row index. + + + + + Gets the outer rect. The height of this <= .height. + + + + + Gets the row rect. + + + + + Begins the table. + + + + + Begins the column. + + + + + Begins the cell. + + + + + Ends the cell. + + + + + Ends the column. + + + + + Ends the table. + + + + + A tab page created by . + + + + + + Begins the page. + + + + + Ends the page. + + + + Temporary. + This implementation will get refactored. + + + + How the square object field should be aligned. + + + + + + Left aligned. + + + + + Centered. + + + + + Right aligned. + + + + + Configuration for progress bar fields. + + + + + The height of the progress bar field. Default 12 pixel. + + + + + The foreground color of the progress bar field. + + + + + The background color of the progress bar field. + + + + + If true the progress bar field will draw a label ontop to show the current value. + + + + + Alignment of the progress bar field overlay. + + + + + Default configuration. + + + + + Creates a copy of the configuration. + + The configuration to copy. + + + + Creates a progress bar configuration. + + The height of the progress bar. + The foreground color of the progress bar. + The background color of the progress bar. + If true there will be drawn a overlay on top of the field. + The alignment of the text overlay. + + + + Draw mode of quaternion fields. + + + + + + + Draw the quaterion as euler angles. + + + + + Draw the quaterion in as an angle and an axis. + + + + + Draw the quaternion as raw x, y, z and w values. + + + + Initializes the and creates a permanent ID for the Control. + If you create this on a such as , + make sure to initialize this during OnEnable to ensure it gets initialized correctly. + + + + Field drawing functions for various types. + + + + + The width of the X, Y and Z labels in structs. + + + + + When true the component labels, for vector fields, will be hidden when the field is too narrow. + + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + Position and size of the field. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window. + + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Texture to be used as the preview. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + Position and size of the field. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + The height or size of the square object field. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + The label to use, or null if no label should be used. + The Unity object. + The texture to be used as the preview. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + The height or size of the square object field. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + The label to use, or null if no label should be used. + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + The height or size of the square object field. + How the square object field should be aligned. + + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + The Unity object. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + The height or size of the square object field. + How the square object field should be aligned. + + + + Draws a polymorphic ObjectField. + + The label to use, or null if no label should be used. + The value. + The object type. This supports inheritance. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a polymorphic ObjectField. + + The label to use, or null if no label should be used. + The value. + The object type. This supports inheritance. + The title to be shown in the object picker. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a polymorphic ObjectField. + + + + + Draws a polymorphic ObjectField. + + + + + Draws a polymorphic ObjectField. + + The label to use, or null if no label should be used. + The value. + The object type. This supports inheritance. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a polymorphic ObjectField. + + The value. + The object type. This supports inheritance. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a polymorphic ObjectField. + + The value. + The object type. This supports inheritance. + The title to be shown in the object picker. + Wheather or not to allow scene objects. + Layout options. + + + + Draws a field for a layer mask. + + Position and size of the field. + The label to use, or null if no label should be used. + The layer mask to draw. + + + + Draws a field for a layer mask. + + Position and size of the field. + The label to use, or null if no label should be used. + The layer mask to draw. + + + + Draws a field for a layer mask. + + Position and size of the field. + The layer mask to draw. + + + + Draws a field for a layer mask. + + The label to use, or null if no label should be used. + The layer mask to draw. + Layout options. + + + + Draws a field for a layer mask. + + The label to use, or null if no label should be used. + The layer mask to draw. + Layout options. + + + + Draws a field for a layer mask. + + The layer mask to draw. + Layout options. + + + + Draws a Guid field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Guid field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a Guid field. + + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Guid field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Guid field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a Guid field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws an int field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws an int field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an int field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an int field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws an int field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws an int field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an int field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an int field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed int field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a delayed int field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed int field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed int field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a delayed int field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a delayed int field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed int field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed int field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a range field for ints. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a range field for ints. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Value assigned to the field. + + + + Draws a range field for ints. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Value assigned to the field. + + + + Draws a range field for ints. + + Position and size of the field. + Current value. + Minimum value. + Maximum value. + Value assigned to the field. + + + + Drwas a range field for ints. + + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a range field for ints. + + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Layout options. + Value assigned to the field. + + + + Draws a range field for ints. + + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Layout options. + Value assigned to the field. + + + + Draws a range field for ints. + + Current value. + Minimum value. + Maximum value. + Layout options. + Value assigned to the field. + + + + Draws a colored progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Optional text for label to be drawn ontop of the progress bar. This value is only used if the DrawValueLabel option is enabled in the ProgressBarConfig. + + + + Draws a colored progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + + + + Draws a colored progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + + + + Draws a colored progress bar field. + + Position and size of the field. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + + + + Draws a colored progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + + + + Draws a colored progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + + + + Draws a colored progress bar field. + + Position and size of the field. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + + + + Draws a colored progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Layout options. + + + + Draws a colored progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Layout options. + + + + Draws a colored progress bar field. + + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Layout options. + + + + Draws a colored progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + Layout options. + + + + Draws a colored progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + Layout options. + + + + Draws a colored progress bar field. + + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + Layout options. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Optional text for label to be drawn ontop of the progress bar. This value is only used if the DrawValueLabel option is enabled in the ProgressBarConfig. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + + + + Draws a colored segmented progress bar field. + + Position and size of the field. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + + + + Draws a colored segmented progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Layout options. + + + + Draws a colored segmented progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Layout options. + + + + Draws a colored segmented progress bar field. + + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + The configuration for the progress bar field. + Layout options. + + + + Draws a colored segmented progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + Layout options. + + + + Draws a colored segmented progress bar field. + + The label to use, or null if no label should be used. + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + Layout options. + + + + Draws a colored segmented progress bar field. + + The current value of the progress bar. + The left hand side value of the progress bar. + The right hand side value of the progress bar. + Layout options. + + + + Draws an overlay on top of a progress bar field. + + The rect used to draw the progress bar field with. (Minus the Rect for the prefix label, if any.) + The label to draw ontop of the progress bar field. + The relative value of the progress bar, from 0 to 1. + The configuration used to draw the progress bar field. + + + + Draws an overlay on top of a progress bar field. + + The rect used to draw the progress bar field with. (Minus the Rect for the prefix label, if any.) + The label to draw ontop of the progress bar field. + The relative value of the progress bar, from 0 to 1. + The configuration used to draw the progress bar field. + + + + Draws an long field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws an long field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an long field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an long field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws an long field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws an long field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an long field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an long field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed long field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a delayed long field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed long field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed long field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a delayed long field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a delayed long field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed long field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed long field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a float field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a float field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a float field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a float field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a float field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed float field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a delayed float field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed float field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed float field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a delayed float field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a delayed float field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed float field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed float field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a range field for floats. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a range field for floats. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Value assigned to the field. + + + + Draws a range field for floats. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Value assigned to the field. + + + + Draws a range field for floats. + + Position and size of the field. + Current value. + Minimum value. + Maximum value. + Value assigned to the field. + + + + Draws a range field for floats. + + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a range field for floats. + + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Layout options. + Value assigned to the field. + + + + Draws a range field for floats. + + Label of field. Set to null for no label. + Current value. + Minimum value. + Maximum value. + Layout options. + Value assigned to the field. + + + + Draws a range field for floats. + + Current value. + Minimum value. + Maximum value. + Layout options. + Value assigned to the field. + + + + Draws a double field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a double field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a double field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a double field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a double field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a double field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a double field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a double field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed double field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a delayed double field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed double field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed double field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a delayed double field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a delayed double field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed double field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed double field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a decimal field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a decimal field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a decimal field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a decimal field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a decimal field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a decimal field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a decimal field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a decimal field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a text field for strings. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a text field for strings. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a text field for strings. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a text field for strings. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a text field for strings. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a text field for strings. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a text field for strings. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a text field for strings. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed text field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a delayed text field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed text field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a delayed text field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a delayed text field. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a delayed text field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed text field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a delayed text field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a field that lets the user select a path to a file. + + Position and size of the field. + Label of field. Set to null for no label. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + Comma separated list of allowed file extensions. Use null to allow any file extension. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + If true the file path will include the file's extension. + A path to a file. + + + + Draws a field that lets the user select a path to a file. + + Position and size of the field. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + Comma separated list of allowed file extensions. Use null to allow any file extension. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + If true the file path will include the file's extension. + A path to a file. + + + + Draws a field that lets the user select a path to a file. + + Label of field. Set to null for no label. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + Comma separated list of allowed file extensions. Use null to allow any file extension. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + Layout options. + A path to a file. + + + + Draws a field that lets the user select a path to a file. + + Label of field. Set to null for no label. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + Comma separated list of allowed file extensions. Use null to allow any file extension. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + Layout options. + If true the file path will include the file's extension. + A path to a file. + + + + Draws a field that lets the user select a path to a file. + + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + Comma separated list of allowed file extensions. Use null to allow any file extension. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + Layout options. + If true the file path will include the file's extension. + A path to a file. + + + + Draws a field that lets the user select a path to a file. + + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + Comma separated list of allowed file extensions. Use null to allow any file extension. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + Layout options. + A path to a file. + + + + Draws a field that lets the user select a path to a folder. + + Position and size of the field. + Label of field. Set to null for no label. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + A path to a folder. + + + + Draws a field that lets the user select a path to a folder. + + Position and size of the field. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + A path to a folder. + + + + Draws a field that lets the user select a path to a folder. + + Label of field. Set to null for no label. + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + Layout options. + A path to a folder. + + + + Draws a field that lets the user select a path to a folder. + + The current value. + A parent path the path needs to be relative to. Use null for Unity project directory. + If true the path will be absolute. Otherwise the path will be relative to parentPath or to the Unity project directory. + If true the path will be enforced to use backslashes. Otherwise the path will be enforced to use forward slashes. + Layout options. + A path to a folder. + + + + Draws a prefix label for a vector field, that implements label dragging. + + + + + Draws a prefix label for a vector field, that implements label dragging. + + The position and total size of the field. + The label content. If null this function does nothing. + The value for the vector field. + The vector scaled by label dragging. + + + + Draws a prefix label for a vector field, that implements label dragging. + + The position and total size of the field. + The label content. If null this function does nothing. + The value for the vector field. + The vector scaled by label dragging. + + + + Draws a prefix label for a vector field, that implements label dragging. + + The label content. If null this function does nothing. + The value for the vector field. + The vector scaled by label dragging. + + + + Draws a prefix label for a vector field, that implements label dragging. + + The label content. If null this function does nothing. + The value for the vector field. + The vector scaled by label dragging. + + + + Draws a Vector2 field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Vector2 field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Vector2 field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a Vector2 field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector2 field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector2 field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector3 field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Vector3 field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Vector3 field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a Vector3 field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector3 field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector3 field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector4 field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Vector4 field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a Vector4 field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a Vector4 field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector4 field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Vector4 field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a Color field. + + Position and size of the field. + Label of field. Set to null for no label. + + Value assigned to the field. + + + + Draws a Color field. + + Position and size of the field. + Label of field. Set to null for no label. + + Value assigned to the field. + + + + Draws a Color field. + + Position and size of the field. + + Value assigned to the field. + + + + Draws a Color field. + + Label of field. Set to null for no label. + + Layout options. + Value assigned to the field. + + + + Draws a Color field. + + Label of field. Set to null for no label. + + Layout options. + Value assigned to the field. + + + + Draws a Color field. + + + Layout options. + Value assigned to the field. + + + + Draws a slider for setting two values between a min and a max limit. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + The min and max limit for the value. + Show fields for min and max value. + A Vector2 with X set as min value, and Y to set as max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + The min and max limit for the value. + Show fields for min and max value. + A Vector2 with X set as min value, and Y to set as max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Position and size of the field. + Current value. + The min and max limit for the value. + Show fields for min and max value. + A Vector2 with X set as min value, and Y to set as max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Label of field. Set to null for no label. + Current value. + The min and max limit for the value. + Show fields for min and max value. + Layout options. + A Vector2 with X set as min value, and Y to set as max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Label of field. Set to null for no label. + Current value. + The min and max limit for the value. + Show fields for min and max value. + Layout options. + A Vector2 with X set as min value, and Y to set as max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Current value. + The min and max limit for the value. + Show fields for min and max value. + Layout options. + A Vector2 with X set as min value, and Y to set as max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Position and size of the field. + Label of field. Set to null for no label. + Current min value. + Current max value. + The min limit for the value. + The max limit for the value. + Show fields for min and max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Position and size of the field. + Label of field. Set to null for no label. + Current min value. + Current max value. + The min limit for the value. + The max limit for the value. + Show fields for min and max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Position and size of the field. + Current min value. + Current max value. + The min limit for the value. + The max limit for the value. + Show fields for min and max value. + + + + Draws a slider for setting two values between a min and a max limit. + + Label of field. Set to null for no label. + Current min value. + Current max value. + The min limit for the value. + The max limit for the value. + Show fields for min and max value. + Layout options. + + + + Draws a slider for setting two values between a min and a max limit. + + Label of field. Set to null for no label. + Current min value. + Current max value. + The min limit for the value. + The max limit for the value. + Show fields for min and max value. + Layout options. + + + + Draws a slider for setting two values between a min and a max limit. + + Current min value. + Current max value. + The min limit for the value. + The max limit for the value. + Show fields for min and max value. + Layout options. + + + + Draws a rotation field for a quaternion. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Draw mode for rotation field. + Value assigned to the field. + + + + Draws a rotation field for a quaternion. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Draw mode for rotation field. + Value assigned to the field. + + + + Draws a rotation field for a quaternion. + + Position and size of the field. + Current value. + Draw mode for rotation field. + Value assigned to the field. + + + + Draws a rotation field for a quaternion. + + Label of field. Set to null for no label. + Current value. + Draw mode for rotation field. + Layout options. + Value assigned to the field. + + + + Draws a rotation field for a quaternion. + + Label of field. Set to null for no label. + Current value. + Draw mode for rotation field. + Layout options. + Value assigned to the field. + + + + Draws a rotation field for a quaternion. + + Current value. + Draw mode for rotation field. + Layout options. + Value assigned to the field. + + + + Draws an euler field for a quaternion. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an euler field for a quaternion. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an euler field for a quaternion. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws an euler field for a quaternion. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an euler field for a quaternion. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an euler field for a quaternion. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws an angle axis field for a quaternion. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an angle axis field for a quaternion. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws an angle axis field for a quaternion. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws an angle axis field for a quaternion. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an angle axis field for a quaternion. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws an angle axis field for a quaternion. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a quaternion field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a quaternion field. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a quaternion field. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a quaternion field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a quaternion field. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a quaternion field. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a dropdown. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Names of selectable items. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a dropdown. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Names of selectable items. + Value assigned to the field. + + + + Draws a dropdown. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Names of selectable items. + Value assigned to the field. + + + + Draws a dropdown. + + Position and size of the field. + Current value. + Names of selectable items. + Value assigned to the field. + + + + Draws a dropdown. + + Label of field. Set to null for no label. + Current value. + Names of selectable items. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a dropdown. + + Label of field. Set to null for no label. + Current value. + Names of selectable items. + Layout options. + Value assigned to the field. + + + + Draws a dropdown. + + Label of field. Set to null for no label. + Current value. + Names of selectable items. + Layout options. + Value assigned to the field. + + + + Draws a dropdown. + + Current value. + Names of selectable items. + Layout options. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Selectable items. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Label of field. Set to null for no label. + Current value. + Selectable items. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Selectable items. + Names of selectable items. If null ToString() will be used instead. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + + Names of selectable items. If null ToString() will be used instead. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + + Names of selectable items. If null ToString() will be used instead. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Position and size of the field. + Current value. + + Names of selectable items. If null ToString() will be used instead. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Label of field. Set to null for no label. + Current value. + + Names of selectable items. If null ToString() will be used instead. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Label of field. Set to null for no label. + Current value. + + Names of selectable items. If null ToString() will be used instead. + Layout options. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Label of field. Set to null for no label. + Current value. + + Names of selectable items. If null ToString() will be used instead. + Layout options. + Value assigned to the field. + + + + Draws a generic dropdown. + + + Current value. + + Names of selectable items. If null ToString() will be used instead. + Layout options. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a dropdown for an enum or an enum mask. + + Current value. + Layout options. + Value assigned to the field. + + + + Draws a dropdown. + + + Position and size of the field. + Label of field. Set to null for no label. + Current selection. + Avaible items in the dropdown. + If true then the user can select multiple items. Otherwise the user can only select one item. + true when the user has changed the selection. Otherwise false. + + + + Draws a dropdown. + + + Position and size of the field. + Label of field. Set to null for no label. + Current selection. + Avaible items in the dropdown. + If true then the user can select multiple items. Otherwise the user can only select one item. + true when the user has changed the selection. Otherwise false. + + + + Draws a dropdown. + + + Position and size of the field. + Current selection. + Avaible items in the dropdown. + If true then the user can select multiple items. Otherwise the user can only select one item. + true when the user has changed the selection. Otherwise false. + + + + Draws a dropdown. + + + Label of field. Set to null for no label. + Current selection. + Avaible items in the dropdown. + If true then the user can select multiple items. Otherwise the user can only select one item. + Layout options. + true when the user has changed the selection. Otherwise false. + + + + Draws a dropdown. + + + Label of field. Set to null for no label. + Current selection. + Avaible items in the dropdown. + If true then the user can select multiple items. Otherwise the user can only select one item. + Layout options. + true when the user has changed the selection. Otherwise false. + + + + Draws a dropdown. + + + Current selection. + Avaible items in the dropdown. + If true then the user can select multiple items. Otherwise the user can only select one item. + Layout options. + true when the user has changed the selection. Otherwise false. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Current value. + Value assigned to the field. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports Odin expressions. + + Context for expression support. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Current value. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports Odin expressions. + + Context for expression support. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Current value. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports Odin expressions. + + Context for expression support. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Current value. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports Odin expressions. + + Context for expression support. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Current value. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports Odin expressions. + + Context for expression support. + Current value. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a decimal field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions and Odin expressions. + + Context for expression support. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a float field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a double field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + + Draws a long field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a long field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Position and size of the field. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports unit conversions and Odin expressions. + + Context for expression support. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + + Draws a int field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Position and size of the field. + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Label of field. Set to null for no label. + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a int field that supports unit conversions. + + Current value. + UnitInfo of the value and return value. Must have same UnitCategory as displayUnitInfo. + UnitInfo of the displayed value in the field, converted from baseUnitInfo. Must have same UnitCategory as baseUnitInfo. + Layout options. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Position and size of the field. + Label of field. Set to null for no label. + Current selection. + GUIStyle for drawing the field. Set to null for default. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Position and size of the field. + Label of field. Set to null for no label. + Current selection. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Position and size of the field. + Label of field. Set to null for no label. + Current selection. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Position and size of the field. + Current selection. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Label of field. Set to null for no label. + Current selection. + GUIStyle for drawing the field. Set to null for default. + Layout options. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Label of field. Set to null for no label. + Current selection. + Layout options. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Label of field. Set to null for no label. + Current selection. + Layout options. + Value assigned to the field. + + + + Draws a dropdown field for enum masks. + + Current selection. + Layout options. + Value assigned to the field. + + + + Wrapper for Unity's ExpressionEvaluator. It was moved from UnityEditor to UnityEngine in version 2023 and + that *should* have been automatically fixed by the AssemblyUpdater, but that broke for one reason or another. + + + + + Type containing the necessary components to use C# expressions in fields. + + + // Creating and using a context with for a static type. + FieldExpressionContext context = FieldExpressionContext.StaticExpression(typeof(MyStaticType)); + + SirenixEditorFields.SmartIntField(context, ...); + + + // Creating and using a context with an instanced type. + FieldExpressionContext context = FieldExpressionContext.InstanceContext(myInstance); + + SirenixEditorFields.SmartIntField(context, ...); + + + // Creating and using context with an InspectorProperty, for example, in a custom Odin drawer. + FieldExpressionContext context = property.ToFieldExpressionContext(); + + SirenixEditorFields.SmartIntField(context, ...); + + + + + Target instance for field expressions. + + + + + Target type for expressions. + + + + + Indicates if the expressions targets a static type or not. + + + + + Creates an expression context that targets nothing. Expressions are still possible, but no members can be accessed, and only static method can be called. + + FieldExpresionContext target targets nothing. + + + + Creates an expression context that targets the provided instance. Expression can access members of the instance. + + The instance for the context to target. + FieldExpressionContext that targets an instance. + Throws if instance is null. + + + + Creates an expression context that targets the provided type. Only static members can be accessed. + + The type to target. + FieldExpressionContext that targets a static type. + Throws if type is null. + + + + Collection of various editor GUI functions. + + + + + The mixed value dash character, to show when something has mixed values; + + + + + Default fade group animation duration. + + + + + Tab page slide animation duration. + + + + + Shaking animation duration. + + + + + Expand foldouts by default. + + + + + Show buttons results by default. + + + + + Draws a GUI field for objects. + + The rect to draw the field in. + The label of the field. + The value of the field. + The object type for the field. + If set to true then allow scene objects to be assigned to the field. + If set to true the field is readonly. + The object assigned to the field. + + + + Draws an GUI field for objects. + + The label for the field. + The value of the field. + The object type for the field. + If set to true then allow scene objects to be assigned to the field. + If set to true the field is readonly. + The object assigned to the field. + + + + Draws a GUI field for objects. + + The key for the field. + The type. + The label for the field. + The current value for the field. + If set to true then allow scene objects to be assigned to the field. + + The object assigned to the field. + + + + + Draws a nicely formatted title with an optinal sub-title and horizontal ruler. + + + + + Draws a GUI color field. + + The rect to draw the field in. + The color of the field. + If set to true then use alpha in the preview. + If set to true then show alpha bar in the preview. + The color assigned to the field. + + + + Draws a warning message box. + + + Also triggers a warning during validation checks done by + + The message. + If set to true the message box will be wide. + + + + Draws a thick horizontal seperator. + + + + + Draws a thick horizontal seperator. + + + + + Draws a thick horizontal seperator. + + + + + Draws a thick horizontal seperator. + + + + + Draws a horizontal line seperator. + + + + + Draws a vertical line seperator. + + + + + Draws an error message box. + + + Also triggers an error during validation checks done by + + The message. + If set to true the message box will be wide. + + + + Draws a info message box. + + The message. + If set to true the message box will be wide. + + + + Draws a message box. + + The message. + If set to true the message box will be wide. + + + + Draws a message box. + + The message. + Type of the message. + If set to true the message box will be wide. + + + + Draws a message box. + + The message. + Type of the message. + The style. + If set to true the message box will be wide. + + + + Draws a message box. + + The message. + Type of the message. + The style. + If set to true the message box will be wide. + + + + Draws a message box. + + The message. + Type of the message. + The style of the message box. + If set to true the message box will be wide. + + + + Draws a message box that can be expanded to show more details. + + The message of the message box. + The detailed message of the message box. + Type of the message box. + If set to true the detailed message is hidden. + If set to true the message box will be wide. + State of isFolded. + + + + Draws a message box with the specified icon. + + The message to be displayed. + The icon to be displayed. + The color of the icon. + The style of the message box. + The action to be invoked if the message box is right-clicked. + + + + Draws a horizontal line separator. + + Width of the line. + + + + Draws a horizontal line separator. + + The color of the line. + The size of the line. + + + + Draws a vertical line separator. + + Width of the line. + + + + Draws a vertical line separator. + + The color of the line. + Width of the line. + + + + Draws a GUI button with an icon. + + The editor icon for the button. + The width of the button. + The height of the button. + The tooltip of the button. + true if the button was pressed. Otherwise false. + + + + Draws a GUI button with an icon. + + The editor icon for the button. + The GUI style for the button. + The width of the button. + The height of the button. + The tooltip of the button. + true if the button was pressed. Otherwise false. + + + + Draws a GUI button with an icon. + + The rect to draw the button in. + The editor icon for the button. + true if the button was pressed. Otherwise false. + + + + Draws a GUI button with an icon. + + The rect to draw the button in. + The editor icon for the button. + The tooltip of the button. + true if the button was pressed. Otherwise false. + + + + Draws a GUI button with an icon. + + The rect to draw the button in. + The editor icon for the button. + The GUI style for the button. + The tooltip of the button. + true if the button was pressed. Otherwise false. + + + + Draws a GUI button with an icon. + + The rect to draw the button in. + The icon texture. + The tooltip for the button. + true when the button is pressed. + + + + Draws a GUI button with an icon. + + The rect to draw the button in. + The icon texture. + Style for the button. + The tooltip for the button. + true when the button is pressed. + + + + Draws a GUI button with an icon. + + The icon texture. + Width of the button in pixels. + Height of the button in pixels. + The tooltip for the button. + true when the button is pressed. + + + + Draws a GUI button with an icon. + + The icon texture. + Style for the button. + Width of the button in pixels. + Height of the button in pixels. + The tooltip for the button. + true when the button is pressed. + + + + Draws a repeating icon button. + + The icon for the button. + true while the button is active. Otherwise false. + + + + Draws a repeating icon button. + + The icon for the button. + The size. + true while the button is active. Otherwise false. + + + + Draws a repeating icon button. + + The icon for the button. + The width of the button. + The height of the button. + true while the button is active. Otherwise false. + + + + Draws a SDF icon button. + + The button's label. + The button's height. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's label. + The button's height. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's label. + The button's height. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's label. + The button's height. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's label. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's icon. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's label. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's label. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's label. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Calculates the minimum needed space for a SDF icon button where the label is still visible. + + The label of the SDF icon button. + The height of the SDF icon button. + The minimum width of the SDF icon button. + + + + Draws a toolbar icon button. + + The icon for the button. + If true, the button clickable while GUI.enabled == false. + + true if the button was pressed. Otherwise false. + + + + + Draws a toolbar icon button. + + The icon for the button. + If true, the button clickable while GUI.enabled == false. + + true if the button was pressed. Otherwise false. + + + + + Draws a toolbar icon button. + + The GUI content for the button. + Whether the button state is selected or not + true if the button was pressed. Otherwise false. + + + + Draws a toolbar icon button. + + The label for the button. + Whether the button state is selected or not + true if the button was pressed. Otherwise false. + + + + Draws a toolbar toggle. + + Current state of the toggle. + The icon for the toggle. + The state of the toggle. + + + + Draws a toolbar toggle. + + Current state of the toggle. + The icon for the toggle. + The state of the toggle. + + + + Draws a toolbar toggle. + + Current state of the toggle. + The GUI content for the button. + The state of the toggle. + + + + Draws a toolbar toggle. + + Current state of the toggle. + The text for the toggle. + The state of the toggle. + + + + Draws a toolbar tab. + + If true the tab will be the active tab. + Name for the tab. + State of isActive. + + + + Draws a toolbar tab. + + If true the tab will be the active tab. + Label for the tab. + State of isActive. + + + + Draws a solid color rectangle. + + The rect. + The color. + If true applies the user's playmdoe tint to the rect in playmode. + + + + Draws a solid color rectangle. + + The width. + The height. + The color. + If true applies the user's playmdoe tint to the rect in playmode. + The rect created. + + + + Draws borders around a rect. + + The rect. + The width of the border on all sides. + If true applies the user's playmdoe tint to the rect in playmode. + + + + Draws borders around a rect. + + The rect. + The width of the border on all sides. + The color of the border. + If true applies the user's playmdoe tint to the rect in playmode. + + + + Draws borders around a rect. + + The rect. + The left size. + The right size. + The top size. + The bottom size. + If true applies the user's playmdoe tint to the rect in playmode. + + + + Draws borders around a rect. + + The rect. + The left size. + The right size. + The top size. + The bottom size. + The color of the borders. + If true applies the user's playmdoe tint to the rect in playmode. + + + + Draws a toolbar search field. + + The current search text. + If set to true the force focus on the field. + The left and right margin. + The current search text. + + + + Draws a search field. + + + + + Begins a horizontal toolbar. Remember to end with . + + The height of the toolbar. + Padding for the top of the toolbar. + The rect of the horizontal toolbar. + + + + Begins a horizontal toolbar. Remember to end with . + + The style for the toolbar. + The height of the toolbar. + The top padding. + + The rect of the horizontal toolbar. + + + + + Ends a horizontal toolbar started by . + + + + + Begins a horizontal indentation. Remember to end with . + + The GUI layout options. + + + + Begins a horizontal indentation. Remember to end with . + + The style of the indentation. + The GUI layout options. + + + + Ends a identation horizontal layout group started by . + + + + + Begins a vertical indentation. Remember to end with . + + The GUI layout options. + + + + Begins a vertical indentation. Remember to end with . + + The style of the indentation. + The GUI layout options. + + + + Ends a identation vertical layout group started by . + + + + + Indents by the current indent value, . + + + + + Draws a menu button. + + The indent of the button. + The text of the button. + The current state of the button. + The texture icon for the button. + The current state of the button. + + + + Begins a fade group. Remember to end with . + + The key for the fade group. + Current state of the fade group. + + + + Begins a fade group. Remember to end with . + + The key for the fade group. + Current state of the fade group. + A value between 0 and 1 indicating how expanded the fade group is. + + + + Begins a fade group. Remember to end with . + + The primary key for the fade group. + The secondly key for the fade group. + Current state of the fade group. + + + + Begins a fade group. Remember to end with . + + The key for the fade group. + The name of the fade group. + Current state of the fade group. + + + + Begins a fade group. Remember to end with . + + The key for the fade group. + Current state of the fade group. + The duration of fade in and out. + + + + Begins a fade group. Remember to end with . + + The key for the fade group. + Current state of the fade group. + A value between 0 and 1 indicating how expanded the fade group is. + The duration of fade in and out. + + + + Begins a fade group. Remember to end with . + + The primary key for the fade group. + The secondly key for the fade group. + Current state of the fade group. + The duration of fade in and out. + + + + Begins a fade group. Remember to end with . + + The key for the fade group. + The name of the fade group. + Current state of the fade group. + The duration of fade in and out. + + + + Begins a fade group. Remember to end with . + + The current fading value between 0 and 1. + + + + Ends a fade group started by any BeginFadeGroup. + + + + + Draws a foldout field where clicking on the label toggles to the foldout too. + + The current state of the foldout. + The label of the foldout. + The GUI style. + + The current state of the foldout. + + + + + Draws a foldout field where clicking on the label toggles to the foldout too. + + The current state of the foldout. + The label of the foldout. + The GUI style. + + + + Draws a foldout field where clicking on the label toggles to the foldout too. + + The current state of the foldout. + The label of the foldout. + The value rect. + The GUI style. + + + + Draws a foldout field where clicking on the label toggles to the foldout too. + + The rect to draw the foldout field in. + The current state of the foldout. + The label of the foldout. + The style. + + + + Draws a foldout field where clicking on the label toggles to the foldout too. + + The rect to draw the foldout field in. + The current state of the foldout. + The label of the foldout. + The style. + + + + Begins drawing a box. Remember to end with . + + The label of the box. + If set to true then center label. + The GUI layout options. + + + + Begins drawing a box. Remember to end with . + + The label of the box. + If set to true then center label. + The GUI layout options. + The rect of the box. + + + + Begins drawing a box. Remember to end with . + + The GUI layout options. + + + + Ends drawing a box started by any BeginBox. + + + + + Begins drawing a box header. Remember to end with . + + + + + Ends drawing a box header started by , + + + + + Begins drawing a box with toolbar style header. Remember to end with . + + Label for box header. + If true the label will be drawn in the center of the box header. + GUILayout options. + The rect of the box. + + + + Begins drawing a box with toolbar style header. Remember to end with . + + Label for box header. + If true the label will be drawn in the center of the box header. + GUILayout options. + The rect of the box. + + + + Begins drawing a box with toolbar style header. Remember to end with . + + GUILayout options. + The rect of the box. + + + + Ends the drawing a box with a toolbar style header started by . + + + + + Begins drawing a toolbar style box header. Remember to end with . + + The rect of the box. + + + + Ends the drawing of a toolbar style box header started by . + + + + + Begins drawing a legend style box. Remember to end with . + + The label for the legend style box. + If true the label will be drawn in the center of the box. + GUILayout options. + The rect of the box. + + + + Begins drawing a legend style box. Remember to end with . + + The label for the legend style box. + If true the label will be drawn in the center of the box. + GUILayout options. + The rect of the box. + + + + Begins drawing a legend style box. Remember to end with . + + GUILayout options. + The rect of the box. + + + + Ends the drawing of a legend style box started by + + + + + Begins drawing an inline box. Remember to end with . + + The GUI layout options. + The rect of the box. + + + + Ends drawing an inline box started by any BeginInlineBox. + + + + + Starts the shaking animation of a shaking group. + + + + + Starts the shaking animation of a shaking group. + + + + + Begins a shakeable group. + + + + + Ends the shakeable group. + + + + + Begins a shakeable group. + + + + + Begins a shakeable group. + + + + + Starts the shaking animation of a shaking group. + + + + + Ends the shakeable group. + + + + + Begins drawing a vertical menu list. + + The key for the menu list. + The rect created. + + + + Begins drawing a menu list item. Remember to end with + + Value indicating whether the item is selected. + Value indicating if the mouse is pressed on the item. + If set to true the item is set as selected.. + The rect used for the item. + + + + Ends drawing a menu list item started by + + + + + Ends drawing a vertical menu list started by + + + + + Begins drawing a vertical list. + + If set to true borders will be drawn around the vertical list. + If set to true a dark background will be drawn. + The GUI layout options. + The rect used for the list. + + + + Ends drawing a vertical list started by . + + + + + Begins drawing a list item. + + If set to true the item can be hovered with the mouse. + The style for the vertical list item. + The GUI layout options. + The rect used for the item. + + + + Begins drawing a list item. + + If set to true the item can be hovered with the mouse. + The style for the vertical list item. + The GUI layout options. + The color for even elements. + The color for odd elements. + The color for even elements when hovered. + The color for odd elements when hovered. + The rect used for the item. + + + + Ends drawing a list item started by . + + + + + Creates a animated tab group. + + The key for the tab group.. + An animated tab group. + + + + Begins drawing a toggle group. Remember to end with . + + The key of the group. + Value indicating if the group is enabled. + Value indicating if the group is visible. + The title of the group. + Value indicating if the group is toggled. + + + + Begins drawing a toggle group. Remember to end with . + + The key of the group. + Value indicating if the group is enabled. + Value indicating if the group is visible. + The title of the group. + Duration of the animation. + Value indicating if the group is toggled. + + + + Ends drawing a toggle group started by . + + + + + Begins drawing a horizontal auto scroll box. Remember to end with . + + The for the field. + The GUILayout options. + The rect used for the field. + + + + Ends drawing a horizontal auto scroll box started by . + + + + + Creates a rect that can be grabbed and pulled to change a value up or down. + + The grabbable rect. + The control ID for the sliding. + The current value. + + The current value. + + + + + Creates a rect that can be grabbed and pulled to change a value up or down. + + The grabbable rect. + The control ID for the sliding. + The current value. + + The current value. + + + + + Creates a rect that can be grabbed and pulled to change a value up or down. + + The grabbable rect. + The control ID for the sliding. + The current value. + + The current value. + + + + + Creates a rect that can be grabbed and pulled to change a value up or down. + + The grabbable rect. + The control ID for the sliding. + The current value. + + The current value. + + + + + Creates a rect that can be grabbed and pulled + + The grabbable rect. + The cursor. + + The the mouse delta position. + + + + + Creates a rect that can be grabbed and pulled + + The position. + The grabbable rect. + + The the mouse delta position. + + + + + Draws a field for a value of type T - dynamically choosing an appropriate drawer for the type. + Currently supported are: char, string, sbyte, byte, short, ushort, int, uint, long, ulong, float, double, decimal, Guid and all enums. + + The type of the value to draw. + The label of the fields. + The value to draw. + The layout options. + The possibly changed value. + + + + Checks whether a given type can be drawn as a dynamic field by + + The type to check. + True if the type can be drawn, otherwise false. + + + + Gets the feature rich control rect. + + + + + Gets the feature rich control rect. + + + + + Creates a control ID that handles keyboard control, focused editor window, indentation and prefix label correctly. + + The rect to make a feature rich control for. + The label for the control. Leave null for no label. + The created control ID. + A value indicating whether or not the control has keyboard focus. + + + + Creates a control ID that handles keyboard control, focused editor window, indentation and prefix label correctly. + + The rect to make a feature rich control for. + The created control ID. + A value indicating whether or not the control has keyboard focus. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The amount of slicing applied to the texture on all sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The amount of slicing applied to the left and right sides. + The amount of slicing applied to the top and bottom sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The amount of slicing applied to the left side. + The amount of slicing applied to the right side. + The amount of slicing applied to the top side. + The amount of slicing applied to the bottom side. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The UV-coordinates to use. + The amount of slicing applied to the texture on all sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The UV-coordinates to use. + The amount of slicing applied to the left and right sides. + The amount of slicing applied to the top and bottom sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The UV-coordinates to use. + The amount of slicing applied to the left side. + The amount of slicing applied to the right side. + The amount of slicing applied to the top side. + The amount of slicing applied to the bottom side. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The that modulates the output. + The amount of slicing applied to the texture on all sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The that modulates the output. + The amount of slicing applied to the left and right sides. + The amount of slicing applied to the top and bottom sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The that modulates the output. + The amount of slicing applied to the left side. + The amount of slicing applied to the right side. + The amount of slicing applied to the top side. + The amount of slicing applied to the bottom side. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The that modulates the output. + The UV-coordinates to use. + The amount of slicing applied to the texture on all sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The that modulates the output. + The UV-coordinates to use. + The amount of slicing applied to the left and right sides. + The amount of slicing applied to the top and bottom sides. + + + + Draws a with support for slicing the Texture. + + The to draw the in. + The to draw. + The that modulates the output. + The UV-coordinates to use. + The amount of slicing applied to the left side. + The amount of slicing applied to the right side. + The amount of slicing applied to the top side. + The amount of slicing applied to the bottom side. + + + + Draws a repeating in a given . + + The to draw the in. + The to draw. + Amount of scaling applied to the output. + + + + Draws a repeating in a given . + + The to draw the in. + The to draw. + The that modulates the output. + Amount of scaling applied to the output. + + + + Draws a button with a given Size. + + Text to display on the button. + The size of the button. + true when the button is pressed; otherwise false. + + + + Collection of GUIStyles used by Sirenix. + + + + + Validator Green + + + + + Inspector Orange + + + + + Serializer Yellow + + + + + Green valid color + + + + + Red error color + + + + + Yellow warning color + + + + + Border color. + + + + + Box background color. + + + + + Dark editor background color. + + + + + Editor window background color. + + + + + Menu background color. + + + + + Header box background color. + + + + + Highlighted Button Color. + + + + + Highlight text color. + + + + + Highlight property color. + + + + + List item hover color for every other item. + + + + + List item hover color for every other item. + + + + + List item drag background color. + + + + + List item drag background color. + + + + + Column title background colors. + + + + + The default background color for when a menu item is selected. + + + + + The default background color for when a menu item is selected. + + + + + The default background color for when a menu item is selected. + + + + + The default background color for when a menu item is selected. + + + + + A mouse over background overlay color. + + + + + The default background color for when a menu item is selected. + + + + + The default background color for when a menu item is selected. + + + + + List item background color for every other item. OBSOLETE: Use ListItemColorEven instead. + + + + + List item background color for every other item. OBSOLETE: Use ListItemColorOdd instead. + + + + + List item color for every other item. + + + + + List item color for every other item. + + + + + Menu button active background color. + + + + + Menu button border color. + + + + + Menu button color. + + + + + Menu button hover color. + + + + + A light border color. + + + + + Bold label style. + + + + + Tag Button style. + + + + + Bold label style. + + + + + Centered bold label style. + + + + + Box container style. + + + + + Popup style. + + + + + Box header style. + + + + + Button style. + + + + + Button selected style. + + + + + Left button style. + + + + + Left button selected style. + + + + + Mid button style. + + + + + Mid button selected style. + + + + + Right button style. + + + + + Right button selected style. + + + + + Pane Options Button + + + + + Left button style. + + + + + Left button selected style. + + + + + Left button style. + + + + + Left button selected style. + + + + + Mid button style. + + + + + Mid button selected style. + + + + + Right button style. + + + + + Right button selected style. + + + + + Color field background style. + + + + + Foldout style. + + + + + Icon button style. + + + + + Label style. + + + + + Highlighted label style. + + + + + White label style. + + + + + Black label style. + + + + + Centered label style. + + + + + Centered label style. + + + + + White centered label style. + + + + + Black centered label style. + + + + + Centered mini label style. + + + + + Left Aligned Centered Label + + + + + Left aligned grey mini label style. + + + + + Left aligned grey label style. + + + + + Centered grey mini label + + + + + Left right aligned white mini label style. + + + + + Centered white mini label style. + + + + + Centered black mini label style. + + + + + List item style. + + + + + Menu button background style. + + + + + No style. + + + + + Odin Editor Wrapper. + + + + + Padding less box style. + + + + + Content Padding + + + + + Property padding. + + + + + Property margin. + + + + + Rich text label style. + + + + + Right aligned grey mini label style. + + + + + Right aligned white mini label style. + + + + + Section header style. + + + + + Section header style. + + + + + Toggle group background style. + + + + + Toggle group checkbox style. + + + + + Toggle group padding style. + + + + + Toggle group title background style. + + + + + Toolbar background style. + + + + + Toolbar button style. + + + + + Toolbar button selected style. + + + + + Toolbar search cancel button style. + + + + + Toolbar search field style. + + + + + Toolbar tab style. + + + + + Title style. + + + + + Bold title style. + + + + + Centered bold title style. + + + + + Right aligned bold title style. + + + + + Centered title style. + + + + + Right aligned title style. + + + + + Subtitle style. + + + + + Centered sub-title style. + + + + + Right aligned sub-title style. + + + + + Message box style. + + + + + Detailed Message box style. + + + + + Multiline white label style. + + + + + Multiline Label + + + + + Centered Multiline Label + + + + + Centered Text Field + + + + + Gets the bottom box padding. + + + + + Unitys PaneOptions GUIStyle. + + + + + Unitys ProjectBrowserTextureIconDropShadow GUIStyle. + + + + + Unitys TL SelectionButton PreDropGlow GUIStyle. + + + + + Unitys ShurikenModuleTitle GUIStyle. + + + + + Draw this one manually with: new Color(1, 1, 1, EditorGUIUtility.isProSkin ? 0.25f : 0.45f) + + + + + SDFIconButton Label. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Utility functions for Unity assets. + + + + + Gets all assets of the specified type. + + + + + Gets all assets of the specified type. + + The type of assets to find. + The asset folder path. + + + + Gets all assets of the specified type. + + The type of assets to find. + The asset folder path. + + + + Asset search helper. + + + + + The asset object. + + + + + Current index. + + + + + Search result count. + + + + + Tests if an asset can be created from a type. + + The type to test. + true if an asset can be created. Otherwise false. + + + + Tests if an asset can be created from a type. + + The type to test. + The base asset type. + true if an asset can be created. Otherwise false. + + + + Gets project path to the specified asset. + + The asset object. + The path to the asset. + + + + Creates a new asset of the specified type. + + The type of the asset. + Project path to the new asset. + The name of the asset. + + + + Functions for accessing the clipboard. + + + + + Gets the current copy mode. + + + + + Copies the specified object. + + + The object. + The copy mode. + + + + Copies the specified object. + + + + + Clears this instance. + + + + + Determines whether this instance can paste the specified type. + + + + + Determines whether this instance can paste the specified type. + + + + + Determines whether or not the Clipboard contains any instance. + + + + + Tries the paste. + + + + + Copies or gets the current object in the clipboard. + + + + + Copies or gets the current object in the clipboard. + + + + + The various modes of copying an object to the clipboard. + + + + + Deep copy. + + + + + Shallow Copy. + + + + + Reference Copy. + + + + + A utility class for getting delta time for the GUI editor. + + + + + A utility class for getting delta time for the GUI editor. + + + + + Compare strings and produce a distance score between them. + + + + + Determines whether if the source is within the search. + + The source string. + The target string. + Should the algorithm ignore letter case?. + Should the algorithm attempt to search on an abbreviation of the source?. + Threshold for what is considered to be within the search. 0 will return everything and 1 will only return exact matches. + True if the source is within the search. Otherwise false. + + + + Compares the target to the source and returns a distance score. + + The source string. + The target string. + + + Distance score. 0 is no match, and 1 is exact match. + + + + A utility class for properly counting frames and helps determine when a frame has started in an editor window. + + + + + Gets the frame count. + + + + + Gets a value indicating whether this instance is new frame. + + + + + Updates the frame counter and returns itself. + + + + + Hides the ObjectMembers in Visual Studio IntelliSense + + + + + Determines whether the specified , is equal to this instance. + + + + + Returns a hash code for this instance. + + + + + Gets the type. + + + + + Returns a that represents this instance. + + + + + Collection of texture functions. + + + + + Creates a new texture with no mimapping, linier colors, and calls texture.LoadImage(bytes), DontDestroyOnLoad(tex) and sets hideFlags = DontUnloadUnusedAsset | DontSaveInEditor. + + Old description no longer relevant as we've moved past version 2017. + Loads an image from bytes with the specified width and height. Use this instead of someTexture.LoadImage() if you're compiling to an assembly. Unity has moved the method in 2017, + and Unity's assembly updater is not able to fix it for you. This searches for a proper LoadImage method in multiple locations, and also handles type name conflicts. + + + + + Crops a Texture2D into a new Texture2D. + + + + + Resizes a texture by blitting, this allows you to resize unreadable textures. + + + + + Converts a Sprite to a Texture2D. + + + + + + + Categories of units. A unit value can only be converted to another of the same category. + + + + + Tools for converting between units, for example, converting from inches to meters. + + + + + + + Gets all UnitInfo registered, both built-in and custom. + + Enumerable of both built-in and custom units. + + + + Gets the UnitInfo for the given Units enum value. + + Units enum value. + UnitInfo for the unit. + Throws for invalid unit input. + + + + Gets the UnitInfo with the corrosponding name. + + The name of the unit. + UnitInfo for the name. + Throws when no unit with the given name is found. + + + + Finds the UnitInfo that best fits the given symbol within the given category. + + The symbol to find a unit for. + The category to look for units within. + The UnitInfo that best matches the given symbol. + Throws when no match was found. + + + + Gets the UnitInfo for the given Units enum value. + + Units enum value. + The UnitInfo matching the given unit value. + true when a UnitInfo was found. Otherwise false. + + + + Gets the UnitInfo with the given name. + + The name of the unit. + The UnitInfo matching the given name. + true when a UnitInfo was found. Otherwise false. + + + + Finds the UnitInfo that best fits the given symbol within the given category. + + The symbol to find a unit for. + The category to look for units within. + The UnitInfo that best matches the given symbol. + true when a UnitInfo was found. Otherwise false. + + + + Converts between two units. The units must be of the same category. + + The value to convert. Should be in the from units. + The unit to convert the value from. value should be in this unit. + To unit to convert the value to. Must be the same category as from. + The value converted to to units. + Throws when either 'from' or 'to' units are invalid, or when the units are of different categories. + + + decimal meters = 5m; + decimal centimeters = ConvertUnitsFromTo(meters, Units.Meter, Units.Centimeter); + // centimeters = 500 + + + + + + Converts between two units. The units must be of the same category. + + The value to convert. Should be in the fromUnitInfo units. + The unit to convert the value from. value should be in this unit. + To unit to convert the value to. Must be the same category as fromUnitInfo. + The value converted to toUnitInfo units. + Throws when either 'fromUnitInfo' or 'toUnitInfo' units are invalid, or when the units are of different categories. + + + decimal meters = 5m; + decimal centimeters = ConvertUnitsFromTo(meters, meterUnitInfo, centimeterUnitInfo); + // centimeters = 500 + + + + + + Converts between two units. The units must be of the same category. + + The value to convert. Should be in the from units. + The unit to convert the value from. value should be in this unit. + To unit to convert the value to. Must be the same category as from. + The value converted to to units. + true when the unit was successfully converted. Otherwise false. + + + decimal meters = 5m; + if (TryConvertUnitsFromTo(meters, Units.Meter, Units.Centimeter, out decimal centimeters) + { + // centimeters = 500 + } + + + + + + Converts between two units. The units must be of the same category. + + The value to convert. Should be in the fromUnitInfo units. + The unit to convert the value from. value should be in this unit. + To unit to convert the value to. Must be the same category as fromUnitInfo. + The value converted to toUnitInfo units. + true when the unit was successfully converted. Otherwise false. + + + decimal meters = 5m; + if (TryConvertUnitsFromTo(meters, meterUnitInfo, centimeterUnitInfo, out decimal centimeters)) + { + // centimeters = 500 + } + + + Throws if either fromUnitInfo or toUnitInfo is null. + + + + Indicates whether or not a value can be converted between the given a and b units. + + Unit a. + Unit b. + true if both units have the same category. Otherwise false. + + + + Indicates whether or not a value can be converted between the given a and b units. + + Unit a. + Unit b. + true if both units have the same category. Otherwise false. + + + + Adds a custom unit to the UnitNumberUtility, that can also be used with the . + Call this using InitializeOnLoad or InitializeOnLoadMethod. + + The name of the unit. Duplicate names are not allowed. + Symbols used for the unit. First value in the array will be used as the primary symbol. Atleast 1 value required. Duplicate symbols are not allowed within the same category. + The category of the unit. Units can only be converted to another of the same category. Custom categories are allowed. + The multiplier to convert the unit from the base value. For example, meters are the base unit of the distance category, therefore centimeters have a multipler of 100. + + Example of adding centimeters as a custom unit. + + UnitNumberUtility.AddCustomUnit("Centimeter", new string[]{ "cm" }, "Distance", 100m); + + + + + + Adds a custom unit to the UnitNumberUtility, that can also be used with the . + Call this using InitializeOnLoad or InitializeOnLoadMethod. + + The name of the unit. Duplicate names are not allowed. + Symbols used for the unit. First value in the array will be used as the primary symbol. Atleast 1 value required. Duplicate symbols are not allowed within the same category. + The category of the unit. Units can only be converted to another of the same category. Custom categories are allowed. + The multiplier to convert the unit from the base value. For example, meters are the base unit of the distance category, therefore centimeters have a multipler of 100. + + Example of adding centimeters as a custom unit. + + UnitNumberUtility.AddCustomUnit("Centimeter", new string[]{ "cm" }, UnitCategory.Distance, 100m); + + + + + + Adds a custom unit to the UnitNumberUtility, that can also be used with the . + This overload allows for custom conversion methods but, if possible, the multiplier overloads should be prefered. + Call this using InitializeOnLoad or InitializeOnLoadMethod. + + The name of the unit. Duplicate names are not allowed. + Symbols used for the unit. First value in the array will be used as the primary symbol. Atleast 1 value required. Duplicate symbols are not allowed within the same category. + The category of the unit. Units can only be converted to another of the same category. Custom categories are allowed. + Method for converting a given value of the custom unit to the base unit. For example, for centimeter, use: x => x / 100m;. + Method for converting a given value of the base unit to the custom unit. For example, for centimeter, use: x => x * 100m;. + + Example of adding centimeters as a custom unit. + + UnitNumberUtility.AddCustomUnit("Centimeter", new string[]{ "cm" }, "Distance", x => x / 100m, x = > x * 100m); + + + + + + Adds a custom unit to the UnitNumberUtility, that can also be used with the . + This overload allows for custom conversion methods but, if possible, the multiplier overloads should be prefered. + Call this using InitializeOnLoad or InitializeOnLoadMethod. + + The name of the unit. Duplicate names are not allowed. + Symbols used for the unit. First value in the array will be used as the primary symbol. Atleast 1 value required. Duplicate symbols are not allowed within the same category. + The category of the unit. Units can only be converted to another of the same category. Custom categories are allowed. + Method for converting a given value of the custom unit to the base unit. For example, for centimeter, use: x => x / 100m;. + Method for converting a given value of the base unit to the custom unit. For example, for centimeter, use: x => x * 100m;. + /// + Example of adding centimeters as a custom unit. + + UnitNumberUtility.AddCustomUnit("Centimeter", new string[]{ "cm" }, UnitCategory.Distance, x => x / 100m, x = > x * 100m); + + + + + + Object describing units, including name, symbols and how to convert it to other units. + + + + + Name of the unit. + + + + + Symbols of the unit. First symbol is considered the primary symbol. + + + + + The category of the unit. Units can only be converted within the same category. + + + + + Multiplier for converting from the base unit. + + + + + Custom method for converting from the base unit. + + + + + Custom method for converting to the base unit. + + + + + Indicates whether the UnitInfo should use the multiplier or the ConvertFromBase and ConvertToBase methods. + + + + + AssemblyTypeFlags is a bitmask used to filter types and assemblies related to Unity. + + + + + + Excludes all types. + + + + + UserTypes includes all custom user scripts that are not located in an editor or plugin folder. + + + + + PluginTypes includes all types located in the plugins folder and are not located in an editor folder. + + + + + UnityTypes includes all types depended on UnityEngine and from UnityEngine, except editor, plugin and user types. + + + + + UserEditorTypes includes all custom user scripts that are located in an editor folder but not in a plugins folder. + + + + + PluginEditorTypes includes all editor types located in the plugins folder. + + + + + UnityEditorTypes includes all editor types that are not user editor types nor plugin editor types. + + + + + OtherTypes includes all other types that are not depended on UnityEngine or UnityEditor. + + + + + CustomTypes includes includes all types manually added to the Unity project. + This includes UserTypes, UserEditorTypes, PluginTypes and PluginEditorTypes. + + + + + GameTypes includes all assemblies that are likely to be included in builds. + This includes UserTypes, PluginTypes, UnityTypes and OtherTypes. + + + + + EditorTypes includes UserEditorTypes, PluginEditorTypes and UnityEditorTypes. + + + + + All includes UserTypes, PluginTypes, UnityTypes, UserEditorTypes, PluginEditorTypes, UnityEditorTypes and OtherTypes. + + + + + A utility class for finding types in various asssembly. + + + + + Gets an of all assemblies in the current . + + An of all assemblies in the current . + + + + Gets the for a given assembly. + + The assembly. + The for a given assembly. + is null. + + + + Determines whether an assembly is depended on another assembly. + + The assembly. + The other assembly. + + true if has a reference in or is the same as . + + is null. + is null. + + + + Determines whether the assembly module is a of type . + + The assembly. + + true if the specified assembly of type ; otherwise, false. + + assembly + + + + Gets the full file path to a given assembly's containing directory. + + The assembly. + The full file path to a given assembly's containing directory, or Null if no file path was found. + is Null. + + + + Gets the full directory path to a given assembly. + + The assembly. + The full directory path in which a given assembly is located, or Null if no file path was found. + + + + Gets the type. + + The full name of the type, with or without any assembly information. + + + + Get types from the current AppDomain with a specified filter. + + The filters. + Types from the current AppDomain with the specified filters. + + + + Get types from the current AppDomain with a specified filter. + + The filters. + Types from the current AppDomain with the specified filters. + + + + Find members of the given type, while providing good error messages based on the following search filters provided. + See for more information. + + + + + MemberFinder is obsolete, and has been replacted by and . + Use cases that do not fit those utlities should use manual reflection that is hand-optimized for the best performance in the given case. + + MemberFinder was a utility class often used by Odin drawers to find fields, methods, and + properties while providing good user-friendly error messages based on the search criteria. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Find members of the given type, while providing good error messages based on the following search filters provided. + + + + + Find members of the given type, while providing good error messages based on the following search filters provided. + + + + + Can be true for both fields, properties and methods. + + + + + + Exclude members found in base-types. + + + + + Only include methods with the following parameter. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Only include methods with the following parameters. + Calling this will also exclude fields and properties. + Parameter type inheritance is supported. + + + + + Determines whether [has return type] [the specified return type]. + + + + + Can be true for both fields, properties and methods. + + + + + Calls IsField() and IsProperty(). + + + + + Only include static members. By default, both static and non-static members are included. + + + + + Only include non-static members. By default, both static and non-static members are included. + + + + + Specify the name of the member. + + + + + Excludes fields and methods if nether IsField() or IsMethod() is called. Otherwise includes properties. + By default, all member types are included. + + + + + Excludes fields and properties if nether IsField() or IsProperty() is called. Otherwise includes methods. + By default, all member types are included. + + + + + Excludes properties and methods if nether IsProperty() or IsMethod() is called. Otherwise includes fields. + By default, all member types are included. + + + + + Excludes non-public members if IsNonPublic() has not yet been called. Otherwise includes public members. + By default, both public and non-public members are included. + + + + + Excludes public members if IsPublic() has not yet been called. Otherwise includes non-public members. + By default, both public and non-public members are included. + + + + + Excludes fields and properties, and only includes methods with a return type of void. + + + + + Gets the member based on the search filters provided + Returns null if no member was found. + + + + + Gets the member based on the search filters provided, and provides a proper error message if no members was found. + + + + + Gets the member based on the search filters provided, and provides a proper error message if no members was found. + + + + + Try gets the member based on the search filters provided, and provides a proper error message if no members was found. + + + + + Try gets the member based on the search filters provided, and provides a proper error message if no members was found. + + + + + Try gets all members based on the search filters provided, and provides a proper error message if no members was found. + + + + + Gets or sets the width of the col. + + + + + Gets or sets the minimum width. + + + + + Gets a value indicating whether the width should be preserved when the table itself gets resiszed. + + + + + Gets a value indicating whether this is resizable. + + + + + This class contains utility methods for subscribing to various UnityEditor events reliably and safely across all Odin-supported versions of Unity. + + + + + Sometimes, someone accidentally overrides a delay action subscription to + by setting the value instead of using the += operator as should be done, + which can be done because in many versions of Unity it is a field, and not an event. + (In some versions of Unity it is an event, though, and in this case, this method acts as a wrapper + to subscribe reliably, no matter the nature of the backing event.) + This method subscribes to a lot of different callbacks, in the hopes of catching at least one. + + As opposed to , this method is safe to call from any thread, and will + delay the actual subscription to a safe time. + + + + + Sometimes, an idiot overrides a delay action subscription to , + which can be done because the people at Unity didn't know what events were once upon a time. + This method subscribes to a lot of different callbacks, in the hopes of catching at least one. + + + + + Sometimes, an idiot overrides a delay action subscription to , + which can be done because the people at Unity didn't know what events were once upon a time. + This method subscribes to a lot of different callbacks, in the hopes of catching at least one. + + + + + In 2019.1+, this event subscribes to SceneView.duringSceneGui. In 2018.4 and lower, it subscribes to SceneView.onSceneGUIDelegate. + + + + + In 2020.1, Unity changed EditorApplication.delayCall from a field to an event, meaning + we now have to use reflection to access it consistently across all versions of Unity. + + + + diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml.meta new file mode 100644 index 0000000..03f29c1 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5c65184932ff4fd48a343e236025096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll new file mode 100644 index 0000000..8201866 Binary files /dev/null and b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll differ diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll.meta new file mode 100644 index 0000000..44c2d22 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 4873f2a8bdae42baa0406e8a61366ca1 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml new file mode 100644 index 0000000..84cb6c5 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml @@ -0,0 +1,3713 @@ + + + + Sirenix.Utilities + + + + + Extension methods for the UnityEngine.Color type. + + + + + Lerps between multiple colors. + + The colors. + The t. + + + + + Moves the towards implementation for Color. + + From color. + To color. + The maximum delta. + + + + Tries to parse a string to a Color. The following formats are supported: + "new Color(0.4, 0, 0, 1)", "#FFEEBBFF", "#FFEECC", "FFEEBBFF", "FFEECC" + + The color string. + The color. + Returns true if the parse was a success. + + + + Converts a color to a string formatted to c# + + The color. + new Color(r, g, b, a) + + + + Pows the color with the specified factor. + + The color. + The factor. + + + + Normalizes the RGB values of the color ignoring the alpha value. + + The color. + + + + Gets the perceived luminosity of a given . + + The current . + Determines if the Color.a value should impact the result. + The float value representing the luminosity. + + + + Delegate method extensions. + + + + + Memoizes the specified func - returns the memoized version + + + + + Memoizes the specified func - returns the memoized version + + + + + FieldInfo method extensions. + + + + + Determines whether the specified field is an alias. + + The field to check. + + true if the specified field is an alias; otherwise, false. + + + + + Returns the original, backing field of an alias field if the field is an alias. + + The field to check. + /// if set to true an exception will be thrown if the field is not aliased. + + The field was not aliased; this only occurs if throwOnNotAliased is true. + + + + Garbage free enumerator methods. + + + + + Garbage free enumerator for lists. + + + + + Garbage free enumerator for dictionaries. + + + + + Garbage free enumator for dictionary values. + + + + + Garbage free enumerator for hashsets. + + + + + List iterator. + + + + + Creates a list iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Hashset iterator. + + + + + Creates a hashset iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Dictionary iterator. + + + + + Creates a dictionary iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Dictionary value iterator. + + + + + Creates a dictionary value iterator. + + + + + Gets the enumerator. + + + + + Gets the current value. + + + + + Moves to the next value. + + + + + Disposes the iterator. + + + + + Various LinQ extensions. + + + + + Calls an action on each item before yielding them. + + The collection. + The action to call for each item. + + + + Perform an action on each item. + + The source. + The action to perform. + + + + Perform an action on each item. + + The source. + The action to perform. + + + + Convert each item in the collection. + + The collection. + Func to convert the items. + + + + Convert a collection to an immutable list. + + The collection. + + + + Add an item to the beginning of a collection. + + The collection. + Func to create the item to prepend. + + + + Add an item to the beginning of a collection. + + The collection. + The item to prepend. + + + + Add a collection to the beginning of another collection. + + The collection. + The collection to prepend. + + + + Add an item to the beginning of another collection, if a condition is met. + + The collection. + The condition. + Func to create the item to prepend. + + + + Add an item to the beginning of another collection, if a condition is met. + + The collection. + The condition. + The item to prepend. + + + + Add a collection to the beginning of another collection, if a condition is met. + + The collection. + The condition. + The collection to prepend. + + + + Add an item to the beginning of another collection, if a condition is met. + + The collection. + The condition. + Func to create the item to prepend. + + + + Add an item to the beginning of another collection, if a condition is met. + + The collection. + The condition. + The item to prepend. + + + + Add a collection to the beginning of another collection, if a condition is met. + + The collection. + The condition. + The collection to prepend. + + + + Add an item to the beginning of another collection, if a condition is met. + + The collection. + The condition. + Func to create the item to prepend. + + + + Add an item to the beginning of another collection, if a condition is met. + + The collection. + The condition. + The item to prepend. + + + + Add a collection to the beginning of another collection, if a condition is met. + + The collection. + The condition. + The collection to prepend. + + + + Add an item to the end of a collection. + + The collection. + Func to create the item to append. + + + + Add an item to the end of a collection. + + The collection. + The item to append. + + + + Add a collection to the end of another collection. + + The collection. + The collection to append. + + + + Add an item to the end of a collection if a condition is met. + + The collection. + The condition. + Func to create the item to append. + + + + Add an item to the end of a collection if a condition is met. + + The collection. + The condition. + The item to append. + + + + Add a collection to the end of another collection if a condition is met. + + The collection. + The condition. + The collection to append. + + + + Add an item to the end of a collection if a condition is met. + + The collection. + The condition. + Func to create the item to append. + + + + Add an item to the end of a collection if a condition is met. + + The collection. + The condition. + The item to append. + + + + Add a collection to the end of another collection if a condition is met. + + The collection. + The condition. + The collection to append. + + + + Returns and casts only the items of type . + + The collection. + + + + Adds a collection to a hashset. + + The hashset. + The collection. + + + + Returns true if the list is either null or empty. Otherwise false. + + The list. + + + + Sets all items in the list to the given value. + + The list. + The value. + + + + Adds the elements of the specified collection to the end of the IList<T>. + + + + + Sorts an IList + + + + + Sorts an IList + + + + + Various list extension methods. + + + + + Increases or decrease the number of items in the list to the specified count. + + The list. + The new length. + + + + Increases or decrease the number of items in the list to the specified count. + + The list. + The new length. + Value of new elements. + + + + Increases or decrease the number of items in the list to the specified count. + + The list. + The new length. + + + + Increases or decrease the number of items in the list to the specified count. + + The list. + The new length. + Value of new elements. + + + + MemberInfo method extensions. + + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this member + + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this member + + + + + Returns the first found custom attribute of type T on this member + Returns null if none was found + + + + + Returns the first found non-inherited custom attribute of type T on this member + Returns null if none was found + + + + + Gets all attributes of the specified generic type. + + The member. + + + + Gets all attributes of the specified generic type. + + The member. + If true, specifies to also search the ancestors of element for custom attributes. + + + + Gets all attribute instances defined on a MemeberInfo. + + The member. + + + + Gets all attribute instances on a MemberInfo. + + The member. + If true, specifies to also search the ancestors of element for custom attributes. + + + + If this member is a method, returns the full method name (name + params) otherwise the member name paskal splitted + + + + + Determines whether a FieldInfo, PropertyInfo or MethodInfo is static. + + The member. + + true if the specified member is static; otherwise, false. + + + + + + Determines whether the specified member is an alias. + + The member to check. + + true if the specified member is an alias; otherwise, false. + + + + + Returns the original, backing member of an alias member if the member is an alias. + + The member to check. + /// if set to true an exception will be thrown if the member is not aliased. + + The member was not aliased; this only occurs if throwOnNotAliased is true. + + + + Various extensions for MethodInfo. + + + + + Returns the specified method's full name "methodName(argType1 arg1, argType2 arg2, etc)" + Uses the specified gauntlet to replaces type names, ex: "int" instead of "Int32" + + + + + Returns a string representing the passed method parameters names. Ex "int num, float damage, Transform target" + + + + + Returns the specified method's full name. + + + + + Tests if a method is an extension method. + + + + + Determines whether the specified method is an alias. + + The method to check. + + true if the specified method is an alias; otherwise, false. + + + + + Returns the original, backing method of an alias method if the method is an alias. + + The method to check. + /// if set to true an exception will be thrown if the method is not aliased. + + The method was not aliased; this only occurs if throwOnNotAliased is true. + + + + Determines the type of operator. + + + + + + The == operator. + + + + + The != operator. + + + + + The + operator. + + + + + The - operator. + + + + + The * operator. + + + + + The / operator. + + + + + The < operator. + + + + + The > operator. + + + + + The <= operator. + + + + + The >= operator. + + + + + The % operator. + + + + + The >> operator. + + + + + The << operator. + + + + + The & operator. + + + + + The | operator. + + + + + The ^ operator. + + + + + The ~ operator. + + + + + The && operator. + + + + + The || operator. + + + + + The ! operator. + + + + + DirectoryInfo method extensions. + + + + + Gets the name of the directory. Always returns forward slash seperators as opposed to Path.GetDirectoryName(). + + + + + Determines whether the directory has a given directory in its hierarchy of children. + + The parent directory. + The sub directory. + + + + Finds a parent directory with a given name, or null if no such parent directory exists. + + + + + Returns a value indicating whether or not a path can be made relative to another. + + The parent path. + The path to make relative to the parent path. + A value indicating if the path can be made relative to the parent path. + + + + Returns a path string to path that is relative to the parent path. + + The parent path. + The path to make relative to the parent path. + A relative path from parent path to path. + + + + Tries to make a path that is relative from parent path to path. + + The parent path. + The path to make relative to the parent path. + A relative path from parent path to path. null if no relative path could be made. + A value indicating if the method succeeded in making a relative path. + + + + Combines two paths, and replaces all backslases with forward slash. + + + + + PropertyInfo method extensions. + + + + + Determines whether a property is an auto property. + + + + + Determines whether the specified property is an alias. + + The property to check. + + true if the specified property is an alias; otherwise, false. + + + + + Returns the original, backing property of an alias property if the property is an alias. + + The property to check. + /// if set to true an exception will be thrown if the property is not aliased. + + The property was not aliased; this only occurs if throwOnNotAliased is true. + + + + Defines a collection of handy Rect transformation methods, that can chained together for complex behaviour. + Note that only the TakeX method defined here actually change the original Rect; the rest instead return a new transformed Rect. + + + + + Returns a Rect with the specified width. + + The original Rect. + The desired width of the new Rect. + + + + Returns a Rect with the specified height. + + The original Rect. + The desired height of the new Rect. + + + + Returns a Rect with the specified size. + + The original Rect. + The desired width of the new Rect. + The desired height of the new Rect. + + + + Returns a Rect with the specified size. + + The original Rect. + The desired width and height of the new Rect. + + + + Returns a Rect with the specified size. + + The original Rect. + The desired size of the new Rect. + + + + Returns a Rect that has been inserted by the specified amount on the X-axis. + + The original Rect. + The desired padding. + + + + Returns a Rect that has been inserted by the specified amount on the X-axis. + + The original Rect. + Desired padding on the left side. + Desired padding on the right side. + + + + Returns a Rect that has been inserted by the specified amount on the Y-axis. + + The original Rect. + The desired padding. + + + + Returns a Rect that has been inserted by the specified amount on the Y-axis. + + The original Rect. + The desired padding on the top. + The desired padding on the bottom. + + + + Returns a Rect that has been inserted by the specified amount. + + The original Rect. + The desired padding. + + + + Returns a Rect that has been inserted by the specified amount. + + The original Rect. + The desired horizontal padding. + The desired vertical padding. + + + + Returns a Rect that has been inserted by the specified amount. + + The original Rect. + The desired padding on the left. + The desired padding on the right. + The desired padding on the top. + The desired padding on the bottom. + + + + Returns a Rect, with the specified width, that has been aligned to the left of the original Rect. + + The original Rect. + The desired width of the new Rect. + + + + Returns a Rect, with the specified width, that has been aligned to horizontal center of the original Rect. + + The original Rect. + The desired width of the new Rect. + + + + Returns a Rect, with the specified width and height in the center of the provided rect. + + The original Rect. + The desired width of the new Rect. + The desired height of the new Rect. + + + + Returns a Rect, with the specified width, that has been aligned to the right of the original Rect. + + The original Rect. + The desired width of the new Rect. + + + + Returns a Rect, with the specified width, that has been aligned to the right of the original Rect. + + + + + Returns a Rect, with the specified height, that has been aligned to the top of the original Rect. + + The original Rect. + The desired height of the new Rect. + + + + Returns a Rect, with the specified height, that has been aligned to the vertical middle of the original Rect. + + The original Rect. + The desired height of the new Rect. + + + + Returns a Rect, with the specified height, that has been aligned to the bottom of the original Rect. + + The original Rect. + The desired height of the new Rect. + + + + Returns a Rect, with the specified width, that has been aligned horizontally to the center of the original rect. + + The original Rect. + The desired width of the new Rect. + + + + Returns a Rect, with the specified height, that has been aligned vertically to the center of the original rect. + + The original Rect. + The desired height of the new Rect. + + + + Returns a Rect, with the specified width and height, that has been aligned horizontally and vertically to the center of the original rect. + + The original Rect. + The desired width and height of the new Rect. + + + + Returns a Rect, with the specified width and height, that has been aligned horizontally and vertically to the center of the original rect. + + The original Rect. + The desired width of the new Rect. + The desired height of the new Rect. + + + + Returns a Rect that has been expanded by the specified amount. + + The original Rect. + The desired expansion. + + + + Returns a Rect that has been expanded by the specified amount. + + The original Rect. + The desired expansion on the X-axis. + The desired expansion on the Y-axis. + + + + Returns a Rect that has been expanded by the specified amount. + + The original Rect. + The desired expansion on the left. + The desired expansion on the right. + The desired expansion on the top. + The desired expansion on the bottom. + + + + Splits a Rect horizontally into the specified number of sub-rects, and returns a sub-rect for the specified index. + + The original Rect. + The index for the subrect. Includes 0, and excludes count. + The amount of subrects the Rect should be split into. + + + + Splits a Rect vertically into the specified number of sub-rects, and returns a sub-rect for the specified index. + + The original Rect. + The index for the subrect. Includes 0, and excludes count. + The amount of subrects the Rect should be split into. + + + + Splits a Rect into a grid from left to right and then down. + + The original rect. + The width of a grid cell. + The height of a grid cell. + The index of the grid cell. + + + + + Splits a Rect into a grid from left to right and then down. + + + + + Moves a Rect to the specified center X position. + + The original Rect. + The desired center x position. + + + + Moves a Rect to the specified center Y position. + + The desired original Rect. + The desired desired center y position. + + + + Moves a Rect to the specified center position. + + The original Rect. + The desired center X position. + The desired center Y position. + + + + Moves a Rect to the specified center position. + + The original Rect. + The desired center position. + + + + Moves a Rect to the specified position. + + The orignal Rect. + The desired position. + + + + Resets a Rect's position to zero. + + The original Rect. + + + + Moves a Rect's position by the specified amount. + + The original Rect. + The change in position. + + + + Moves a Rect's position by the specified amount. + + The original Rect. + The x. + The y. + + + + Sets a Rect's X position. + + The original Rect. + The desired X position. + + + + Adds to a Rect's X position. + + The original Rect. + The value to add. + + + + Subtracts from a Rect's X position. + + The original Rect. + The value to subtract. + + + + Sets a Rect's Y position. + + The original Rect. + The desired Y position. + + + + Adds to a Rect's Y position. + + The original Rect. + The value to add. + + + + Subtracts a Rect's Y position. + + The original Rect. + The value to subtract. + + + + Sets the min position of a Rect. + + The original Rect. + The desired min position. + + + + Adds to a Rect's min position. + + The original rect. + The value to add. + + + + Subtracts a Rect's min position. + + The original Rect. + The vlaue to subtract. + + + + Sets a Rect's max position. + + The original Rect. + The desired max position. + + + + Adds to a Rect's max position. + + The original Rect. + The value to add. + + + + Subtracts a Rect's max position. + + The original Rect. + The value to add. + + + + Sets a Rect's X min position. + + The original Rect. + The desired min X position. + + + + Adds to a Rect's X min position. + + The original Rect. + The value to add. + + + + Subtracts from a Rect's X min position. + + The original Rect. + The value to subtract. + + + + Sets a Rect's X max position. + + The original Rect. + The desired X max position. + + + + Adds to a Rect's X max position. + + The original Rect. + The value to add. + + + + Subtracts a Rect's X max position. + + The original Rect. + The value to subtract. + + + + Sets a Rect's Y min position. + + The original Rect. + The desired Y min. + + + + Adds to a Rect's Y min position. + + The original Rect. + The value to add. + + + + Subtracts a Rect's Y min position. + + The original Rect. + The value to subtract. + + + + + Sets a Rect's Y max position. + + The original Rect. + The desired Y max position. + + + + Adds to a Rect's Y max position. + + The original Rect. + The value to add. + + + + Subtracts from a Rect's Y max position. + + The original Rect. + The value to subtract. + + + + Sets a Rect's width, if it is less than the specified value. + + The original Rect. + The desired min width. + + + + Sets a Rect's width, if it is greater than the specified value. + + The original Rect. + The desired max width. + + + + Sets a Rect's height, if it is less than the specified value. + + The original Rect. + The desired min height. + + + + Sets a Rect's height, if it is greater than the specified value. + + The original Rect. + The desired max height. + + + + Expands a rect to contain a given position. + + The original Rect. + The position to expand the rect towards. + + + + Determines if an is a placeholder; usually (0, 0, 1, 1) in Layout. + + The original . + true if the is equal to (0, 0, 0, 0) or (0, 0, 1, 1); otherwise false. + + + + String method extensions. + + + + + Eg MY_INT_VALUE => MyIntValue + + + + + Returns whether or not the specified string is contained with this string + + + + + Ex: "thisIsCamelCase" -> "This Is Camel Case" + + + + + Returns true if this string is null, empty, or contains only whitespace. + + The string to check. + true if this string is null, empty, or contains only whitespace; otherwise, false. + + + + O(n*m) - Use with care. + + + + + Type method extensions. + + + + + Type name alias lookup. + + + + + Checks whether a given string is a valid CSharp identifier name. This also checks full type names including namespaces. + + The identifier to check. + + + + Determines whether a type can be casted to another type. + + From. + To. + if set to true an implicit or explicit operator must be defined on the given type. + + + + If a type can be casted to another type, this provides a function to manually convert the type. + + From. + To. + if set to true an implicit or explicit operator must be defined on the given type. + + + + If a type can be casted to another type, this provides a function to manually convert the type. + + if set to true an implicit or explicit operator must be defined on the given type. + + + + If a type can be casted to another type, this provides the method info of the method in charge of converting the type. + + From. + To. + if set to true an implicit or explicit operator must be defined on the given type. + + + + Gets an equality comparer delegate used to compare the equality of values of a given type. In order, this will be: + + 1. The == operator, if one is defined on the type. + 2. A delegate that uses , if the type implements that interface. + 3. .NET's own + + + Note that in the special case of the type , a special equality comparer is returned that only checks whether all the Quaternion components are equal. + This is because, by default, Quaternion's equality operator is broken when operating on invalid quaternions; "default(Quaternion) == default(Quaternion)" evaluates to false, and this causes a multitude of problems. + Special delegates are also returned for float and double, that consider float.NaN to be equal to float.NaN, and double.NaN to be equal to double.NaN. + + + + + Gets the first attribute of type T. Returns null in the no attribute of type T was found. + + The type. + If true, specifies to also search the ancestors of element for custom attributes. + + + + Determines whether a type implements or inherits from another type. + + The type. + To. + + + + Determines whether a type implements an open generic interface or class such as IList<> or List<>. + + Type of the candidate. + Type of the open generic type. + + + + + Determines whether a type implements an open generic interface such as IList<>. + + Type of the candidate. + Type of the open generic interface. + + Type " + openGenericInterfaceType.Name + " is not a generic type definition and an interface. + + + + Determines whether a type implements an open generic class such as List<>. + + Type of the candidate. + Type of the open generic interface. + + + + Gets the generic arguments of an inherited open generic class or interface. + + Type of the candidate. + The open generic type to get the arguments of. + + + + Gets the generic arguments of an inherited open generic class. + + Type of the candidate. + Type of the open generic class. + + + + Gets the generic arguments of an inherited open generic interface. + + Type of the candidate. + Type of the open generic interface. + + + + Gets the MethodInfo of a specific operator kind, with the given left and right operands. This overload is *far* faster than any of the other GetOperatorMethod implementations, and should be used whenever possible. + + + + + Gets the MethodInfo of a specific operator type. + + + + + Gets the MethodInfo of a specific operator type. + + + + + Gets all members from a given type, including members from all base types if the flag isn't set. + + + + + Gets all members from a given type, including members from all base types. + + + + + Gets all members of a specific type from a type, including members from all base types, if the flag isn't set. + + + + + Gets the generic type definition of an open generic base type. + + + + + Gets the generic type definition of an open generic base type. + + + + + Returns a lazy enumerable of all the base types of this type including interfaces and classes + + + + + Returns a lazy enumerable of all the base classes of this type + + + + + Returns a nicely formatted name of a type. + + + + + Returns a nicely formatted full name of a type. + + + + + Gets the name of the compilable nice. + + The type. + + + + Gets the full name of the compilable nice. + + The type. + + + + Returns the first found custom attribute of type T on this type + Returns null if none was found + + + + + Returns the first found non-inherited custom attribute of type T on this type + Returns null if none was found + + + + + Gets all attributes of type T. + + The type. + + + + Gets all attributes of type T. + + The type + If true, specifies to also search the ancestors of element for custom attributes. + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this type + + + + + Returns true if the attribute whose type is specified by the generic argument is defined on this type + + + + + Determines whether a type inherits or implements another type. Also include support for open generic base types such as List<>. + + + + + + Determines whether a type inherits or implements another type. Also include support for open generic base types such as List<>. + + + + + + + Gets the number of base types between given type and baseType. + + + + + Determines whether a method has the specified parameter types. + + + + + FieldInfo will return the fieldType, propertyInfo the PropertyType, MethodInfo the return type and EventInfo will return the EventHandlerType. + + The MemberInfo. + + + + Gets the value contained in a given . Currently only and is supported. + + The to get the value of. + The instance to get the value from. + The value contained in the given . + Can't get the value of the given type. + + + + Sets the value of a given MemberInfo. Currently only and is supported. + + The to set the value of. + The object to set the value on. + The value to set. + + Property has no setter + or + Can't set the value of the given type. + + + + // + Tries to infer a set of valid generic parameters for a generic type definition, given a subset of known parameters. + + The generic type definition to attempt to infer parameters for. + The inferred parameters, if inferral was successful. + The known parameters to infer from. + True if the parameters could be inferred, otherwise, false. + + genericTypeDefinition is null + or + knownParameters is null + + The genericTypeDefinition parameter must be a generic type definition. + + + + Checks whether an array of types satisfy the constraints of a given generic type definition. + If this method returns true, the given parameters can be safely used with with the given generic type definition. + + The generic type definition to check. + The parameters to check validity for. + + genericType is null + or + types is null + + The genericType parameter must be a generic type definition. + + + + Checks whether an array of types satisfy the constraints of a given generic method definition. + If this method returns true, the given parameters can be safely used with with the given generic method definition. + + The generic method definition to check. + The parameters to check validity for. + + genericType is null + or + types is null + + The genericMethod parameter must be a generic method definition. + + + + Before calling this method we must ALWAYS hold a lock on the GenericConstraintsSatisfaction_LOCK object, as that is an implicit assumption it works with. + + + + + Not yet documented. + + + + + Formats a string with the specified generic parameter constraints on any given type. Example output: where T : class + + + + + Determines whether a generic type contains the specified generic argument constraints. + + The type. + The generic argument types. + + + + Determines whether a type is a fully constructed generic type. + + + + + Determines whether a type is nullable by ensuring the type is neither a PrimitiveType, ValueType or an Enum. + + + + + Gets the enum bitmask in a ulong. + + enumType + + + + Gets a value indicating if the string is a reserved C# keyword. + + The identifier to check. + true if the string is a C# keyword. Otherwise false. + + + + Determines if a given has a default constructor. + A type is considered to have a default constructor if: It is a string, if it is an array, if it is a value type or if it has a public parameterless constructor. + + The to investigate. + true if a default constructor has been found; otherwise false. + + + + Attempts to instantiate an object of a given with it's default constructor. If no default constructor is found then it attempts to find the most suitable alternative constructor and instantiate the with default parameters. + + The to instantiate. + Determines if the use of is preferred over a non-default constructor call. + The instantiated object or null if no suitable alternative constructor is found. + + + + Weighs multiple constructors for a given type, and attempts to find the most ideal constructor. This will ignore any unmanaged constructors. + + The to weigh the constructors of. + The to search for the constructors; means only find the public ones. + The most ideal based on the scoring system. + The scoring system prefers value types over reference types (adjusted for default values), + it provides bonuses for empty constructors or constructors solely consisting of default values. + Lastly it considers the amount of parameters present in the constructor in the overall score. + + + + Checks if a given is unmanaged, by checking if it contains any , or parameters. + + The to validate. + true if the is unmanaged; otherwise false. + + + + Extends various Unity classes. + + + + + Determines whether a Unity object is null or "fake null", + without ever calling Unity's own equality operators. + This method is useful for checking if a Unity object is + null, destroyed or missing at times when it is not allowed + to call Unity's own equality operators, for example when + not running on the main thread. + + The Unity object to check. + True if the object is null, missing or destroyed; otherwise false. + + + + Contains utilities for operating on arrays. + + + + + Creates a new array with an added element. + + The element type of the array. + The array. + The value to add. + The new array. + The given array was null. + + + + Creates a new array with an element inserted at a given index. + + The element type of the array. + The array. + The index to insert at. + The value to insert. + The given array was null. + The index to insert at was out of range. + + + + Creates a new array with an element removed. + + The element type of the array. + The array. + The index to remove an element at. + + The given array was null. + The given index to remove an element at was out of range. + + + + Utility class for asset Guid script + + + + + Tries to update the Guid of a specified asset with the Guid from a specified script type. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Provides utilities for using the namespace. + + This class is due for refactoring. Use at your own peril. + + + + + Gets a value indicating whether emitting is supported on the current platform. + + + true if the current platform can emit; otherwise, false. + + + + + Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the field to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the field to set a value to. + The instance describing the field to create a setter for. + A delegate which sets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The instance describing the field to create a setter for. + A delegate which sets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the instance to get a value from. + The type of the field to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the field to get a value from. + The of the instance to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which gets the weakly typed value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The of the instance to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the instance to set a value on. + The type of the field to set a value to. + The instance describing the field to create a setter for. + A delegate which sets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the value of a field on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the field to set a value to. + Type of the instance. + The instance describing the field to create a setter for. + + A delegate which sets the value of the given field. + + The fieldInfo parameter is null. + Field cannot be static. + + + + Creates a delegate which sets the weakly typed value of a field on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + Type of the instance. + The instance describing the field to create a setter for. + + A delegate which sets the value of the given field. + + The fieldInfo parameter is null. + Field cannot be static. + + + + Creates a delegate which gets the weakly typed value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The of the instance to get a value from. + The instance describing the field to create a getter for. + A delegate which gets the value of the given field. + The fieldInfo parameter is null. + + + + Creates a delegate which sets the weakly typed value of a property on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + Type of the instance. + The instance describing the property to create a setter for. + + A delegate which sets the value of the given field. + + The fieldInfo parameter is null. + Property cannot be static. + + + + Creates a delegate which sets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the property to set a value to. + The instance describing the property to create a setter for. + A delegate which sets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a delegate which gets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the property to get a value from. + The instance describing the property to create a getter for. + A delegate which gets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a delegate which sets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to set the value. + + The type of the instance to set a value on. + The type of the property to set a value to. + The instance describing the property to create a setter for. + A delegate which sets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a delegate which gets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to get the value. + + The type of the instance to get a value from. + The type of the property to get a value from. + The instance describing the property to create a getter for. + A delegate which gets the value of the given property. + The propertyInfo parameter is null. + + + + Creates a fast delegate method which calls a given parameterless instance method and returns the result. + + The type of the class which the method is on. + The type which is returned by the given method info. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given parameterless static method. + + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given parameterless weakly typed instance method. + + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Not yet documented. + + + + + Creates a fast delegate method which calls a given weakly typed instance method with one argument and returns a value. + + The type of the result. + The type of the first argument. + The method info instance which is used. + + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + methodInfo + + Given method ' + methodInfo.Name + ' is static when it has to be an instance method. + or + Given method ' + methodInfo.Name + ' must return type + typeof(TResult) + . + or + Given method ' + methodInfo.Name + ' must have exactly one parameter. + or + The first parameter of the method ' + methodInfo.Name + ' must be of type + typeof(TArg1) + . + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Creates a fast delegate method which calls a given parameterless instance method. + + The type of the class which the method is on. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + Creates a fast delegate method which calls a given instance method with a given argument. + + The type of the class which the method is on. + The type of the argument with which to call the method. + The method info instance which is used. + A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke. + + + + This class encapsulates common combinations. + + + + + Search criteria encompassing all public and non-public members, including base members. + Note that you also need to specify either the Instance or Static flag. + + + + + Search criteria encompassing all public instance members, including base members. + + + + + Search criteria encompassing all non-public instance members, including base members. + + + + + Search criteria encompassing all public and non-public instance members, including base members. + + + + + Search criteria encompassing all public static members, including base members. + + + + + Search criteria encompassing all non-public static members, including base members. + + + + + Search criteria encompassing all public and non-public static members, including base members. + + + + + Search criteria encompassing all public instance members, excluding base members. + + + + + Search criteria encompassing all non-public instance members, excluding base members. + + + + + Search criteria encompassing all public and non-public instance members, excluding base members. + + + + + Search criteria encompassing all public static members, excluding base members. + + + + + Search criteria encompassing all non-public static members, excluding base members. + + + + + Search criteria encompassing all public and non-public static members, excluding base members. + + + + + Search criteria encompassing all members, including base and static members. + + + + + Search criteria encompassing all members (public and non-public, instance and static), including base members. + + + + + + A GlobalConfig singleton, automatically created and saved as a ScriptableObject in the project at the specified path. + This only happens if the UnityEditor is present. If it's not, a non-persistent ScriptableObject is created at run-time. + + + Remember to locate the path within a resources folder if you want the config file to be loaded at runtime without the Unity editor being present. + + + The asset path is specified by defining a . If no attribute is defined it will be saved in the root assets folder. + + + + + [GlobalConfig("Assets/Resources/MyConfigFiles/")] + public class MyGlobalConfig : GlobalConfig<MyGlobalConfig> + { + public int MyGlobalVariable; + } + + void SomeMethod() + { + int value = MyGlobalConfig.Instance.MyGlobalVariable; + } + + + + + + Gets a value indicating whether this instance has instance loaded. + + + + + Gets the singleton instance. + + + + + Tries to load the singleton instance. + + + + + Opens the config in a editor window. This is currently only used internally by the Sirenix.OdinInspector.Editor assembly. + + + + + Gets a value indicating whether this instance has instance loaded. + + + + + Gets the singleton instance. + + + + + This attribute is used by classes deriving from GlobalConfig and specifies the asset path for the generated config file. + + + + + + + Gets the full asset path including Application.dataPath. Only relevant if IsInResourcesFolder is false. + + + + + Gets the relative asset path. Only relevant if IsInResourcesFolder is false. + + + + + Gets the resources path. Only relevant if IsInResourcesFolder is true. + + + + + Whether the config should be associated with an asset in the project. If false, no config asset will be generated or loaded, and a new "temporary" config instance will be created for every reload. This is true by default. + + + + + Gets a value indicating whether this asset is located within a resource folder. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The relative asset. Remember to locate the path within a resources folder if you want the config file to be loaded at runtime without the Unity Editor. + + + + + GUILayoutOptions is a handy utility that provides cached GUILayoutOpion arrays based on the wanted parameters. + + + + + Most GUILayout and EditorGUILayout methods takes an optional "params GUILayoutOption[]" parameter. + Each time you call this, an array is allocated generating garbage. + + + // Generates garbage: + GUILayout.Label(label, GUILayout.Label(label, GUILayout.Width(20), GUILayout.ExpandHeight(), GUILayout.MaxWidth(300))); + + // Does not generate garbage: + GUILayout.Label(label, GUILayout.Label(label, GUILayoutOptions.Width(20).ExpandHeight().MaxWidth(300))); + + + + + + An EmptyGUIOption[] array with a length of 0. + + + + + A GUILayoutOptions instance with an implicit operator to be converted to a GUILayoutOption[] array. + + + + + + Gets or creates the cached GUILayoutOption array based on the layout options specified. + + + + + Option passed to a control to give it an absolute width. + + + + + Option passed to a control to give it an absolute height. + + + + + Option passed to a control to specify a maximum height. + + + + + Option passed to a control to specify a maximum width. + + + + + Option passed to a control to specify a minimum height. + + + + + Option passed to a control to specify a minimum width. + + + + + Option passed to a control to allow or disallow vertical expansion. + + + + + Option passed to a control to allow or disallow horizontal expansion. + + + + + Determines whether the instance is equals another instance. + + + + + Returns a hash code for this instance. + + + + + Option passed to a control to give it an absolute width. + + + + + Option passed to a control to give it an absolute height. + + + + + Option passed to a control to specify a maximum height. + + + + + Option passed to a control to specify a maximum width. + + + + + Option passed to a control to specify a minimum width. + + + + + Option passed to a control to specify a minimum height. + + + + + Option passed to a control to allow or disallow vertical expansion. + + + + + Option passed to a control to allow or disallow horizontal expansion. + + + + + Immutable hashset wraps another hashset, and allows for reading the inner hashset, without the ability to change it. + + + + + Creates an immutable hashset around another hashset. + + + + + Returns true if the item is contained in the list. + + The item's value. + + + + Gets the enumerator. + + + + + Gets the enumerator. + + + + + Interface for immutable list. + + + + + Interface for generic immutable list. + + + + + Index accessor. + + + + + Immutable list wraps another list, and allows for reading the inner list, without the ability to change it. + + + + + Creates an immutable list around another list. + + + + + Number of items in the list. + + + + + Immutable list cannot be changed directly, so it's size is always fixed. + + + + + Immutable list are always readonly. + + + + + Returns true if the inner list is synchronized. + + + + + Gets the sync root object. + + + + + Index accessor. + + Index. + + + + Returns true if the item is contained in the list. + + The item's value. + + + + Copy the list to an array, + + Target array. + Index. + + + + Copy the list to an array, + + Target array. + Index. + + + + Gets an enumerator. + + + + + Get the index of a value. + + The item's value. + + + + Immutable list cannot be edited. + + Index. + + + + Immutable list cannot be edited. + + Index. + Item. + + + + Immutable list cannot be edited. + + Item. + + + + Immutable list cannot be edited. + + + + + Immutable list cannot be edited. + + Item. + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Immutable list wraps another list, and allows for reading the inner list, without the ability to change it. + + + + + Creates an immutable list around another list. + + + + + Number of items in the list. + + + + + Immutable list are always readonly. + + + + + Index accessor. + + Index. + + + + Returns true if the item is contained in the list. + + + + + Copies the list to an array. + + + + + Gets an enumerator. + + + + + Gets the index of an item. + + + + + Collection of math function. + + + + + Distance from a point to a line. + + + + + Returns a smooth value between start and end based on t. + + First point. + Second point. + Position between 0 and 1. + + + + Returns a smooth value between start and end based on t. + + First point. + Second point. + Position between 0 and 1. + Number of interpolations to make. + + + + Returns the fractional of the value. + + The value to get the fractional of. + + + + Returns the fractional of the value. + + The value to get the fractional of. + + + + Returns the fractional of the value. + + The value to get the fractional of. + + + + Returns a value based on t, that bounces faster and faster. + + The value to bounce. + + + + Returns a smooth value between 0 and 1 based on t. + + Position between 0 and 1. + + + + Returns a smooth value between 0 and 1 based on t. + + Position between 0 and 1. + Number of interpolations to make. + + + + Returns an unclamped linear interpolation of two vectors. + + The first vector. + The second vector. + The interpolation factor. + + + + Returns an unclamped linear interpolation of two vectors. + + The first vector. + The second vector. + The interpolation factor. + + + + Returns a value that bounces between 0 and 1 based on value. + + The value to bounce. + + + + Returns a value that eases in elasticly. + + The value to ease in elasticly. + The amplitude. + The length. + + + + Pows each element of the vector. + + The vector. + The power. + + + + Returns a Vector2 with each element set to their respective sign. + + The vector to sign. + + + + Returns a Vector3 with each element set to their respective sign. + + The vector to sign. + + + + Returns a value that eases out elasticly. + + The value to ease out elasticly. + The amplitude. + The length. + + + + Returns a smooth value betweeen that peaks at t=0.5 and then comes back down again. + + A value between 0 and 1. + + + + Clamps the value of a Vector3. + + The vector to clamp. + The min value. + The max value. + + + + Clamps the value of a Vector2. + + The vector to clamp. + The min value. + The max value. + + + + Computes a hash for a byte array. + + The byte array. + + + + Gives a smooth path between a collection of points. + + The collection of point. + The current position in the path. 0 is at the start of the path, 1 is at the end of the path. + + + + Checks if two given lines intersect with one another and returns the intersection point (if + any) in an out parameter. + Source: http://stackoverflow.com/questions/3746274/line-intersection-with-aabb-rectangle. + Edited to implement Cohen-Sutherland type pruning for efficiency. + + Starting point of line a. + Ending point of line a. + Starting point of line b. + Ending point of line b. + + The out parameter which contains the intersection point if there was any. + + True if the two lines intersect, otherwise false. + + + + Returns the collision point between two infinite lines. + + + + + Distance from line to plane. + + Position of the plane. + Surface normal of the plane. + Origin of the line. + Line direction normal. + + + + Distance from ray to plane. + + The ray. + The plane. + + + + Rotates a Vector2 by an angle. + + The point to rotate. + The angle to rotate. + + + + Rotates a Vector2 around a point by an angle.. + + The point to rotate. + The point to rotate around. + The angle to rotate. + + + + Interpolates t between a and b to a value between 0 and 1 using a Hermite polynomial. + + The first value. + The second value. + The position value. + A smoothed value between 0 and 1. + + + + Interpolates t between a and b to a value between 0 and 1. + + The first value. + The second value. + The position value. + Linear value between 0 and 1. + + + + Wraps a value between min and max. + + The value to wrap. + The minimum value. + The maximum value. + + + + Wraps a value between min and max. + + The value to wrap. + The minimum value. + The maximum value. + + + + Wraps a value between min and max. + + The value to wrap. + The minimum value. + The maximum value. + + + + Rounds a number based on a mininum difference. + + The value to round. + The min difference. + The rounded value. + + + + Discards the least significant demicals. + + The value of insignificant decimals. + Value with significant decimals. + + + + Clamps and wraps an angle between two values. + + + + + Provides a methods of representing imaginary fields which are unique to serialization. + + We aggregate the FieldInfo associated with this member and return a mangled form of the name. + + + + + + The default fake name separator string. + + + + + Initializes a new instance of the class. + + The field to alias. + The name prefix to use. + + + + Initializes a new instance of the class. + + The field to alias. + The name prefix to use. + The separator string to use. + + + + Gets the aliased field. + + + The aliased field. + + + + + Gets the module in which the type that declares the member represented by the current is defined. + + + + + Gets a value that identifies a metadata element. + + + + + Gets the name of the current member. + + + + + Gets the class that declares this member. + + + + + Gets the class object that was used to obtain this instance of MemberInfo. + + + + + Gets the type of the field. + + + The type of the field. + + + + + Gets a RuntimeFieldHandle, which is a handle to the internal metadata representation of a field. + + + + + Gets the attributes. + + + The attributes. + + + + + When overridden in a derived class, returns an array of all custom attributes applied to this member. + + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. + + + + + When overridden in a derived class, returns an array of custom attributes applied to this member and identified by . + + The type of attribute to search for. Only attributes that are assignable to this type are returned. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied. + + + + + When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. + + The type of custom attribute to search for. The search includes derived types. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + True if one or more instances of or any of its derived types is applied to this member; otherwise, false. + + + + + Gets the value of the field. + + The object instance to get the value from. + The value of the field. + + + + When overridden in a derived class, sets the value of the field supported by the given object. + + The object whose field value will be set. + The value to assign to the field. + A field of Binder that specifies the type of binding that is desired (for example, Binder.CreateInstance or Binder.ExactBinding). + A set of properties that enables the binding, coercion of argument types, and invocation of members through reflection. If is null, then Binder.DefaultBinding is used. + The software preferences of a particular culture. + + + + Provides a methods of representing aliased methods. + + In this case, what we're representing is a method on a parent class with the same name. + + We aggregate the MethodInfo associated with this member and return a mangled form of the name. + The name that we return is "parentname+methodName". + + + + + + The default fake name separator string. + + + + + Initializes a new instance of the class. + + The method to alias. + The name prefix to use. + + + + Initializes a new instance of the class. + + The method to alias. + The name prefix to use. + The separator string to use. + + + + Gets the aliased method. + + + The aliased method. + + + + + Gets the custom attributes for the return type. + + + + + Gets a handle to the internal metadata representation of a method. + + + + + Gets the attributes associated with this method. + + + + + Gets the class that declares this member. + + + + + Gets the name of the current member. + + + + + Gets the class object that was used to obtain this instance of MemberInfo. + + + + + When overridden in a derived class, returns the MethodInfo object for the method on the direct or indirect base class in which the method represented by this instance was first declared. + + + A MethodInfo object for the first implementation of this method. + + + + + When overridden in a derived class, returns an array of all custom attributes applied to this member. + + true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. + + + + + When overridden in a derived class, returns an array of custom attributes applied to this member and identified by . + + The type of attribute to search for. Only attributes that are assignable to this type are returned. + true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied. + + + + + When overridden in a derived class, returns the flags. + + + The MethodImplAttributes flags. + + + + + When overridden in a derived class, gets the parameters of the specified method or constructor. + + + An array of type ParameterInfo containing information that matches the signature of the method (or constructor) reflected by this MethodBase instance. + + + + + When overridden in a derived class, invokes the reflected method or constructor with the given parameters. + + The object on which to invoke the method or constructor. If a method is static, this argument is ignored. If a constructor is static, this argument must be null or an instance of the class that defines the constructor. + A bitmask that is a combination of 0 or more bit flags from . If is null, this parameter is assigned the value ; thus, whatever you pass in is ignored. + An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects via reflection. If is null, the default binder is used. + An argument list for the invoked method or constructor. This is an array of objects with the same number, order, and type as the parameters of the method or constructor to be invoked. If there are no parameters, this should be null.If the method or constructor represented by this instance takes a ByRef parameter, there is no special attribute required for that parameter in order to invoke the method or constructor using this function. Any object in this array that is not explicitly initialized with a value will contain the default value for that object type. For reference-type elements, this value is null. For value-type elements, this value is 0, 0.0, or false, depending on the specific element type. + An instance of CultureInfo used to govern the coercion of types. If this is null, the CultureInfo for the current thread is used. (This is necessary to convert a String that represents 1000 to a Double value, for example, since 1000 is represented differently by different cultures.) + + An Object containing the return value of the invoked method, or null in the case of a constructor, or null if the method's return type is void. Before calling the method or constructor, Invoke checks to see if the user has access permission and verifies that the parameters are valid.CautionElements of the array that represent parameters declared with the ref or out keyword may also be modified. + + + + + When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. + + The type of custom attribute to search for. The search includes derived types. + true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + true if one or more instances of or any of its derived types is applied to this member; otherwise, false. + + + + + Provides a methods of representing imaginary properties which are unique to serialization. + + We aggregate the PropertyInfo associated with this member and return a mangled form of the name. + + + + + + The default fake name separator string. + + + + + Initializes a new instance of the class. + + The property to alias. + The name prefix to use. + + + + Initializes a new instance of the class. + + The property to alias. + The name prefix to use. + The separator string to use. + + + + Not yet documented. + + + + + Gets the module in which the type that declares the member represented by the current is defined. + + + + + Gets a value that identifies a metadata element. + + + + + Gets the name of the current member. + + + + + Gets the class that declares this member. + + + + + Gets the class object that was used to obtain this instance of MemberInfo. + + + + + Gets the type of the property. + + + The type of the property. + + + + + Gets the attributes. + + + The attributes. + + + + + Gets a value indicating whether this instance can read. + + + true if this instance can read; otherwise, false. + + + + + Gets a value indicating whether this instance can write. + + + true if this instance can write; otherwise, false. + + + + + When overridden in a derived class, returns an array of all custom attributes applied to this member. + + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. + + + + + When overridden in a derived class, returns an array of custom attributes applied to this member and identified by . + + The type of attribute to search for. Only attributes that are assignable to this type are returned. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied. + + + + + When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. + + The type of custom attribute to search for. The search includes derived types. + True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. + + True if one or more instances of or any of its derived types is applied to this member; otherwise, false. + + + + + Returns an array whose elements reflect the public and, if specified, non-public get, set, and other accessors of the property reflected by the current instance. + + Indicates whether non-public methods should be returned in the MethodInfo array. true if non-public methods are to be included; otherwise, false. + + An array of objects whose elements reflect the get, set, and other accessors of the property reflected by the current instance. If is true, this array contains public and non-public get, set, and other accessors. If is false, this array contains only public get, set, and other accessors. If no accessors with the specified visibility are found, this method returns an array with zero (0) elements. + + + + + When overridden in a derived class, returns the public or non-public get accessor for this property. + + Indicates whether a non-public get accessor should be returned. true if a non-public accessor is to be returned; otherwise, false. + + A MethodInfo object representing the get accessor for this property, if is true. Returns null if is false and the get accessor is non-public, or if is true but no get accessors exist. + + + + + Gets the index parameters of the property. + + The index parameters of the property. + + + + When overridden in a derived class, returns the set accessor for this property. + + Indicates whether the accessor should be returned if it is non-public. true if a non-public accessor is to be returned; otherwise, false. + + Value Condition A object representing the Set method for this property. The set accessor is public.-or- is true and the set accessor is non-public. null is true, but the property is read-only.-or- is false and the set accessor is non-public.-or- There is no set accessor. + + + + + Gets the value of the property on the given instance. + + The object to invoke the getter on. + The to invoke with. + The binder to use. + The indices to use. + The culture to use. + The value of the property on the given instance. + + + + Sets the value of the property on the given instance. + + The object to set the value on. + The value to set. + The to invoke with. + The binder to use. + The indices to use. + The culture to use. + + + + Contains utilities for operating on arrays multi-dimentional arrays. + + + + + Inserts one column left of the specified column index. + + The type of the element. + Index of the column. + The array. + + + + Inserts one column right of the specified column index. + + The type of the element. + Index of the column. + The arr. + + + + Inserts one row above the specified row index. + + The type of the element. + The array. + The row index. + + + + Inserts one row below the specified row index. + + The type of the element. + The array. + Index of the row. + + + + Duplicates the column. + + The type of the element. + Index of the column. + The array. + + + + Duplicates the row. + + The type of the element. + The array. + Index of the row. + + + + Moves a column. + + The type of the element. + The array. + From column. + To column. + + + + Moves a row. + + The type of the element. + The array. + From row. + To row. + + + + Deletes a column. + + The type of the element. + The array. + Index of the column. + + + + Deletes the row. + + The type of the element. + The array. + Index of the row. + + + + Indicates a persistent assembly. + + + + + Compares objects by reference only, ignoring equality operators completely. This is used by the property tree reference dictionaries to keep track of references. + + + + + A default, cached instance of this generic variant of the reference equality comparer. + + + + + Returns true if the object references are equal. + + + + + Returns the result of the object's own GetHashCode method. + + + + + Paths to Sirenix assets. + + + + + Path to Odin Inspector folder. + + + + + Path to Sirenix assets folder. + + + + + Path to Sirenix folder. + + + + + Path to Sirenix assemblies. + + + + + Path to Odin Inspector resources folder. + + + + + Path to Odin Inspector configuration folder. + + + + + Path to Odin Inspector resources configuration folder. + + + + + Path to Odin Inspector temporary folder. + + + + + This attribute is used by classes deriving from GlobalConfig and specifies the menu item path for the preference window and the asset path for the generated config file. + The scriptable object created will be located at the OdinEditorConfigs path unless other is specified. + Classes implementing this attribute will be part of the Odin Preferences window. + + + + + + Initializes a new instance of the class. + + + + + This attribute is used by classes deriving from GlobalConfig and specifies the menu item path for the preference window and the asset path for the generated config file. + The scriptable object created will be located at the OdinResourcesConigs path unless other is specified. + Classes implementing this attribute will be part of the Odin Preferences window. + + + + + + Initializes a new instance of the class. + + + + + Not yet documented. + + + + + Not yet documented. + + Not yet documented. + Not yet documented. + Not yet documented. + + + + Compares two strings in a number-aware manner, IE, "[2] Foo" is considered to come before "[10] Bar". + + + + + Utility class indicating current Unity version. + + + + + Tests current Unity version is equal or greater. + + Minimum major version. + Minimum minor version. + true if the current Unity version is greater. Otherwise false. + + + + The current Unity version major. + + + + + The current Unity version minor. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + + Not yet documented. + + + + diff --git a/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml.meta b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml.meta new file mode 100644 index 0000000..cc14132 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4873f2a8bdae42baa0406e8a6136096f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Assemblies/link.xml b/Assets/Plugins/Sirenix/Assemblies/link.xml new file mode 100644 index 0000000..1df8f84 --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/link.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Assemblies/link.xml.meta b/Assets/Plugins/Sirenix/Assemblies/link.xml.meta new file mode 100644 index 0000000..27e066d --- /dev/null +++ b/Assets/Plugins/Sirenix/Assemblies/link.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1bec01331befdea4d9ed9033eabd68f8 +timeCreated: 1613046886 +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Demos.meta b/Assets/Plugins/Sirenix/Demos.meta new file mode 100644 index 0000000..057445d --- /dev/null +++ b/Assets/Plugins/Sirenix/Demos.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d37e25422d977954e8adf30f71ec3fa3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Demos/Custom Attribute Processors.unitypackage.meta b/Assets/Plugins/Sirenix/Demos/Custom Attribute Processors.unitypackage.meta new file mode 100644 index 0000000..92a6ac5 --- /dev/null +++ b/Assets/Plugins/Sirenix/Demos/Custom Attribute Processors.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f597f19f656ba56eae4f6a3a7cc528f4 +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Demos/Custom Drawers.unitypackage.meta b/Assets/Plugins/Sirenix/Demos/Custom Drawers.unitypackage.meta new file mode 100644 index 0000000..71af8df --- /dev/null +++ b/Assets/Plugins/Sirenix/Demos/Custom Drawers.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 48e08dc33330d11e9d4a1b246c52e4f6 +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Demos/Editor Windows.unitypackage.meta b/Assets/Plugins/Sirenix/Demos/Editor Windows.unitypackage.meta new file mode 100644 index 0000000..cc5570c --- /dev/null +++ b/Assets/Plugins/Sirenix/Demos/Editor Windows.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ed09910c0094cb27be8f3ca264680da3 +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Demos/Sample - RPG Editor.unitypackage.meta b/Assets/Plugins/Sirenix/Demos/Sample - RPG Editor.unitypackage.meta new file mode 100644 index 0000000..26bd5b8 --- /dev/null +++ b/Assets/Plugins/Sirenix/Demos/Sample - RPG Editor.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cc355dd4cf1e6173beaeb22c2858cbe1 +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector.meta b/Assets/Plugins/Sirenix/Odin Inspector.meta new file mode 100644 index 0000000..d3b372f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1dc9f393f1fa6ca4491d01527af7c1dc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets.meta b/Assets/Plugins/Sirenix/Odin Inspector/Assets.meta new file mode 100644 index 0000000..bbb2a32 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2eed0c832d01539428851f5ff37f2485 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor.meta b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor.meta new file mode 100644 index 0000000..497f658 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cac02e61e55f7c14a959f60127b5e0c1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt new file mode 100644 index 0000000..2b637b2 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt @@ -0,0 +1,30 @@ +Odin Inspector makes use of the Bootstrap icon library. +The library has been packed into the SdfIconAtlas.png +file as SDF data. + +Bootstrap is released under the following license: + +--- + +The MIT License (MIT) + +Copyright (c) 2011-2018 Twitter, Inc. +Copyright (c) 2011-2018 The Bootstrap Authors + +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: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +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. \ No newline at end of file diff --git a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/README Prediction V2 Examples.txt.meta b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt.meta similarity index 75% rename from Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/README Prediction V2 Examples.txt.meta rename to Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt.meta index 6fdc8cc..e3864a0 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V2 (Experimental)/README Prediction V2 Examples.txt.meta +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 43f99d5241a617843a16537c3229c093 +guid: 3fdc67fad3e362e47b5dd365a0bbdd7f TextScriptImporter: externalObjects: {} userData: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes new file mode 100644 index 0000000..015de23 Binary files /dev/null and b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes differ diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes.meta b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes.meta new file mode 100644 index 0000000..6cc318b --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 90eaa0dc28c1934408dc1c02e13a507f +timeCreated: 1628274352 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset new file mode 100644 index 0000000..3a82383 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -262940062, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: OdinPathLookup + m_EditorClassIdentifier: \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset.meta new file mode 100644 index 0000000..4d528eb --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 08379ccefc05200459f90a1c0711a340 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png new file mode 100644 index 0000000..6d255d5 Binary files /dev/null and b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png differ diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png.meta b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png.meta new file mode 100644 index 0000000..0c03933 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png.meta @@ -0,0 +1,128 @@ +fileFormatVersion: 2 +guid: 2a0112a98875dfd488b5d10bdb8a4903 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 10 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 16384 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 16384 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 16384 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config.meta new file mode 100644 index 0000000..1225f3b --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c1da1c29110996544a926b86825099a8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor.meta new file mode 100644 index 0000000..61a1ceb --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 05a88873dc249b241a0e3d8a3580257e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset new file mode 100644 index 0000000..b36513a --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset @@ -0,0 +1,25 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -645759843, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: GeneralDrawerConfig + m_EditorClassIdentifier: + enableUIToolkitSupport: 1 + useOldUnityObjectField: 0 + useOldUnityPreviewField: 0 + useOldTypeSelector: 0 + useNewObjectSelector: 1 + showNoneItem: 1 + showCategoriesByDefault: 0 + preferNamespacesOverAssemblyCategories: 1 + useOldPolymorphicField: 0 + showBaseType: 1 + nonDefaultConstructorPreference: 0 diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset.meta new file mode 100644 index 0000000..f90000a --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5d4a6e4457a54c4478becd43ea739bd0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset new file mode 100644 index 0000000..5b65043 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset @@ -0,0 +1,19 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1137305049, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: InspectorConfig + m_EditorClassIdentifier: + enableOdinInInspector: 1 + defaultEditorBehaviour: 11 + processMouseMoveInInspector: 1 + drawingConfig: + configs: [] diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset.meta new file mode 100644 index 0000000..76926a6 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cb98817b0209c4c47992db3fb902fe52 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset new file mode 100644 index 0000000..134e7fd --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -228747253, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: OdinModuleConfig + m_EditorClassIdentifier: + configurations: + - ID: Unity.Mathematics + ActivationSettings: 0 + - ID: Unity.Addressables + ActivationSettings: 0 + ModuleTogglingSettings: 1 + ModuleUpdateSettings: 1 diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset.meta new file mode 100644 index 0000000..abdec6b --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4cb9716a26932d843b7f74297ea936e8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/TypeRegistryUserConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/TypeRegistryUserConfig.asset new file mode 100644 index 0000000..18bf021 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/TypeRegistryUserConfig.asset @@ -0,0 +1,24 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 2050440665, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: TypeRegistryUserConfig + m_EditorClassIdentifier: + shownTypes: + serializedCollection: [] + hiddenTypes: + serializedCollection: [] + addedIllegalTypes: + serializedCollection: [] + typeSettings: + serializedDictionary: [] + typePriorities: + serializedDictionary: [] diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/TypeRegistryUserConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/TypeRegistryUserConfig.asset.meta new file mode 100644 index 0000000..f96f079 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/TypeRegistryUserConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7de15ef38d1a90d468a6d69dff3d8058 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules.meta new file mode 100644 index 0000000..7e933b9 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 21b154efeb99c804fa38f119e05a1b89 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data new file mode 100644 index 0000000..2c681a8 Binary files /dev/null and b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data differ diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/RigidbodyPrediction.unity.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data.meta similarity index 74% rename from Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/RigidbodyPrediction.unity.meta rename to Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data.meta index 2edff22..38859a1 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/RigidbodyPrediction.unity.meta +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 005289ca292137448ba5edc0e1163f4a +guid: d92d0eb8b980c6d44b5f0e64a620355b DefaultImporter: externalObjects: {} userData: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.meta new file mode 100644 index 0000000..cab0404 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d6b3a1d695cb3b4489e4dbf5c9c3aa30 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/AddressablesInspectors.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/AddressablesInspectors.cs new file mode 100644 index 0000000..c994b02 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/AddressablesInspectors.cs @@ -0,0 +1,1748 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using Sirenix.OdinInspector; +using UnityEngine; + +[assembly: RegisterAssetReferenceAttributeForwardToChild(typeof(InlineEditorAttribute))] +[assembly: RegisterAssetReferenceAttributeForwardToChild(typeof(PreviewFieldAttribute))] + +namespace Sirenix.OdinInspector +{ + using System.Diagnostics; + + /// + /// DisallowAddressableSubAssetField is used on AssetReference properties, and disallows and prevents assigned sub-assets to the asset reference. + /// + /// + /// + /// [DisallowAddressableSubAssetField] + /// public AssetReference Reference; + /// + /// + /// + /// + [Conditional("UNITY_EDITOR")] + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Parameter)] + public class DisallowAddressableSubAssetFieldAttribute : Attribute + { + } + + /// + /// Registers an attribute to be applied to an AssetRefenece property, to be forwarded and applied to the AssetReference's child instead. + /// This allows attributes designed for use on UnityEngine.Objects to be used on AssetReference properties as well. + /// By default, InlineEditorAttribute and PreviewFieldAttribute are registered for forwarding. + /// + /// + /// + /// [assembly: Sirenix.OdinInspector.Modules.RegisterAssetReferenceAttributeForwardToChild(typeof(InlineEditorAttribute))] + /// [assembly: Sirenix.OdinInspector.Modules.RegisterAssetReferenceAttributeForwardToChild(typeof(PreviewFieldAttribute))] + /// + /// + /// + [Conditional("UNITY_EDITOR")] + [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] + public class RegisterAssetReferenceAttributeForwardToChildAttribute : Attribute // TODO: Should this be a global attribute? + { + /// + /// The type of the attribute to forward. + /// + public readonly Type AttributeType; + + /// + /// Registers the specified attribute to be copied and applied to the AssetReference's UnityEngine.Object child instead. + /// + /// The attribute type to forward. + public RegisterAssetReferenceAttributeForwardToChildAttribute(Type attributeType) + { + this.AttributeType = attributeType; + } + } +} + +#if UNITY_EDITOR +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + using Sirenix.OdinInspector.Editor; + using Sirenix.Serialization; + using Sirenix.Utilities; + using Sirenix.Utilities.Editor; + using Sirenix.OdinInspector.Modules.Addressables.Editor.Internal; + using Sirenix.Reflection.Editor; + using System.Collections.Generic; + using System.Linq; + using System.Reflection; + using UnityEditor; + using UnityEditor.AddressableAssets; + using UnityEditor.AddressableAssets.Settings; + using UnityEditor.AddressableAssets.GUI; + using UnityEngine; + using UnityEngine.AddressableAssets; + using System.Runtime.Serialization; + using UnityEngine.U2D; + using UnityEditor.U2D; + using System.IO; + + /// + /// Draws an AssetReference property. + /// + /// The concrete type of AssetReference to be drawn. For example, AssetReferenceTexture. + [DrawerPriority(0, 1, 0)] + public class AssetReferenceDrawer : OdinValueDrawer, IDefinesGenericMenuItems + where T : AssetReference + { + private bool hideAssetReferenceField; + private Type[] validMainAssetTypes; + private Type targetType; + private bool targetTypeIsNotValidMainAsset; + private string NoneSelectedLabel; + //private string[] labelRestrictions; + private bool showSubAssetField; + + private bool updateShowSubAssetField; + + private bool disallowSubAssets_Backing; + + private bool ActuallyDisallowSubAssets => this.disallowSubAssets_Backing && !this.targetTypeIsNotValidMainAsset; + + private List restrictions; + + private bool isSpriteAtlas; + + protected override bool CanDrawValueProperty(InspectorProperty property) + { + return property.GetAttribute() == null; + } + + protected override void Initialize() + { + // If a child exists, we draw that child instead of the AssetReference field. + if (this.Property.Children.Count > 0) + { + this.hideAssetReferenceField = true; + return; + } + + this.validMainAssetTypes = OdinAddressableUtility.GetAssetReferenceValidMainAssetTypes(typeof(T)); + this.targetType = OdinAddressableUtility.GetAssetReferenceTargetType(typeof(T)); + this.targetTypeIsNotValidMainAsset = this.validMainAssetTypes.Contains(this.targetType) == false; + + this.isSpriteAtlas = this.validMainAssetTypes.Length > 0 && this.validMainAssetTypes[0] == typeof(SpriteAtlas); + + if (this.targetType == typeof(UnityEngine.Object)) + { + this.NoneSelectedLabel = "None (Addressable Asset)"; + } + else if (this.validMainAssetTypes.Length > 1 || this.validMainAssetTypes[0] != this.targetType) + { + this.NoneSelectedLabel = $"None (Addressable [{string.Join("/", this.validMainAssetTypes.Select(n => n.GetNiceName()))}]>{this.targetType.GetNiceName()})"; + } + else + { + this.NoneSelectedLabel = $"None (Addressable {this.targetType.GetNiceName()})"; + } + + this.restrictions = new List(); + foreach (var attr in this.Property.Attributes) + { + if (attr is AssetReferenceUIRestriction r) + { + this.restrictions.Add(r); + } + } + + this.disallowSubAssets_Backing = Property.GetAttribute() != null; + + this.updateShowSubAssetField = true; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + if (this.disallowSubAssets_Backing && this.targetTypeIsNotValidMainAsset) + { + SirenixEditorGUI.WarningMessageBox($"This {typeof(T).GetNiceName()} field has been marked as not allowing sub assets, but the target type '{this.targetType.GetNiceName()}' is not a valid main asset for {typeof(T).GetNiceName()}, so the target value *must* be a sub asset. Therefore sub assets have been enabled. (Valid main asset types for {typeof(T).GetNiceName()} are: {string.Join(", ", this.validMainAssetTypes.Select(t => t.GetNiceName()))})"); + } + + if (this.hideAssetReferenceField == false) + { + var value = ValueEntry.SmartValue; + + // Update showSubAssetField. + if (this.updateShowSubAssetField && Event.current.type == EventType.Layout) + { + if (value == null || value.AssetGUID == null || value.editorAsset == null) + { + this.showSubAssetField = false; + } + else if (string.IsNullOrEmpty(value.SubObjectName) == false) + { + this.showSubAssetField = true; + } + else if (this.ActuallyDisallowSubAssets) + { + this.showSubAssetField = false; + } + else + { + var path = AssetDatabase.GUIDToAssetPath(value.AssetGUID); + + if (path == null) + { + this.showSubAssetField = false; + } + else + { + var mainAsset = AssetDatabase.LoadMainAssetAtPath(path); + this.showSubAssetField = OdinAddressableUtility.EnumerateAllActualAndVirtualSubAssets(mainAsset, path).Any(); + } + } + + this.updateShowSubAssetField = false; + } + + var rect = SirenixEditorGUI.GetFeatureRichControlRect(label, out var controlId, out var _, out var valueRect); + + Rect mainRect = valueRect; + Rect subRect = default, subPickerRect = default; + + if (this.showSubAssetField) + { + subRect = mainRect.Split(1, 2).AddX(1); + mainRect = mainRect.Split(0, 2).SubXMax(1); + subPickerRect = subRect.AlignRight(16); + } + + var mainPickerRect = mainRect.AlignRight(16); + + // Cursor + EditorGUIUtility.AddCursorRect(mainPickerRect, MouseCursor.Link); + if (showSubAssetField) + { + EditorGUIUtility.AddCursorRect(subPickerRect, MouseCursor.Link); + } + + // Selector + if (GUI.Button(mainPickerRect, "", SirenixGUIStyles.None)) + { + OpenMainAssetSelector(valueRect); + } + if (showSubAssetField && GUI.Button(subPickerRect, "", SirenixGUIStyles.None)) + { + OpenSubAssetSelector(valueRect); + } + + // Ping + if (Event.current.type == EventType.MouseDown && Event.current.button == 0 && mainRect.Contains(Event.current.mousePosition) && value != null && value.editorAsset != null) + { + EditorGUIUtility.PingObject(value.editorAsset); + } + + // Drag and drop + EditorGUI.BeginChangeCheck(); + var drop = DragAndDropUtilities.DropZone(rect, null, typeof(object), false, controlId); + if (EditorGUI.EndChangeCheck()) + { + if (this.ConvertToValidAssignment(drop, out Object obj, out bool isSubAssetAssignment)) + { + if (this.isSpriteAtlas && obj is Sprite sprite) + { + foreach (SpriteAtlas spriteAtlas in AssetDatabase_Internals.FindAssets(String.Empty, false, AssetDatabaseSearchArea.AllAssets)) + { + if (!spriteAtlas.CanBindTo(sprite)) + { + continue; + } + + this.ValueEntry.SmartValue = OdinAddressableUtility.CreateAssetReference(spriteAtlas); + this.ValueEntry.SmartValue.SetEditorSubObject(sprite); + + this.updateShowSubAssetField = true; + + break; + } + } + else + { + if (isSubAssetAssignment) + { + string path = AssetDatabase.GetAssetPath(obj); + + UnityEngine.Object mainAsset = AssetDatabase.LoadMainAssetAtPath(path); + + if (mainAsset != null) + { + if (this.ValueEntry.SmartValue == null) + { + this.ValueEntry.SmartValue = OdinAddressableUtility.CreateAssetReference(mainAsset); + } + else if (this.ValueEntry.SmartValue.editorAsset != mainAsset) + { + this.ValueEntry.SmartValue.SetEditorAsset(mainAsset); + } + + this.ValueEntry.SmartValue.SetEditorSubObject(obj); + } + + this.updateShowSubAssetField = true; + } + else + { + if (this.ValueEntry.SmartValue == null) + { + this.ValueEntry.SmartValue = OdinAddressableUtility.CreateAssetReference(obj); + } + else + { + this.ValueEntry.SmartValue.SetEditorAsset(obj); + } + + if (string.IsNullOrEmpty(this.ValueEntry.SmartValue.SubObjectName)) + { + if (obj is Sprite) + { + Object[] subAsset = AssetDatabase.LoadAllAssetRepresentationsAtPath(AssetDatabase.GetAssetPath(obj)); + + if (subAsset.Length > 0) + { + this.ValueEntry.SmartValue.SetEditorSubObject(subAsset[0]); + this.updateShowSubAssetField = true; + } + } + } + } + } + + if (this.ActuallyDisallowSubAssets && + !this.targetTypeIsNotValidMainAsset && + !string.IsNullOrEmpty(this.ValueEntry.SmartValue.SubObjectName)) + { + this.ValueEntry.SmartValue.SubObjectName = null; + this.updateShowSubAssetField = true; + } + } + else if (drop == null) + { + this.updateShowSubAssetField = true; + this.ValueEntry.WeakSmartValue = null; + } + } + + // Drawing + if (Event.current.type == EventType.Repaint) + { + GUIContent valueLabel; + if (value == null || string.IsNullOrEmpty(value.AssetGUID) || value.editorAsset == null) + { + valueLabel = GUIHelper.TempContent(NoneSelectedLabel); + } + else if (showSubAssetField) + { + var path = AssetDatabase.GUIDToAssetPath(value.AssetGUID); + var assetName = System.IO.Path.GetFileNameWithoutExtension(path); + + + valueLabel = GUIHelper.TempContent(assetName, GetTheDamnPreview(value.editorAsset)); + } + else + { + valueLabel = GUIHelper.TempContent(value.editorAsset.name, GetTheDamnPreview(value.editorAsset)); + } + + GUI.Label(mainRect, valueLabel, EditorStyles.objectField); + SdfIcons.DrawIcon(mainPickerRect.SetWidth(12), SdfIconType.Record2); + + if (this.showSubAssetField) + { + if (string.IsNullOrEmpty(value.SubObjectName) || value.editorAsset == null) + { + valueLabel = GUIHelper.TempContent(""); + } + else + { + valueLabel = GUIHelper.TempContent(value.SubObjectName); + } + + GUI.Label(subRect, valueLabel, EditorStyles.objectField); + SdfIcons.DrawIcon(subPickerRect.SetWidth(12), SdfIconType.Record2); + } + } + } + else + { + this.Property.Children[0].Draw(label); + } + } + + private static Texture2D GetTheDamnPreview(UnityEngine.Object obj) + { + Texture2D img = obj as Texture2D; + + if (img == null) + { + img = (obj as Sprite)?.texture; + } + + if (img == null) + { + img = AssetPreview.GetMiniThumbnail(obj); + } + + return img; + } + + private bool ConvertToValidAssignment(object drop, out UnityEngine.Object converted, out bool isSubAssetAssignment) + { + converted = null; + isSubAssetAssignment = false; + + bool isDefinitelyMainAssetAssignment = false; + + if (object.ReferenceEquals(drop, null)) return false; + + if (!ConvertUtility.TryWeakConvert(drop, this.targetType, out object convertedObj)) + { + for (int i = 0; i < this.validMainAssetTypes.Length; i++) + { + if (ConvertUtility.TryWeakConvert(drop, this.validMainAssetTypes[i], out convertedObj)) + { + isDefinitelyMainAssetAssignment = true; + break; + } + } + } + + if (convertedObj == null || !(convertedObj is UnityEngine.Object unityObj) || unityObj == null) return false; + + converted = unityObj; + + if (isDefinitelyMainAssetAssignment) + { + isSubAssetAssignment = false; + return true; + } + else if (AssetDatabase.IsSubAsset(converted)) + { + if (this.ActuallyDisallowSubAssets) + { + return false; + } + + isSubAssetAssignment = true; + return true; + } + + return true; + } + + private void OpenMainAssetSelector(Rect rect) + { + var selector = new AddressableSelector("Select", this.validMainAssetTypes, this.restrictions, typeof(T)); + + selector.SelectionChanged += OnMainAssetSelect; + selector.SelectionConfirmed += OnMainAssetSelect; + + selector.ShowInPopup(rect); + } + + private void OpenSubAssetSelector(Rect rect) + { + if (this.ValueEntry.SmartValue == null || this.ValueEntry.SmartValue.AssetGUID == null) + return; + + var path = AssetDatabase.GUIDToAssetPath(this.ValueEntry.SmartValue.AssetGUID); + if (path == null) + return; + + var mainAsset = AssetDatabase.LoadMainAssetAtPath(path); + + List subAssets; + + if (mainAsset != null && mainAsset is SpriteAtlas) + { + subAssets = OdinAddressableUtility.EnumerateAllActualAndVirtualSubAssets(mainAsset, path) + .Where(val => val != null && (val is Sprite || val is Texture2D)) + .ToList(); + } + else + { + subAssets = OdinAddressableUtility.EnumerateAllActualAndVirtualSubAssets(mainAsset, path) + .Where(val => val != null && this.targetType.IsInstanceOfType(val)) + .ToList(); + } + + var items = new GenericSelectorItem[subAssets.Count + 1]; + + items[0] = new GenericSelectorItem("", null); + for (int i = 0; i < subAssets.Count; i++) + { + var item = new GenericSelectorItem(subAssets[i].name, subAssets[i]); + items[i + 1] = item; + } + + var selector = new GenericSelector("Select Sub Asset", false, items); + + selector.SelectionChanged += OnSubAssetSelect; + selector.SelectionConfirmed += OnSubAssetSelect; + + selector.ShowInPopup(rect); + } + + private void OnMainAssetSelect(IEnumerable selection) + { + var selected = selection.FirstOrDefault(); + this.ValueEntry.SmartValue = CreateAssetReferenceFrom(selected); + this.updateShowSubAssetField = true; + } + + private void OnSubAssetSelect(IEnumerable selection) + { + if (this.ValueEntry == null || this.ValueEntry.SmartValue.AssetGUID == null) + return; + + var selected = selection.FirstOrDefault(); + + this.ValueEntry.SmartValue.SetEditorSubObject(selected); + this.Property.MarkSerializationRootDirty(); + } + + private T CreateAssetReferenceFrom(AddressableAssetEntry entry) + { + if (entry != null) + { + return CreateAssetReferenceFrom(entry.TargetAsset); + } + else + { + return null; + } + } + + private T CreateAssetReferenceFrom(UnityEngine.Object mainAsset, UnityEngine.Object subAsset) + { + var path = AssetDatabase.GetAssetPath(mainAsset); + var guid = AssetDatabase.AssetPathToGUID(path); + + if (guid == null) return null; + + var instance = (T)Activator.CreateInstance(typeof(T), guid); + instance.SetEditorSubObject(subAsset); + return instance; + } + + private T CreateAssetReferenceFrom(UnityEngine.Object obj) + { + var path = AssetDatabase.GetAssetPath(obj); + var guid = AssetDatabase.AssetPathToGUID(path); + + if (guid == null) return null; + + var instance = (T)Activator.CreateInstance(typeof(T), guid); + + if (typeof(T).InheritsFrom()) + { + if (AssetDatabase.GetMainAssetTypeAtPath(path) == typeof(SpriteAtlas)) + { + if (!(obj is SpriteAtlas)) + { + instance.SetEditorSubObject(obj); + } + } + } + else if (typeof(T).InheritsFrom()) + { + // No need to do anything here. + // The user will need to choose a sprite + // "sub asset" from the atlas. + } + else if (this.ActuallyDisallowSubAssets == false && AssetDatabase.IsSubAsset(obj)) + { + instance.SetEditorSubObject(obj); + } + + return instance; + } + + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + genericMenu.AddItem(new GUIContent("Set To Null"), false, () => + { + this.ValueEntry.WeakSmartValue = null; + this.updateShowSubAssetField = true; + }); + + if (this.ValueEntry.SmartValue != null && string.IsNullOrEmpty(this.ValueEntry.SmartValue.SubObjectName) == false) + { + genericMenu.AddItem(new GUIContent("Remove Sub Asset"), false, () => + { + if (this.ValueEntry.SmartValue != null) + { + this.ValueEntry.SmartValue.SetEditorSubObject(null); + } + this.updateShowSubAssetField = true; + }); + } + else + { + genericMenu.AddDisabledItem(new GUIContent("Remove Sub Asset")); + } + + genericMenu.AddItem(new GUIContent("Open Groups Window"), false, OdinAddressableUtility.OpenGroupsWindow); + } + } + + /// + /// Draws an AssetLabelReference field. + /// + [DrawerPriority(0, 1, 0)] + public class AssetLabelReferenceDrawer : OdinValueDrawer, IDefinesGenericMenuItems + { + protected override bool CanDrawValueProperty(InspectorProperty property) + { + return property.GetAttribute() == null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + var rect = SirenixEditorGUI.GetFeatureRichControlRect(label, out var controlId, out var hasKeyboardFocus, out var valueRect); + + string valueLabel; + if (this.ValueEntry.SmartValue == null || string.IsNullOrEmpty(this.ValueEntry.SmartValue.labelString)) + { + valueLabel = ""; + } + else + { + valueLabel = this.ValueEntry.SmartValue.labelString; + } + + if (GUI.Button(valueRect, valueLabel, EditorStyles.popup)) + { + var selector = new AddressableLabelSelector(); + + selector.SelectionChanged += SetLabel; + selector.SelectionConfirmed += SetLabel; + + selector.ShowInPopup(valueRect); + } + } + + private void SetLabel(IEnumerable selection) + { + var selected = selection.FirstOrDefault(); + this.ValueEntry.SmartValue = new AssetLabelReference() + { + labelString = selected, + }; + } + + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + genericMenu.AddItem(new GUIContent("Set To Null"), false, () => property.ValueEntry.WeakSmartValue = null); + genericMenu.AddItem(new GUIContent("Open Label Window"), false, () => OdinAddressableUtility.OpenLabelsWindow()); + } + } + + /// + /// Odin Selector for Addressables. + /// + public class AddressableSelector : OdinSelector + { + //private static EditorPrefBool flatten = new EditorPrefBool("AddressablesSelector.Flatten", false); + + private static EditorPrefEnum listMode = new EditorPrefEnum("AddressablesSelector.ListMode", SelectorListMode.Group); + + private readonly string title; + private readonly Type[] filterTypes; + private readonly List restrictions; + private readonly AssetReference assetReferenceForValidating; + + internal bool ShowNonAddressables; + + public override string Title => this.title; + + /// + /// Initializes a AddressableSelector. + /// + /// The title of the selector. Set to null for no title. + /// The type of UnityEngine.Object to be selectable. For example, UnityEngine.Texture. For no restriction, pass in UnityEngine.Object. + /// The Addressable labels to restrict the selector to. Set to null for no label restrictions. + /// Throws if the filter type is null. + public AddressableSelector(string title, Type filterType, List restrictions, Type assetReferenceType) + : this(title, new Type[] { filterType }, restrictions, assetReferenceType) + { + } + + /// + /// Initializes a AddressableSelector. + /// + /// The title of the selector. Set to null for no title. + /// The types of UnityEngine.Object to be selectable. For example, UnityEngine.Texture. For no restriction, pass in an array containing UnityEngine.Object. + /// The Addressable labels to restrict the selector to. Set to null for no label restrictions. + /// Throws if the filter type is null. + public AddressableSelector(string title, Type[] filterTypes, List restrictions, Type assetReferenceType) + { + this.title = title; + this.filterTypes = filterTypes ?? throw new ArgumentNullException(nameof(filterTypes)); + this.restrictions = restrictions; + + if (assetReferenceType != null) + { + if (assetReferenceType.InheritsFrom() == false) + { + throw new ArgumentException("Must inherit AssetReference", nameof(assetReferenceType)); + } + else if (assetReferenceType.IsAbstract) + { + throw new ArgumentException("Cannot be abstract type.", nameof(assetReferenceType)); + } + + this.assetReferenceForValidating = (AssetReference)FormatterServices.GetUninitializedObject(assetReferenceType); + } + } + + protected override void DrawToolbar() + { + bool drawTitle = !string.IsNullOrEmpty(this.Title); + bool drawSearchToolbar = this.SelectionTree.Config.DrawSearchToolbar; + bool drawButton = this.DrawConfirmSelectionButton; + + if (drawTitle || drawSearchToolbar || drawButton) + { + SirenixEditorGUI.BeginHorizontalToolbar(this.SelectionTree.Config.SearchToolbarHeight); + { + DrawToolbarTitle(); + DrawToolbarSearch(); + EditorGUI.DrawRect(GUILayoutUtility.GetLastRect().AlignLeft(1), SirenixGUIStyles.BorderColor); + + SdfIconType icon; + if (listMode.Value == SelectorListMode.Path) + icon = SdfIconType.ListNested; + else if (listMode.Value == SelectorListMode.Group) + icon = SdfIconType.ListStars; + else if (listMode.Value == SelectorListMode.Flat) + icon = SdfIconType.List; + else + icon = SdfIconType.X; + + if (SirenixEditorGUI.ToolbarButton(icon, true)) + { + int m = (int)listMode.Value + 1; + + if (m >= (int)SelectorListMode.Max) + { + m = 0; + } + + listMode.Value = (SelectorListMode)m; + + this.RebuildMenuTree(); + } + + EditorGUI.BeginChangeCheck(); + this.ShowNonAddressables = SirenixEditorGUI.ToolbarToggle(this.ShowNonAddressables, EditorIcons.UnityLogo); + if (EditorGUI.EndChangeCheck()) + { + this.RebuildMenuTree(); + } + + if (SirenixEditorGUI.ToolbarButton(SdfIconType.GearFill, true)) + { + OdinAddressableUtility.OpenGroupsWindow(); + } + + DrawToolbarConfirmButton(); + } + SirenixEditorGUI.EndHorizontalToolbar(); + } + } + + protected override void BuildSelectionTree(OdinMenuTree tree) + { + tree.Config.EXPERIMENTAL_INTERNAL_SparseFixedLayouting = true; + + tree.Config.SelectMenuItemsOnMouseDown = true; + + if (AddressableAssetSettingsDefaultObject.SettingsExists) + { + AddressableAssetSettings settings = AddressableAssetSettingsDefaultObject.Settings; + + foreach (AddressableAssetGroup group in settings.groups) + { + if (group == null || group.name == "Built In Data") + { + continue; + } + + foreach (AddressableAssetEntry entry in group.entries) + { + this.AddEntriesToTree(tree, group.name, entry); + } + } + } + + foreach (OdinMenuItem item in tree.EnumerateTree()) + { + if (item.Value == null) + { + item.SdfIcon = SdfIconType.Folder; + } + } + + if (this.ShowNonAddressables) + { + var searchFilter = ""; + + foreach (Type filterType in this.filterTypes) + { + searchFilter += $"t:{filterType.Name} "; + } + + IEnumerator enumerator = AssetDatabase_Internals.EnumerateAllAssets(searchFilter, false, AssetDatabaseSearchArea.InAssetsOnly); + + if (enumerator.MoveNext()) + { + var addedGuids = new HashSet(); + + foreach (OdinMenuItem item in tree.EnumerateTree()) + { + if (item.Value != null) + { + addedGuids.Add((item.Value as AddressableAssetEntry).guid); + } + } + + const string NON_ADDRESSABLES_ITEM_NAME = "Non Addressables"; + + var nonAddressablesItem = new OdinMenuItem(tree, NON_ADDRESSABLES_ITEM_NAME, null) {Icon = EditorIcons.UnityLogo}; + + tree.MenuItems.Add(nonAddressablesItem); + + do + { + HierarchyProperty current = enumerator.Current; + + if (addedGuids.Contains(current.guid) || !current.isMainRepresentation) + { + continue; + } + + AddressableAssetEntry entry = OdinAddressableUtility.CreateFakeAddressableAssetEntry(current.guid); + + if (listMode == SelectorListMode.Flat) + { + var item = new OdinMenuItem(tree, current.name, entry) {Icon = current.icon}; + + nonAddressablesItem.ChildMenuItems.Add(item); + } + else + { + string path = AssetDatabase.GetAssetPath(current.instanceID); + + if (!current.isFolder) + { + int extensionEndingIndex = GetExtensionsEndingIndex(path); + + if (extensionEndingIndex != -1) + { + path = path.Substring(0, extensionEndingIndex); + } + } + + path = RemoveBaseDirectoryFromAssetPath(path); + + tree.Add($"{NON_ADDRESSABLES_ITEM_NAME}/{path}", entry, current.icon); + } + } while (enumerator.MoveNext()); + + nonAddressablesItem.ChildMenuItems.SortMenuItemsByName(); + } + } + + OdinMenuItem noneItem; + + if (this.filterTypes.Contains(typeof(UnityEngine.Object))) + { + noneItem = new OdinMenuItem(tree, " (Addressable Asset)", null); + } + else + { + string filterTypesJoined; + + if (this.filterTypes.Length == 1) + { + filterTypesJoined = this.filterTypes[0].GetNiceName(); + } + else + { + filterTypesJoined = string.Join("/", this.filterTypes.Select(t => t.GetNiceName())); + } + + noneItem = new OdinMenuItem(tree, $" (Addressable {filterTypesJoined})", null); + } + + noneItem.SdfIcon = SdfIconType.X; + tree.MenuItems.Insert(0, noneItem); + } + + private static int GetExtensionsEndingIndex(string path) + { + for (var i = path.Length - 1; i >= 0; i--) + { + if (path[i] == '\\' || path[i] == '/') + { + return -1; + } + + if (path[i] == '.') + { + return i; + } + } + + return -1; + } + + private static string RemoveBaseDirectoryFromAssetPath(string path) + { + if (path.StartsWith("Assets/")) + { + return path.Remove(0, "Assets/".Length); + } + + return path; + } + + private void AddEntriesToTree(OdinMenuTree tree, string groupName, AddressableAssetEntry entry) + { + if (entry == null) return; + + var asset = entry.TargetAsset; + + var isFolder = entry.IsFolder || AssetDatabase.IsValidFolder(entry.AssetPath); + + if (isFolder) + { + entry.GatherAllAssets(null, false, false, true, null); + + if (entry.SubAssets != null) + { + foreach (var e in entry.SubAssets) + { + AddEntriesToTree(tree, groupName, e); + } + } + } + else + { + var assetType = asset.GetType(); + bool inheritsFromFilterType = false; + + for (int i = 0; i < filterTypes.Length; i++) + { + if (filterTypes[i].IsAssignableFrom(assetType)) + { + inheritsFromFilterType = true; + break; + } + } + + if (inheritsFromFilterType && PassesRestrictions(entry)) + { + string name; + if (listMode.Value == SelectorListMode.Group) + { + name = entry.address; + } + else if (listMode.Value == SelectorListMode.Path) + { + name = System.IO.Path.GetFileNameWithoutExtension(entry.AssetPath); + } + else if (listMode.Value == SelectorListMode.Flat) + { + name = entry.address; + } + else + { + throw new Exception("Unsupported list mode: " + listMode.Value); + } + + var item = new OdinMenuItem(tree, name, entry) + { + Icon = AssetPreview.GetMiniThumbnail(asset) + }; + + if (listMode.Value == SelectorListMode.Group) + { + OdinMenuItem groupItem = tree.GetMenuItem(groupName); + + if (groupItem == null) + { + groupItem = new OdinMenuItem(tree, groupName, null); + tree.MenuItems.Add(groupItem); + } + + if (entry.ParentEntry != null && entry.ParentEntry.IsFolder) + { + OdinMenuItem folderItem = null; + + for (int i = 0; i < groupItem.ChildMenuItems.Count; i++) + { + if (groupItem.ChildMenuItems[i].Name == entry.ParentEntry.address) + { + folderItem = groupItem.ChildMenuItems[i]; + break; + } + } + + if (folderItem == null) + { + folderItem = new OdinMenuItem(tree, entry.ParentEntry.address, null); + groupItem.ChildMenuItems.Add(folderItem); + } + + folderItem.ChildMenuItems.Add(item); + } + else + { + groupItem.ChildMenuItems.Add(item); + } + } + else if (listMode.Value == SelectorListMode.Path) + { + tree.AddMenuItemAtPath(System.IO.Path.GetDirectoryName(entry.AssetPath), item); + } + else if (listMode.Value == SelectorListMode.Flat) + { + tree.MenuItems.Add(item); + } + } + } + } + + private bool PassesRestrictions(AddressableAssetEntry entry) + { + if (restrictions == null) return true; + + return OdinAddressableUtility.ValidateAssetReferenceRestrictions(restrictions, entry.MainAsset); + + //for (int i = 0; i < this.restrictions.Count; i++) + //{ + // if (this.restrictions[i].ValidateAsset(entry.AssetPath) == false) + // { + // return false; + // } + //} + + //return true; + + /* If for whatever reason Unity haven't actually implemented their restriction methods, then we can use this code to atleast implement label restriction. */ + //if (this.labelRestrictions == null) return true; + + //for (int i = 0; i < labelRestrictions.Length; i++) + //{ + // if (entry.labels.Contains(labelRestrictions[i])) return true; + //} + + //return false; + } + + private enum SelectorListMode + { + Group, + Path, + Flat, + + Max, + } + } + + public class AddressableLabelSelector : OdinSelector + { + protected override void DrawToolbar() + { + bool drawTitle = !string.IsNullOrEmpty(this.Title); + bool drawSearchToolbar = this.SelectionTree.Config.DrawSearchToolbar; + bool drawButton = this.DrawConfirmSelectionButton; + + if (drawTitle || drawSearchToolbar || drawButton) + { + SirenixEditorGUI.BeginHorizontalToolbar(this.SelectionTree.Config.SearchToolbarHeight); + { + DrawToolbarTitle(); + DrawToolbarSearch(); + EditorGUI.DrawRect(GUILayoutUtility.GetLastRect().AlignLeft(1), SirenixGUIStyles.BorderColor); + + if (SirenixEditorGUI.ToolbarButton(SdfIconType.GearFill, true)) + { + OdinAddressableUtility.OpenLabelsWindow(); + } + + DrawToolbarConfirmButton(); + } + SirenixEditorGUI.EndHorizontalToolbar(); + } + } + protected override void BuildSelectionTree(OdinMenuTree tree) + { + IList labels = null; + + if (AddressableAssetSettingsDefaultObject.SettingsExists) + { + var settings = AddressableAssetSettingsDefaultObject.Settings; + labels = settings.GetLabels(); + } + + if (labels == null) labels = Array.Empty(); + + tree.MenuItems.Add(new OdinMenuItem(tree, "", null)); + + for (int i = 0; i < labels.Count; i++) + { + tree.MenuItems.Add(new OdinMenuItem(tree, labels[i], labels[i])); + } + } + } + + /// + /// Resolves children for AssetReference properties, and implements the RegisterAssetReferenceAttributeForwardToChild behaviour. + /// + /// The concrete type of AssetReference to be drawn. For example, AssetReferenceTexture. + public class AssetReferencePropertyResolver : OdinPropertyResolver + where T : AssetReference + { + private static readonly Type[] attributesToForward; + + static AssetReferencePropertyResolver() + { + attributesToForward = AppDomain.CurrentDomain.GetAssemblies() + .SelectMany(x => x.GetCustomAttributes()) + .Cast() + .Select(x => x.AttributeType) + .ToArray(); + } + + public override int ChildNameToIndex(string name) + { + return 0; + } + + public override int ChildNameToIndex(ref StringSlice name) + { + return 0; + } + + public override InspectorPropertyInfo GetChildInfo(int childIndex) + { + var targetType = OdinAddressableUtility.GetAssetReferenceTargetType(typeof(T)); + var getterSetterType = typeof(AssetReferenceValueGetterSetter<>).MakeGenericType(typeof(T), targetType); + + var getterSetter = Activator.CreateInstance(getterSetterType) as IValueGetterSetter; + + List attributes = new List + { + new ShowInInspectorAttribute(), + }; + + foreach (var type in attributesToForward) + { + var attr = this.Property.Attributes.FirstOrDefault(x => x.GetType() == type); + if (attr != null) + { + attributes.Add(attr); + } + } + + string label = "Asset"; + + return InspectorPropertyInfo.CreateValue(label, 0, SerializationBackend.None, getterSetter, attributes); + } + + protected override int GetChildCount(T value) + { + foreach (var attr in attributesToForward) + { + if (this.Property.Attributes.Any(x => x.GetType() == attr)) + { + return 1; + } + } + + return 0; + } + + private class AssetReferenceValueGetterSetter : IValueGetterSetter + where TTarget : UnityEngine.Object + { + public bool IsReadonly => false; + + public Type OwnerType => typeof(T); + + public Type ValueType => typeof(TTarget); + + public TTarget GetValue(ref T owner) + { + var v = owner.editorAsset; + return v as TTarget; + } + + public object GetValue(object owner) + { + var v = (owner as T)?.editorAsset; + return v as TTarget; + } + + public void SetValue(ref T owner, TTarget value) + { + owner.SetEditorAsset(value); + } + + public void SetValue(object owner, object value) + { + (owner as T).SetEditorAsset(value as TTarget); + } + } + } + + /// + /// Processes attributes for AssetReference properties. + /// + /// The concrete type of AssetReference to be drawn. For example, AssetReferenceTexture. + public class AssetReferenceAttributeProcessor : OdinAttributeProcessor + where T : AssetReference + { + public override void ProcessSelfAttributes(InspectorProperty property, List attributes) + { + attributes.Add(new DoNotDrawAsReferenceAttribute()); + attributes.Add(new HideReferenceObjectPickerAttribute()); + attributes.Add(new SuppressInvalidAttributeErrorAttribute()); // TODO: Remove this with proper attribute forwarding support. + } + } + + /// + /// Processes attributes for AssetLabelReference properties. + /// + public class AssetLabelReferenceAttributeProcessor : OdinAttributeProcessor + { + public override void ProcessSelfAttributes(InspectorProperty property, List attributes) + { + attributes.Add(new DoNotDrawAsReferenceAttribute()); + attributes.Add(new HideReferenceObjectPickerAttribute()); + } + } + + /// + /// Implements conversion behaviour for addressables. + /// + [InitializeOnLoad] + internal class AssetReferenceConverter : ConvertUtility.ICustomConverter + { + private readonly Type type_AssetEntryTreeViewItem; + private WeakValueGetter get_AssetEntryTreeViewItem_entry; + + static AssetReferenceConverter() + { + ConvertUtility.AddCustomConverter(new AssetReferenceConverter()); + } + + public AssetReferenceConverter() + { + this.type_AssetEntryTreeViewItem = TwoWaySerializationBinder.Default.BindToType("UnityEditor.AddressableAssets.GUI.AssetEntryTreeViewItem") ?? throw new Exception("Failed to find UnityEditor.AddressableAssets.GUI.AddressableAssetEntryTreeViewItem type."); + var field_AssetEntryTreeViewItem_entry = type_AssetEntryTreeViewItem.GetField("entry", Flags.AllMembers) ?? throw new Exception("Failed to find entry field in UnityEditor.AddressableAssets.GUI.AddressableAssetEntryTreeViewItem type."); + this.get_AssetEntryTreeViewItem_entry = EmitUtilities.CreateWeakInstanceFieldGetter(type_AssetEntryTreeViewItem, field_AssetEntryTreeViewItem_entry); + } + + // UnityEngine.Object > AssetReference/T + // AddressableAssetEntry > AssetReference + // AssetReference/T > UnityEngine.Object + // AssetReference/T > AssetReference/T + // AddressableAssetEntry > UnityEngine.Object + + public bool CanConvert(Type from, Type to) + { + var comparer = FastTypeComparer.Instance; + + if (to.InheritsFrom(typeof(AssetReference))) + { + if (comparer.Equals(from, typeof(AddressableAssetEntry)) || comparer.Equals(from, type_AssetEntryTreeViewItem)) + { + return true; + } + else if (from.InheritsFrom()) + { + if (to.InheritsFrom(typeof(AssetReferenceT<>))) + { + var baseType = to.GetGenericBaseType(typeof(AssetReferenceT<>)); + + var targetType = baseType.GetGenericArguments()[0]; + + return from.InheritsFrom(targetType); + } + else + { + return true; + } + } + else if (from.InheritsFrom(typeof(AssetReference))) + { + return to.InheritsFrom(from); + } + else + { + return false; + } + } + else if (from.InheritsFrom(typeof(AssetReference)) && to.InheritsFrom()) + { + return false; + } + else + { + return false; + } + } + + public bool TryConvert(object obj, Type to, out object result) + { + if (obj == null) + { + result = null; + return false; + } + + var comparer = FastTypeComparer.Instance; + + // AssetEntryTreeViewItems is a UI element container for AddressableAssetEntry. + // With this we can just treat AssetEntryTreeViewItems as an AddressableAssetEntry. + if (comparer.Equals(obj.GetType(), type_AssetEntryTreeViewItem)) + { + obj = get_AssetEntryTreeViewItem_entry(ref obj); + } + + if (to.InheritsFrom(typeof(AssetReference))) + { + Type assetType; + if (to.InheritsFrom(typeof(AssetReferenceT<>))) + { + var baseType = to.GetGenericBaseType(typeof(AssetReferenceT<>)); + assetType = baseType.GetGenericArguments()[0]; + } + else + { + assetType = typeof(UnityEngine.Object); + } + + if (obj is UnityEngine.Object uObj) + { + if (obj.GetType().InheritsFrom(assetType)) + { + string guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(uObj)); + + if (string.IsNullOrEmpty(guid) == false) + { + + result = CreateReference(to, uObj); + return true; + } + else + { + result = null; + return false; + } + } + else + { + result = null; + return false; + } + } + else if (obj is AddressableAssetEntry entry) + { + if (entry.TargetAsset.GetType().InheritsFrom(assetType)) + { + result = CreateReference(to, entry.TargetAsset); + return true; + + } + else + { + result = null; + return false; + } + } + else if (obj is AssetReference reference) + { + if (TryGetReferencedAsset(reference, assetType, out var asset)) + { + result = CreateReference(to, asset); + return true; + } + else + { + result = null; + return false; + } + } + else + { + result = null; + return false; + } + } + else if (to.InheritsFrom(typeof(UnityEngine.Object)) && obj is AssetReference reference) + { + if (TryGetReferencedAsset(reference, to, out var asset)) + { + result = asset; + return true; + } + else + { + result = null; + return false; + } + } + else if (to.InheritsFrom(typeof(UnityEngine.Object)) && obj is AddressableAssetEntry entry) + { + var target = entry.TargetAsset; + if (target == null) + { + result = null; + return false; + } + else if (target.GetType().InheritsFrom(to)) + { + result = target; + return true; + } + else if (ConvertUtility.TryWeakConvert(target, to, out var converted)) + { + result = converted; + return true; + } + else + { + result = null; + return false; + } + } + else + { + result = null; + return false; + } + } + + private bool TryGetReferencedAsset(AssetReference reference, Type to, out UnityEngine.Object asset) + { + if (reference.AssetGUID == null) + { + asset = null; + return false; + } + + var path = AssetDatabase.GUIDToAssetPath(reference.AssetGUID); + + if (reference.SubObjectName != null) + { + asset = null; + + foreach (var subAsset in OdinAddressableUtility.EnumerateAllActualAndVirtualSubAssets(reference.editorAsset, path)) + { + if (subAsset.name == reference.SubObjectName) + { + asset = subAsset; + break; + } + } + } + else + { + asset = AssetDatabase.LoadAssetAtPath(path); + } + + if (asset != null) + { + if (asset.GetType().InheritsFrom(to)) + { + return true; + } + else if (ConvertUtility.TryWeakConvert(asset, to, out var converted)) + { + asset = (UnityEngine.Object)converted; + return true; + } + else + { + asset = null; + return false; + } + } + else + { + return false; + } + } + + private AssetReference CreateReference(Type type, UnityEngine.Object obj) + { + var reference = (AssetReference)Activator.CreateInstance(type, new string[] { AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(obj)) }); + if (AssetDatabase.IsSubAsset(obj)) + { + reference.SetEditorAsset(obj); + } + + return reference; + } + } + + /// + /// Odin Inspector utility methods for working with addressables. + /// + public static class OdinAddressableUtility + { + private readonly static Action openAddressableWindowAction; + private static bool hasLoggedPackablesMissingError = false; + + static OdinAddressableUtility() + { + var type = TwoWaySerializationBinder.Default.BindToType("UnityEditor.AddressableAssets.GUI.AddressableAssetsWindow") ?? throw new Exception(""); + var method = type.GetMethod("Init", Flags.AllMembers) ?? throw new Exception(""); + openAddressableWindowAction = (Action)Delegate.CreateDelegate(typeof(Action), method); + } + + public static IEnumerable EnumerateAllActualAndVirtualSubAssets(UnityEngine.Object mainAsset, string mainAssetPath) + { + if (mainAsset == null) + { + yield break; + } + + Object[] subAssets = AssetDatabase.LoadAllAssetRepresentationsAtPath(mainAssetPath); + + foreach (Object subAsset in subAssets) + { + yield return subAsset; + } + + // The sprites/textures in a sprite atlas are not sub assets of the atlas, but they are apparently + // still part of the atlas in a way that the addressables system considers a sub asset. + if (mainAsset is UnityEngine.U2D.SpriteAtlas atlas) + { + Object[] packables = atlas.GetPackables(); + + foreach (Object packable in packables) + { + if (packable == null) + { + continue; + } + + if (!(packable is DefaultAsset packableFolder)) + { + yield return packable; + continue; + } + + string packablePath = AssetDatabase.GetAssetPath(packableFolder); + + if (!AssetDatabase.IsValidFolder(packablePath)) + { + continue; + } + + string[] files = Directory.GetFiles(packablePath, "*.*", SearchOption.AllDirectories); + + foreach (string file in files) + { + if (file.EndsWith(".meta")) + { + continue; + } + + Type assetType = AssetDatabase.GetMainAssetTypeAtPath(file); + + if (assetType != typeof(Sprite) && assetType != typeof(Texture2D)) + { + continue; + } + + yield return AssetDatabase.LoadMainAssetAtPath(file); + } + } + } + } + + /// + /// Opens the addressables group settings window. + /// + public static void OpenGroupsWindow() + { + openAddressableWindowAction(); + } + + /// + /// Opens the addressables labels settings window. + /// + public static void OpenLabelsWindow() + { + if (!AddressableAssetSettingsDefaultObject.SettingsExists) return; + EditorWindow.GetWindow().Intialize(AddressableAssetSettingsDefaultObject.Settings); + } + + /// + /// Converts the specified object into an addressable. + /// + /// The object to make addressable. + /// The addressable group to add the object to. + public static void MakeAddressable(UnityEngine.Object obj, AddressableAssetGroup group) + { + if (!AddressableAssetSettingsDefaultObject.SettingsExists) return; + + var settings = AddressableAssetSettingsDefaultObject.Settings; + var guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(obj)); + var entry = settings.CreateOrMoveEntry(guid, group, false, false); + entry.address = AssetDatabase.GUIDToAssetPath(guid); + settings.SetDirty(AddressableAssetSettings.ModificationEvent.EntryCreated, entry, false, true); + } + + /// + /// Gets the type targeted by an AssetReference type. For example, returns Texture for AssetReferenceTexture. + /// Returns UnityEngine.Object for AssetReference type. + /// + /// A type of AssetReference, for example, AssetReferenceTexture. + /// + /// If the given type inherits AssetRefernceT<T>, then the method returns the generic T argument. + /// If the given type is AssetReference, then the method returns UnityEngine.Object. + /// + /// Throws if given parameter is null. + /// Throws if the given type does not inherit or is AssetReference. + public static Type GetAssetReferenceTargetType(Type assetReferenceType) + { + if (assetReferenceType == null) throw new ArgumentNullException(nameof(assetReferenceType)); + + if (assetReferenceType.InheritsFrom(typeof(AssetReferenceT<>))) + { + var genericBase = assetReferenceType.GetGenericBaseType(typeof(AssetReferenceT<>)); + return genericBase.GetGenericArguments()[0]; + } + else + { + return typeof(UnityEngine.Object); + } + } + + public static Type[] GetAssetReferenceValidMainAssetTypes(Type assetReferenceType) + { + if (assetReferenceType == null) throw new ArgumentNullException(nameof(assetReferenceType)); + + if (assetReferenceType.InheritsFrom(typeof(AssetReferenceSprite))) + { + return new Type[] + { + typeof(Sprite), + typeof(SpriteAtlas), + typeof(Texture2D) + }; + } + else if (assetReferenceType.InheritsFrom(typeof(AssetReferenceAtlasedSprite))) + { + return new Type[] { typeof(SpriteAtlas) }; + } + + return new Type[] { GetAssetReferenceTargetType(assetReferenceType) }; + } + + /// + /// Validate an asset against a list of AssetReferenceUIRestrictions. + /// + /// The restrictions to apply. + /// The asset to validate. + /// Returns true if the asset passes all restrictions. Otherwise false. + /// Throws if Addressable Settings have not been created. + /// Throws if restrictions or asset is null. + public static bool ValidateAssetReferenceRestrictions(List restrictions, UnityEngine.Object asset) + { + return ValidateAssetReferenceRestrictions(restrictions, asset, out _); + } + + /// + /// Validate an asset against a list of AssetReferenceUIRestrictions. + /// + /// The restrictions to apply. + /// The asset to validate. + /// The first failed restriction. null if no restrictions failed. + /// Returns true if the asset passes all restrictions. Otherwise false. + /// Throws if Addressable Settings have not been created. + /// Throws if restrictions or asset is null. + public static bool ValidateAssetReferenceRestrictions(List restrictions, UnityEngine.Object asset, out AssetReferenceUIRestriction failedRestriction) + { + if (AddressableAssetSettingsDefaultObject.SettingsExists == false) throw new Exception("Addressable Settings have not been created."); + + _ = restrictions ?? throw new ArgumentNullException(nameof(restrictions)); + _ = asset ?? throw new ArgumentNullException(nameof(asset)); + + for (int i = 0; i < restrictions.Count; i++) + { + if (restrictions[i] is AssetReferenceUILabelRestriction labels) + { + /* Unity, in all its wisdom, have apparently decided not to implement their AssetReferenceRestriction attributes in some versions(?) + * So, to compensate, we're going to manually validate the label restriction attribute, so atleast that works. */ + + var guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(asset)); + + var entry = AddressableAssetSettingsDefaultObject.Settings.FindAssetEntry(guid, true); + + if (entry.labels.Any(x => labels.m_AllowedLabels.Contains(x)) == false) + { + failedRestriction = labels; + return false; + } + } + else if (restrictions[i].ValidateAsset(asset) == false) + { + failedRestriction = restrictions[i]; + return false; + } + } + + failedRestriction = null; + return true; + } + + internal static TAssetReference CreateAssetReference(string guid) where TAssetReference : AssetReference + { + if (string.IsNullOrEmpty(guid)) + { + return null; + } + + return (TAssetReference) Activator.CreateInstance(typeof(TAssetReference), guid); + } + + internal static TAssetReference CreateAssetReference(UnityEngine.Object obj) where TAssetReference : AssetReference + { + if (obj == null) + { + return null; + } + + string guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(obj)); + + return CreateAssetReference(guid); + } + + internal static AddressableAssetEntry CreateFakeAddressableAssetEntry(string guid) + { + var entry = (AddressableAssetEntry) FormatterServices.GetUninitializedObject(typeof(AddressableAssetEntry)); + + OdinAddressableReflection.AddressableAssetEntry_mGUID_Field.SetValue(entry, guid); + + return entry; + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/AddressablesInspectors.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/AddressablesInspectors.cs.meta new file mode 100644 index 0000000..66d12ee --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/AddressablesInspectors.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ba1664ec1a0467641a742eaadae146d4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal.meta new file mode 100644 index 0000000..b945d11 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 6384593779a7421881db64cdb25db4c5 +timeCreated: 1718984862 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflection.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflection.cs new file mode 100644 index 0000000..8add36b --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflection.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR +using System.Reflection; +using UnityEditor.AddressableAssets.Settings; + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor.Internal +{ + internal static class OdinAddressableReflection + { + public static FieldInfo AddressableAssetEntry_mGUID_Field; + + static OdinAddressableReflection() + { + AddressableAssetEntry_mGUID_Field = typeof(AddressableAssetEntry).GetField("m_GUID", BindingFlags.Instance | BindingFlags.NonPublic); + } + + internal static void EnsureConstructed() { } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflection.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflection.cs.meta new file mode 100644 index 0000000..55c0373 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflection.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c1a8e9ae60bf4edebd0ec6052eb9064e +timeCreated: 1718984883 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflectionValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflectionValidator.cs new file mode 100644 index 0000000..4a287ea --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflectionValidator.cs @@ -0,0 +1,46 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR +#if SIRENIX_INTERNAL +using System.Collections; +using System.Reflection; +using Sirenix.OdinInspector.Editor.Validation; +using Sirenix.OdinInspector.Modules.Addressables.Editor.Internal; + +[assembly: RegisterValidator(typeof(OdinAddressableReflectionValidator))] + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor.Internal +{ + public class OdinAddressableReflectionValidator : GlobalValidator + { + public override IEnumerable RunValidation(ValidationResult result) + { + OdinAddressableReflection.EnsureConstructed(); + + FieldInfo[] fields = typeof(OdinAddressableReflection).GetFields(BindingFlags.Static | BindingFlags.Public); + + for (var i = 0; i < fields.Length; i++) + { + if (fields[i].IsLiteral) + { + continue; + } + + if (fields[i].GetValue(null) != null) + { + continue; + } + + result.AddError($"[Odin Addressable Module]: {fields[i].Name} was not found."); + } + + return null; + } + } +} +#endif +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflectionValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflectionValidator.cs.meta new file mode 100644 index 0000000..e662bfb --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflectionValidator.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 97bf306f5a4249b192921db9152934f6 +timeCreated: 1718984873 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef new file mode 100644 index 0000000..7be66dc --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef @@ -0,0 +1,29 @@ +{ + "name": "Sirenix.OdinInspector.Modules.Unity.Addressables", + "references": [ + "Unity.Addressables", + "Unity.Addressables.Editor", + "Sirenix.Serialization", + "Sirenix.OdinInspector.Attributes", + "Sirenix.OdinInspector.Editor", + "Sirenix.Utilities.Editor", + "Sirenix.Utilities", + "Sirenix.OdinValidator.Editor" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": true, + "overrideReferences": false, + "precompiledReferences": [ + "Sirenix.Serialization.dll", + "Sirenix.OdinInspector.Attributes.dll", + "Sirenix.OdinInspector.Editor.dll", + "Sirenix.Utilities.Editor.dll", + "Sirenix.Utilities.dll", + "Sirenix.OdinValidator.Editor.dll" + ], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef.meta new file mode 100644 index 0000000..f7deb1d --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3b4d8e09c665bfa47849130d8695171e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators.meta new file mode 100644 index 0000000..05862c2 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b568c1d508ce0b74eb0025b8501d1c1e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetLabelReferenceValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetLabelReferenceValidator.cs new file mode 100644 index 0000000..82f677b --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetLabelReferenceValidator.cs @@ -0,0 +1,94 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR + +using UnityEngine; +using UnityEditor.AddressableAssets; +using Sirenix.OdinInspector.Editor.Validation; +using UnityEngine.AddressableAssets; +using Sirenix.OdinInspector.Modules.Addressables.Editor; + +#if ODIN_VALIDATOR_3_1 +[assembly: RegisterValidationRule(typeof(AssetLabelReferenceValidator), Description = + "This validator ensures that AssetLabelReferences marked with the Required attribute display an error " + + "message if they are not set. It can also be configured to require that all AssetLabelReferences be set " + + "by default; the Optional attribute can then be used to exclude specific AssetLabelReferences from " + + "validation.")] +#else +[assembly: RegisterValidator(typeof(AssetLabelReferenceValidator))] +#endif + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + /// + /// Validator for AssetLabelReference values. + /// + public class AssetLabelReferenceValidator : ValueValidator + { + [Tooltip("If enabled, the validator will display an error message if the AssetLabelReference is not set. " + + "If disabled, the validator will only display an error message if the AssetLabelReference is set, but the " + + "assigned label does not exist.")] + [ToggleLeft] + public bool RequiredByDefault; + + private bool required; + private bool optional; + private string requiredMessage; + + protected override void Initialize() + { + var requiredAttr = this.Property.GetAttribute(); + + this.requiredMessage = requiredAttr?.ErrorMessage ?? $"{this.Property.NiceName} is required."; + + if (this.RequiredByDefault) + { + required = true; + optional = Property.GetAttribute() != null; + } + else + { + required = requiredAttr != null; + optional = false; + } + } + + protected override void Validate(ValidationResult result) + { + // If the Addressables settings have not been created, nothing else is really valid. + if (AddressableAssetSettingsDefaultObject.SettingsExists == false) + { + result.AddError("Addressables Settings have not been created.") + .WithButton("Open Settings Window", () => OdinAddressableUtility.OpenGroupsWindow()); + return; + } + + var value = Value?.labelString; + + if (string.IsNullOrEmpty(value)) + { + if (optional == false && required) // Optional == false & required? Nice. + { + result.AddError(requiredMessage).EnableRichText(); + } + } + else + { + var labels = AddressableAssetSettingsDefaultObject.Settings.GetLabels(); + + if (labels.Contains(value) == false) + { + result.AddError($"Label {value} has not been created as a label.") + .WithButton("Open Label Settings", () => OdinAddressableUtility.OpenLabelsWindow()); + } + } + } + } + +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetLabelReferenceValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetLabelReferenceValidator.cs.meta new file mode 100644 index 0000000..c9b6cfc --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetLabelReferenceValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fcaf7dc3b9a98a545b301a1ea175055b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetReferenceValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetReferenceValidator.cs new file mode 100644 index 0000000..db04407 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetReferenceValidator.cs @@ -0,0 +1,280 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR + +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEditor; +using UnityEditor.AddressableAssets; +using Sirenix.OdinInspector.Editor.Validation; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +using UnityEditor.AddressableAssets.Settings; +using UnityEngine.AddressableAssets; +using Sirenix.OdinInspector.Modules.Addressables.Editor; + +#if ODIN_VALIDATOR_3_1 +[assembly: RegisterValidationRule(typeof(AssetReferenceValidator), Description = + "This validator provides robust integrity checks for your asset references within Unity. " + + "It validates whether an asset reference has been assigned, and if it's missing, raises an error. " + + "It further checks the existence of the main asset at the assigned path, ensuring it hasn't been " + + "inadvertently deleted or moved. The validator also verifies if the assigned asset is addressable " + + "and, if not, offers a fix to make it addressable. Moreover, it ensures the asset adheres to " + + "specific label restrictions set through the AssetReferenceUILabelRestriction attribute. " + + "Lastly, it performs checks on any sub-object linked to the asset, making sure it hasn't gone missing. " + + "This comprehensive validation system prevents hard-to-spot bugs and errors, " + + "fostering a more robust and efficient development workflow.")] +#else +[assembly: RegisterValidator(typeof(AssetReferenceValidator))] +#endif + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + public class AssetReferenceValidator : ValueValidator + { + [Tooltip("If true and the AssetReference is not marked with the Optional attribute, " + + "the validator will display an error message if the AssetReference is not set. " + + "If false, the validator will only display an error message if the AssetReference is set, " + + "but the assigned asset does not exist.")] + [ToggleLeft] + public bool RequiredByDefault; + + private bool required; + private bool optional; + private string requiredMessage; + + private List restrictions; + + protected override void Initialize() + { + var requiredAttr = this.Property.GetAttribute(); + + this.requiredMessage = requiredAttr?.ErrorMessage ?? $"{this.Property.NiceName} is required."; + + if (this.RequiredByDefault) + { + this.required = true; + this.optional = this.Property.GetAttribute() != null; + } + else + { + this.required = requiredAttr != null; + this.optional = false; + } + + this.restrictions = new List(); + foreach (var attr in this.Property.Attributes) + { + if (attr is AssetReferenceUIRestriction r) + { + this.restrictions.Add(r); + } + } + } + + protected override void Validate(ValidationResult result) + { + // If the Addressables settings have not been created, nothing else is really valid. + if (AddressableAssetSettingsDefaultObject.SettingsExists == false) + { + result.AddError("Addressables Settings have not been created.") + .WithButton("Open Settings Window", () => OdinAddressableUtility.OpenGroupsWindow()); + return; + } + + var assetReference = this.Value; + var assetReferenceHasBeenAssigned = !string.IsNullOrEmpty(assetReference?.AssetGUID); + + // No item has been assigned. + if (!assetReferenceHasBeenAssigned) + { + if (optional == false && required) // Optional == false & required? Nice. + { + result.AddError(this.requiredMessage).EnableRichText(); + } + + return; + } + + var assetPath = AssetDatabase.GUIDToAssetPath(assetReference.AssetGUID); + var mainAsset = AssetDatabase.LoadMainAssetAtPath(assetPath); + + // The item has been assigned, but is now missing. + if (mainAsset == null) + { + result.AddError($"The previously assigned main asset with path '{assetPath}' is missing. GUID '{assetReference.AssetGUID}'"); + return; + } + + var addressableAssetEntry = AddressableAssetSettingsDefaultObject.Settings.FindAssetEntry(assetReference.AssetGUID, true); + var isAddressable = addressableAssetEntry != null; + + // Somehow an item sneaked through all of unity's validation measures and ended up not being addressable + // while still ending up in the asset reference object field. + if (!isAddressable) + { + result.AddError("Assigned item is not addressable.") + .WithFix("Make Addressable", args => OdinAddressableUtility.MakeAddressable(mainAsset, args.Group)); + } + // Check the assigned item against any and all label restrictions. + else + { + if (OdinAddressableUtility.ValidateAssetReferenceRestrictions(restrictions, mainAsset, out var failedRestriction) == false) + { + if (failedRestriction is AssetReferenceUILabelRestriction labelRestriction) + { + result.AddError($"Asset reference is restricted to items with these specific labels '{string.Join(", ", labelRestriction.m_AllowedLabels)}'. The currently assigned item has none of them.") + .WithFix("Add Labels", args => SetLabels(mainAsset, args.AssetLabels)); + } + else + { + result.AddError("Restriction failed: " + failedRestriction.ToString()); + } + } + } + + // The assigned item had a sub object, but it's missing. + if (!string.IsNullOrEmpty(assetReference.SubObjectName)) + { + var subObjects = OdinAddressableUtility.EnumerateAllActualAndVirtualSubAssets(mainAsset, assetPath); + + var hasMissingSubObject = true; + + foreach (var subObject in subObjects) + { + if (subObject.name == assetReference.SubObjectName) + { + hasMissingSubObject = false; + break; + } + } + + if (hasMissingSubObject) + { + result.AddError($"The previously assigned sub asset with name '{assetReference.SubObjectName}' is missing.").EnableRichText(); + } + } + + if (assetReference.ValidateAsset(mainAsset) || assetReference.ValidateAsset(assetPath)) + return; + + if (assetReference is AssetReferenceSprite && assetReference.editorAsset is Sprite) + return; + + result.AddError($"{assetReference.GetType().GetNiceFullName()}.ValidateAsset failed to validate assigned asset."); + } + + private static void SetLabels(UnityEngine.Object obj, List assetLabels) + { + if (!AddressableAssetSettingsDefaultObject.SettingsExists) return; + + var settings = AddressableAssetSettingsDefaultObject.Settings; + var guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(obj)); + var entry = settings.FindAssetEntry(guid, false); + + foreach (var assetLabel in assetLabels.Where(a => a.Toggled)) + { + entry.SetLabel(assetLabel.Label, true, false, false); + } + + settings.SetDirty(AddressableAssetSettings.ModificationEvent.LabelAdded, entry, false, true); + } + + private class MakeAddressableFixArgs + { + [ValueDropdown(nameof(GetGroups))] + [OnInspectorInit(nameof(SelectDefault))] + public AddressableAssetGroup Group; + + private void SelectDefault() + { + this.Group = AddressableAssetSettingsDefaultObject.SettingsExists + ? AddressableAssetSettingsDefaultObject.Settings.DefaultGroup + : null; + } + + private static IEnumerable GetGroups() + { + return !AddressableAssetSettingsDefaultObject.SettingsExists + ? Enumerable.Empty() + : AddressableAssetSettingsDefaultObject.Settings.groups + .Where(group => !group.ReadOnly) + .Select(group => new ValueDropdownItem(group.Name, group)); + } + + [Button(SdfIconType.ListNested), PropertySpace(8f)] + private void OpenAddressablesGroups() => OdinAddressableUtility.OpenGroupsWindow(); + } + + private class AddLabelsFixArgs + { + [HideIf("@true")] + public List AssetLabels + { + get + { + if (!AddressableAssetSettingsDefaultObject.SettingsExists) return this.assetLabels; + + var settings = AddressableAssetSettingsDefaultObject.Settings; + var labels = settings + .GetLabels() + .Select(l => new AssetLabel { Label = l, Toggled = false }) + .ToList(); + + foreach (var assetLabel in this.assetLabels) + { + var label = labels.FirstOrDefault(l => l.Label == assetLabel.Label); + + if (label != null) + { + label.Toggled = assetLabel.Toggled; + } + } + + this.assetLabels = labels; + return this.assetLabels; + } + } + + private List assetLabels = new List(); + + [OnInspectorGUI] + private void Draw() + { + var togglesRect = EditorGUILayout.GetControlRect(false, Mathf.CeilToInt(this.AssetLabels.Count / 2f) * 20f); + + for (var i = 0; i < this.AssetLabels.Count; i++) + { + var assetLabel = this.AssetLabels[i]; + var toggleRect = togglesRect.SplitGrid(togglesRect.width / 2f, 20, i); + assetLabel.Toggled = GUI.Toggle(toggleRect, assetLabel.Toggled, assetLabel.Label); + } + + if (!AddressableAssetSettingsDefaultObject.SettingsExists) return; + + GUILayout.Space(8f); + + var buttonsRect = EditorGUILayout.GetControlRect(false, 20f); + + if (SirenixEditorGUI.SDFIconButton(buttonsRect, "Open Addressables Labels", SdfIconType.TagsFill)) + { + OdinAddressableUtility.OpenLabelsWindow(); + } + } + } + + private class AssetLabel + { + public bool Toggled; + public string Label; + } + } + +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetReferenceValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetReferenceValidator.cs.meta new file mode 100644 index 0000000..4442178 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetReferenceValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b44b08a1f58a83149988fde5ac600fe4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckDuplicateBundleDependenciesValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckDuplicateBundleDependenciesValidator.cs new file mode 100644 index 0000000..2275f11 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckDuplicateBundleDependenciesValidator.cs @@ -0,0 +1,201 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR && ODIN_VALIDATOR_3_1 + +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEditor; +using UnityEditor.AddressableAssets; +using Sirenix.OdinInspector.Editor.Validation; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +using UnityEditor.AddressableAssets.Settings; +using System.Collections; +using System; +using Sirenix.OdinValidator.Editor; +using Sirenix.OdinInspector.Modules.Addressables.Editor; + +[assembly: RegisterValidationRule(typeof(CheckDuplicateBundleDependenciesValidator), + Description = "This validator detects potential duplicate asset dependencies in an addressable group, without the need for a build. " + + "For instance, imagine two prefabs in separate groups, both referencing the same material. Each group would then include the material " + + "and all its associated dependencies. " + + "To address this, the material should be marked as Addressable, either with one of the prefabs or in a distinct group.\n\n" + + "Fixes: Executing the fix will make the dependency addressable and move it to the specified group.\n\n" + + "Exceptions: It's important to note that duplicate assets aren't inherently problematic. For example, if certain assets are " + + "never accessed by the same user group, such as region-specific assets, these duplications might be desired or at least inconsequential. " + + "As every project is unique, decisions concerning duplicate asset dependencies should be considered on a case-by-case basis.")] + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + public class CheckDuplicateBundleDependenciesValidator : GlobalValidator + { + private static Dictionary> dependencyGroupMap = new Dictionary>(); + + [Tooltip("The severity of the validation result.")] + public ValidatorSeverity ValidatorSeverity = ValidatorSeverity.Warning; + + [Tooltip("Assets to ignore when validating.")] + [LabelText("Ignored GUIDs"), CustomValueDrawer(nameof(DrawGUIDEntry))] + public List IgnoredGUIDs = new List(); + + public override IEnumerable RunValidation(ValidationResult result) + { + dependencyGroupMap.Clear(); + + var addressableAssetSettings = AddressableAssetSettingsDefaultObject.Settings; + + if (addressableAssetSettings == null) yield break; + + foreach (var addressableAssetGroup in addressableAssetSettings.groups) + { + if (addressableAssetGroup == null) continue; + + foreach (var addressableAssetEntry in addressableAssetGroup.entries) + { + var dependencyAssetPaths = AssetDatabase.GetDependencies(addressableAssetEntry.AssetPath) + .Where(assetPath => !assetPath.EndsWith(".cs", StringComparison.OrdinalIgnoreCase) && + !assetPath.EndsWith(".dll", StringComparison.OrdinalIgnoreCase)); + + foreach (var dependencyAssetPath in dependencyAssetPaths) + { + var dependencyGUID = new GUID(AssetDatabase.AssetPathToGUID(dependencyAssetPath)); + + if (this.IgnoredGUIDs.Contains(dependencyGUID.ToString())) continue; + + var dependencyAddressableAssetEntry = addressableAssetSettings.FindAssetEntry(dependencyGUID.ToString()); + + var isAddressable = dependencyAddressableAssetEntry != null; + if (isAddressable) continue; + + if (!dependencyGroupMap.ContainsKey(dependencyGUID)) + { + dependencyGroupMap.Add(dependencyGUID, new List()); + } + + if (!dependencyGroupMap[dependencyGUID].Contains(addressableAssetGroup.Name)) + { + dependencyGroupMap[dependencyGUID].Add(addressableAssetGroup.Name); + } + } + } + } + + foreach (var kvp in dependencyGroupMap) + { + var dependencyGUID = kvp.Key; + var groups = kvp.Value; + + if (groups.Count > 1) + { + var assetPath = AssetDatabase.GUIDToAssetPath(dependencyGUID.ToString()); + var message = $"{assetPath} is duplicated in these groups: {string.Join(", ", groups)}"; + + result.Add(this.ValidatorSeverity, message).WithFix(args => + { + if (args.FixChoice == FixChoice.Ignore) + { + var sourceType = args.IgnoreForEveryone ? ConfigSourceType.Project : ConfigSourceType.Local; + var data = RuleConfig.Instance.GetRuleData(sourceType); + data.IgnoredGUIDs.Add(dependencyGUID.ToString()); + RuleConfig.Instance.SetAndSaveRuleData(data, sourceType); + return; + } + + var obj = AssetDatabase.LoadAssetAtPath(assetPath, typeof(UnityEngine.Object)); + AddressableAssetGroup group; + + if (args.Group == "Create New Group") + { + if (args.GroupName.IsNullOrWhitespace()) return; + + group = addressableAssetSettings.FindGroup(args.GroupName); + + if (group == null) + { + group = addressableAssetSettings.CreateGroup(args.GroupName, false, false, false, null); + } + } + else + { + group = addressableAssetSettings.FindGroup(args.Group); + + if (group == null) + { + group = addressableAssetSettings.CreateGroup(args.Group, false, false, false, null); + } + } + + OdinAddressableUtility.MakeAddressable(obj, group); + }, false).WithModifyRuleDataContextClick("Ignore", data => + { + data.IgnoredGUIDs.Add(dependencyGUID.ToString()); + }).SetSelectionObject(AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(dependencyGUID.ToString()))); + } + } + } + + private string DrawGUIDEntry(string guid) + { + var assetPath = AssetDatabase.GUIDToAssetPath(guid); + EditorGUILayout.TextArea(assetPath, SirenixGUIStyles.MultiLineLabel); + EditorGUILayout.TextField(guid); + return guid; + } + + private enum FixChoice + { + AddToGroup, + Ignore, + } + + private class FixArgs + { + [EnumToggleButtons, HideLabel] + public FixChoice FixChoice; + + [PropertySpace(10)] + [ValueDropdown("Groups")] + //[Title("Group To Add To", TitleAlignment = TitleAlignments.Centered)] + [ShowIf(nameof(FixChoice), FixChoice.AddToGroup, Animate = false)] + public string Group = "Duplicate Asset Isolation"; + + [ValidateInput(nameof(ValidateGroupName), "The group name cannot be empty")] + [ShowIf(nameof(ShowNewGroupName), Animate = false)] + public string GroupName; + + [LabelWidth(120f)] + [PropertySpace(10)] + [ShowIf("FixChoice", FixChoice.Ignore, Animate = false)] + public bool IgnoreForEveryone = true; + + [OnInspectorGUI] + [PropertySpace(10)] + [DetailedInfoBox("Note that duplicate assets may not always be an issue", "Note that duplicate assets may not always be an issue. If assets will never be requested by the same set of users (for example, region-specific assets), then duplicate dependencies may be desired, or at least inconsequential. Each Project is unique, so fixing duplicate asset dependencies should be evaluated on a case by case basis")] + private void Dummy() { } + + private bool ShowNewGroupName => this.FixChoice != FixChoice.Ignore && this.Group == "Create New Group"; + + private bool ValidateGroupName() => !this.GroupName.IsNullOrWhitespace(); + + private IEnumerable Groups() + { + var addressableAssetSettings = AddressableAssetSettingsDefaultObject.Settings; + + return addressableAssetSettings == null + ? Enumerable.Empty() + : addressableAssetSettings.groups + .Where(group => group != null && group.Name != "Built In Data") + .Select(group => group.Name) + .Append("Duplicate Asset Isolation") + .Prepend("Create New Group"); + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckDuplicateBundleDependenciesValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckDuplicateBundleDependenciesValidator.cs.meta new file mode 100644 index 0000000..f7d4e44 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckDuplicateBundleDependenciesValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bdc8ee2cf75a17644a0bd81a965cc2e0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs new file mode 100644 index 0000000..0e0390e --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs @@ -0,0 +1,171 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR && ODIN_VALIDATOR_3_1 + +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEditor; +using UnityEditor.AddressableAssets; +using Sirenix.OdinInspector.Editor.Validation; +using Sirenix.Utilities.Editor; +using System.Collections; +using System; +using System.IO; +using Sirenix.OdinValidator.Editor; +using Sirenix.OdinInspector.Modules.Addressables.Editor; + +[assembly: RegisterValidationRule(typeof(CheckResourcesToAddressableDuplicateDependenciesValidator), + Description = "This validator identifies dependencies that are duplicated in both addressable groups and the \"Resources\" folder.\n\n" + + "These duplications mean that data will be included in both the application build and the addressables build.\n\n" + + "You can decide to simply ignore these duplicated dependencies if this behavior is desired, or use the provided fix " + + "to move the asset outside of the \"Resources\" folder.")] + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + public class CheckResourcesToAddressableDuplicateDependenciesValidator : GlobalValidator + { + [Tooltip("The severity of the validation result.")] + public ValidatorSeverity ValidatorSeverity = ValidatorSeverity.Warning; + + [Tooltip("Assets to ignore when validating.")] + [LabelText("Ignored GUIDs"), CustomValueDrawer(nameof(DrawGUIDEntry))] + public List IgnoredGUIDs = new List(); + + public override IEnumerable RunValidation(ValidationResult result) + { + var addressableAssetSettings = AddressableAssetSettingsDefaultObject.Settings; + + if (addressableAssetSettings == null) yield break; + + foreach (var addressableAssetGroup in addressableAssetSettings.groups) + { + if (addressableAssetGroup == null) continue; + + foreach (var addressableAssetEntry in addressableAssetGroup.entries) + { + var dependencyAssetPaths = AssetDatabase.GetDependencies(addressableAssetEntry.AssetPath) + .Where(assetPath => !assetPath.EndsWith(".cs", StringComparison.OrdinalIgnoreCase) && + !assetPath.EndsWith(".dll", StringComparison.OrdinalIgnoreCase)); + + foreach (var dependencyAssetPath in dependencyAssetPaths) + { + var dependencyGUID = new GUID(AssetDatabase.AssetPathToGUID(dependencyAssetPath)); + + if (this.IgnoredGUIDs.Contains(dependencyGUID.ToString())) continue; + + var dependencyAddressableAssetEntry = addressableAssetSettings.FindAssetEntry(dependencyGUID.ToString()); + + var isAddressable = dependencyAddressableAssetEntry != null; + if (isAddressable) continue; + if (!IsInsideResourcesFolder(dependencyAssetPath)) continue; + + result.Add(this.ValidatorSeverity, $"{dependencyAssetPath} is duplicated in addressable data and resource folders.") + .WithFix(args => + { + if (args.FixChoice == FixChoice.Ignore) + { + var sourceType = args.IgnoreForEveryone ? ConfigSourceType.Project : ConfigSourceType.Local; + var data = RuleConfig.Instance.GetRuleData(sourceType); + data.IgnoredGUIDs.Add(dependencyGUID.ToString()); + RuleConfig.Instance.SetAndSaveRuleData(data, sourceType); + return; + } + + if (!ValidNewFolder(args.NewFolder, out _)) return; + + if (!AssetDatabase.IsValidFolder(args.NewFolder)) + { + Directory.CreateDirectory(new DirectoryInfo(args.NewFolder).FullName); + AssetDatabase.Refresh(); + } + + var newPath = $"{args.NewFolder}/{Path.GetFileName(dependencyAssetPath)}"; + AssetDatabase.MoveAsset(dependencyAssetPath, newPath); + }, false).WithModifyRuleDataContextClick("Ignore", data => + { + data.IgnoredGUIDs.Add(dependencyGUID.ToString()); + }).SetSelectionObject(AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(dependencyGUID.ToString()))); + + yield break; + } + } + } + } + + private string DrawGUIDEntry(string guid) + { + var assetPath = AssetDatabase.GUIDToAssetPath(guid); + EditorGUILayout.TextArea(assetPath, SirenixGUIStyles.MultiLineLabel); + EditorGUILayout.TextField(guid); + return guid; + } + + private static bool IsInsideResourcesFolder(string path) + { + var pathElements = path.Split('/'); + + foreach (var pathElement in pathElements) + { + if (pathElement.Equals("Resources", StringComparison.OrdinalIgnoreCase)) + { + return true; + } + } + + return false; + } + + private static bool ValidNewFolder(string path, out string message) + { + if (IsInsideResourcesFolder(path)) + { + message = "The asset cannot be moved into a 'Resources' folder"; + return false; + } + + if (!path.StartsWith("Assets/")) + { + message = "The asset must be inside the 'Assets' folder"; + return false; + } + + message = "The folder is valid"; + return true; + } + + private enum FixChoice + { + MoveAsset, + Ignore, + } + private class FixArgs + { + [HideLabel] + [EnumToggleButtons] + public FixChoice FixChoice; + + [FolderPath] + [PropertySpace(10)] + [ValidateInput(nameof(ValidateFolderPath))] + [ShowIf("FixChoice", FixChoice.MoveAsset, Animate = false)] + public string NewFolder = "Assets/Resources_moved"; + + [LabelWidth(120f)] + [PropertySpace(10)] + [ShowIf("FixChoice", FixChoice.Ignore, Animate = false)] + public bool IgnoreForEveryone = true; + + private bool ValidateFolderPath(string path, ref string message) + { + return ValidNewFolder(path, out message); + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs.meta new file mode 100644 index 0000000..a2bc61e --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f75aebe03a9aa4a4b82d2b54dcc34de5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs new file mode 100644 index 0000000..05037ac --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs @@ -0,0 +1,34 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR + +using Sirenix.OdinInspector.Editor.Validation; +using Sirenix.OdinInspector.Modules.Addressables.Editor; +using UnityEngine.AddressableAssets; + +[assembly: RegisterValidator(typeof(DisallowAddressableSubAssetFieldAttributeValidator))] + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + /// + /// Validator for the DisallowAddressableSubAssetFieldAttribute. + /// + public class DisallowAddressableSubAssetFieldAttributeValidator : AttributeValidator + { + protected override void Validate(ValidationResult result) + { + if (this.Value != null && string.IsNullOrEmpty(this.Value.SubObjectName) == false) + { + result.AddError("Sub-asset references is not allowed on this field.") + .WithFix("Remove Sub-Asset", () => this.Value.SubObjectName = null, true); + } + } + } + +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs.meta new file mode 100644 index 0000000..7a7fd44 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5775d33ffc1143149c4f425f693b04b6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/MissingAddressableGroupReferenceValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/MissingAddressableGroupReferenceValidator.cs new file mode 100644 index 0000000..90811cc --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/MissingAddressableGroupReferenceValidator.cs @@ -0,0 +1,55 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR && ODIN_VALIDATOR_3_1 + +using System.Collections.Generic; +using UnityEditor.AddressableAssets; +using Sirenix.OdinInspector.Editor.Validation; +using UnityEditor.AddressableAssets.Settings; +using System.Collections; +using Sirenix.OdinInspector.Modules.Addressables.Editor; + +[assembly: RegisterValidator(typeof(MissingAddressableGroupReferenceValidator))] + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + public class MissingAddressableGroupReferenceValidator : GlobalValidator + { + public override IEnumerable RunValidation(ValidationResult result) + { + var addressableAssetSettings = AddressableAssetSettingsDefaultObject.Settings; + + if (addressableAssetSettings == null) yield break; + + var missingGroupIndices = new List(); + + for (var i = 0; i < addressableAssetSettings.groups.Count; i++) + { + var group = addressableAssetSettings.groups[i]; + + if (group == null) + { + missingGroupIndices.Add(i); + } + } + + if (missingGroupIndices.Count > 0) + { + result.Add(ValidatorSeverity.Error, "Addressable groups contains missing references").WithFix("Delete missing reference", () => + { + for (var i = missingGroupIndices.Count - 1; i >= 0; i--) + { + addressableAssetSettings.groups.RemoveAt(missingGroupIndices[i]); + addressableAssetSettings.SetDirty(AddressableAssetSettings.ModificationEvent.GroupRemoved, null, true, true); + } + }); + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/MissingAddressableGroupReferenceValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/MissingAddressableGroupReferenceValidator.cs.meta new file mode 100644 index 0000000..0f3914f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/MissingAddressableGroupReferenceValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4ae55abdaf19ef4498d1a2fbe1bd9f9b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/manifest.txt b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/manifest.txt new file mode 100644 index 0000000..1908900 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/manifest.txt @@ -0,0 +1,26 @@ +ManifestVersion: 1 +ModuleID: Unity.Addressables +ModuleVersion: 1.1.0.9 +ModuleFiles: + AddressablesInspectors.cs + AddressablesInspectors.cs.meta + Internal.meta + Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef + Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef.meta + Validators.meta + Internal/OdinAddressableReflection.cs + Internal/OdinAddressableReflection.cs.meta + Internal/OdinAddressableReflectionValidator.cs + Internal/OdinAddressableReflectionValidator.cs.meta + Validators/AssetLabelReferenceValidator.cs + Validators/AssetLabelReferenceValidator.cs.meta + Validators/AssetReferenceValidator.cs + Validators/AssetReferenceValidator.cs.meta + Validators/CheckDuplicateBundleDependenciesValidator.cs + Validators/CheckDuplicateBundleDependenciesValidator.cs.meta + Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs + Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs.meta + Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs + Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs.meta + Validators/MissingAddressableGroupReferenceValidator.cs + Validators/MissingAddressableGroupReferenceValidator.cs.meta diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/manifest.txt.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/manifest.txt.meta new file mode 100644 index 0000000..6691e3c --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/manifest.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 443d5e44d7b62e6498e4d81ee3d0211c +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data new file mode 100644 index 0000000..d86c063 Binary files /dev/null and b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data differ diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data.meta new file mode 100644 index 0000000..121751d --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 728df0e3465c1a148b83053a3f31d489 +timeCreated: 1573836981 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data new file mode 100644 index 0000000..cb97d6d Binary files /dev/null and b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data differ diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data.meta new file mode 100644 index 0000000..8b4ef82 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 5a1693d73a4f6e34d955789129c71e11 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data new file mode 100644 index 0000000..f3de456 Binary files /dev/null and b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data differ diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data.meta new file mode 100644 index 0000000..7f84ece --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4866e740a22eb1e49b1603b051e4d92c +timeCreated: 1573836980 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.meta new file mode 100644 index 0000000..27fc293 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e782b65f9f5ba8748b9f8e4cfa0630a0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/MathematicsDrawers.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/MathematicsDrawers.cs new file mode 100644 index 0000000..a8a70e7 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/MathematicsDrawers.cs @@ -0,0 +1,883 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +namespace Sirenix.OdinInspector.Modules.UnityMathematics.Editor +{ +#if UNITY_EDITOR + using System; + using System.Collections.Generic; + using System.Reflection; + using Sirenix.OdinInspector.Editor; + using Sirenix.Utilities; + using Sirenix.Utilities.Editor; + using Unity.Mathematics; + using UnityEditor; + using UnityEngine; + + public sealed class MatrixFloat2x2Processor : MatrixProcessor { } + public sealed class MatrixFloat3x2Processor : MatrixProcessor { } + public sealed class MatrixFloat4x2Processor : MatrixProcessor { } + public sealed class MatrixFloat2x3Processor : MatrixProcessor { } + public sealed class MatrixFloat3x3Processor : MatrixProcessor { } + public sealed class MatrixFloat4x3Processor : MatrixProcessor { } + public sealed class MatrixFloat2x4Processor : MatrixProcessor { } + public sealed class MatrixFloat3x4Processor : MatrixProcessor { } + public sealed class MatrixFloat4x4Processor : MatrixProcessor { } + + public sealed class MatrixDouble2x2Processor : MatrixProcessor { } + public sealed class MatrixDouble3x2Processor : MatrixProcessor { } + public sealed class MatrixDouble4x2Processor : MatrixProcessor { } + public sealed class MatrixDouble2x3Processor : MatrixProcessor { } + public sealed class MatrixDouble3x3Processor : MatrixProcessor { } + public sealed class MatrixDouble4x3Processor : MatrixProcessor { } + public sealed class MatrixDouble2x4Processor : MatrixProcessor { } + public sealed class MatrixDouble3x4Processor : MatrixProcessor { } + public sealed class MatrixDouble4x4Processor : MatrixProcessor { } + + public sealed class MatrixBool2x2Processor : MatrixProcessor { } + public sealed class MatrixBool3x2Processor : MatrixProcessor { } + public sealed class MatrixBool4x2Processor : MatrixProcessor { } + public sealed class MatrixBool2x3Processor : MatrixProcessor { } + public sealed class MatrixBool3x3Processor : MatrixProcessor { } + public sealed class MatrixBool4x3Processor : MatrixProcessor { } + public sealed class MatrixBool2x4Processor : MatrixProcessor { } + public sealed class MatrixBool3x4Processor : MatrixProcessor { } + public sealed class MatrixBool4x4Processor : MatrixProcessor { } + + public sealed class MatrixInt2x2Processor : MatrixProcessor { } + public sealed class MatrixInt3x2Processor : MatrixProcessor { } + public sealed class MatrixInt4x2Processor : MatrixProcessor { } + public sealed class MatrixInt2x3Processor : MatrixProcessor { } + public sealed class MatrixInt3x3Processor : MatrixProcessor { } + public sealed class MatrixInt4x3Processor : MatrixProcessor { } + public sealed class MatrixInt2x4Processor : MatrixProcessor { } + public sealed class MatrixInt3x4Processor : MatrixProcessor { } + public sealed class MatrixInt4x4Processor : MatrixProcessor { } + + public sealed class MatrixUInt2x2Processor : MatrixProcessor { } + public sealed class MatrixUInt3x2Processor : MatrixProcessor { } + public sealed class MatrixUInt4x2Processor : MatrixProcessor { } + public sealed class MatrixUInt2x3Processor : MatrixProcessor { } + public sealed class MatrixUInt3x3Processor : MatrixProcessor { } + public sealed class MatrixUInt4x3Processor : MatrixProcessor { } + public sealed class MatrixUInt2x4Processor : MatrixProcessor { } + public sealed class MatrixUInt3x4Processor : MatrixProcessor { } + public sealed class MatrixUInt4x4Processor : MatrixProcessor { } + + public sealed class DisableUnityMatrixDrawerAttribute : Attribute { } + + public abstract class MatrixProcessor : OdinAttributeProcessor + { + public override void ProcessSelfAttributes(InspectorProperty property, List attributes) + { + attributes.GetOrAddAttribute(); + attributes.GetOrAddAttribute(); + } + + public override void ProcessChildMemberAttributes(InspectorProperty parentProperty, MemberInfo member, List attributes) + { + attributes.Add(new HideLabelAttribute()); + attributes.Add(new MatrixChildAttribute()); + } + } + + public class DisableUnityMatrixDrawerAttributeDrawer : OdinAttributeDrawer + { + protected override void Initialize() + { + this.SkipWhenDrawing = true; + var chain = this.Property.GetActiveDrawerChain().BakedDrawerArray; + + for (int i = 0; i < chain.Length; i++) + { + var type = chain[i].GetType(); + + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(UnityPropertyDrawer<,>) && type.GetGenericArguments()[0].Name == "MatrixDrawer") + { + chain[i].SkipWhenDrawing = true; + break; + } + } + } + } + + public class MatrixChildAttribute : Attribute { } + + public class Bool2Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 100; + + if (label != null) + { + GUILayout.Space(3); // Ugh, better than nothing + } + + var options = GUILayoutOptions.Height(EditorGUIUtility.singleLineHeight); + + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + EditorGUILayout.EndVertical(); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + EditorGUILayout.EndVertical(); + GUIHelper.PopLabelWidth(); + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class Bool3Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 100; + + if (label != null) + { + GUILayout.Space(3); // Ugh, better than nothing + } + + var options = GUILayoutOptions.Height(EditorGUIUtility.singleLineHeight); + + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + EditorGUILayout.EndVertical(); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + EditorGUILayout.EndVertical(); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + EditorGUILayout.EndVertical(); + GUIHelper.PopLabelWidth(); + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class Bool4Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 100; + + if (label != null) + { + GUILayout.Space(3); // Ugh, better than nothing + } + + var options = GUILayoutOptions.Height(EditorGUIUtility.singleLineHeight); + + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + EditorGUILayout.EndVertical(); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + EditorGUILayout.EndVertical(); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + EditorGUILayout.EndVertical(); + EditorGUILayout.BeginVertical(options); + this.ValueEntry.Property.Children[3].Draw(showLabels ? GUIHelper.TempContent("W") : null); + EditorGUILayout.EndVertical(); + GUIHelper.PopLabelWidth(); + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class Float2Drawer : OdinValueDrawer, IDefinesGenericMenuItems + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + // Slide rect + { + var val = this.ValueEntry.SmartValue; + EditorGUI.BeginChangeCheck(); + var vec = SirenixEditorFields.VectorPrefixSlideRect(labelRect, new Vector2(val.x, val.y)); + val = new float2(vec.x, vec.y); + if (EditorGUI.EndChangeCheck()) + { + this.ValueEntry.SmartValue = val; + } + } + + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + + /// + /// Populates the generic menu for the property. + /// + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + float2 value = (float2)property.ValueEntry.WeakSmartValue; + var vec = new Vector2(value.x, value.y); + + if (genericMenu.GetItemCount() > 0) + { + genericMenu.AddSeparator(""); + } + genericMenu.AddItem(new GUIContent("Normalize"), Mathf.Approximately(vec.magnitude, 1f), () => NormalizeEntries(property)); + genericMenu.AddItem(new GUIContent("Zero", "Set the vector to (0, 0)"), vec == Vector2.zero, () => SetVector(property, Vector2.zero)); + genericMenu.AddItem(new GUIContent("One", "Set the vector to (1, 1)"), vec == Vector2.one, () => SetVector(property, Vector2.one)); + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent("Right", "Set the vector to (1, 0)"), vec == Vector2.right, () => SetVector(property, Vector2.right)); + genericMenu.AddItem(new GUIContent("Left", "Set the vector to (-1, 0)"), vec == Vector2.left, () => SetVector(property, Vector2.left)); + genericMenu.AddItem(new GUIContent("Up", "Set the vector to (0, 1)"), vec == Vector2.up, () => SetVector(property, Vector2.up)); + genericMenu.AddItem(new GUIContent("Down", "Set the vector to (0, -1)"), vec == Vector2.down, () => SetVector(property, Vector2.down)); + } + + private void SetVector(InspectorProperty property, Vector2 value) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = new float2(value.x, value.y); + } + }); + } + + private void NormalizeEntries(InspectorProperty property) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = math.normalizesafe((float2)property.ValueEntry.WeakValues[i]); + } + }); + } + } + + public class Float3Drawer : OdinValueDrawer, IDefinesGenericMenuItems + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + // Slide rect + { + var val = this.ValueEntry.SmartValue; + EditorGUI.BeginChangeCheck(); + var vec = SirenixEditorFields.VectorPrefixSlideRect(labelRect, new Vector3(val.x, val.y, val.z)); + val = new float3(vec.x, vec.y, vec.z); + if (EditorGUI.EndChangeCheck()) + { + this.ValueEntry.SmartValue = val; + } + } + + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + + /// + /// Populates the generic menu for the property. + /// + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + float3 value = (float3)property.ValueEntry.WeakSmartValue; + var vec = new Vector3(value.x, value.y, value.z); + + if (genericMenu.GetItemCount() > 0) + { + genericMenu.AddSeparator(""); + } + genericMenu.AddItem(new GUIContent("Normalize"), Mathf.Approximately(vec.magnitude, 1f), () => NormalizeEntries(property)); + genericMenu.AddItem(new GUIContent("Zero", "Set the vector to (0, 0, 0)"), vec == Vector3.zero, () => SetVector(property, Vector3.zero)); + genericMenu.AddItem(new GUIContent("One", "Set the vector to (1, 1, 1)"), vec == Vector3.one, () => SetVector(property, Vector3.one)); + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent("Right", "Set the vector to (1, 0, 0)"), vec == Vector3.right, () => SetVector(property, Vector3.right)); + genericMenu.AddItem(new GUIContent("Left", "Set the vector to (-1, 0, 0)"), vec == Vector3.left, () => SetVector(property, Vector3.left)); + genericMenu.AddItem(new GUIContent("Up", "Set the vector to (0, 1, 0)"), vec == Vector3.up, () => SetVector(property, Vector3.up)); + genericMenu.AddItem(new GUIContent("Down", "Set the vector to (0, -1, 0)"), vec == Vector3.down, () => SetVector(property, Vector3.down)); + genericMenu.AddItem(new GUIContent("Forward", "Set the vector property to (0, 0, 1)"), vec == Vector3.forward, () => SetVector(property, Vector3.forward)); + genericMenu.AddItem(new GUIContent("Back", "Set the vector property to (0, 0, -1)"), vec == Vector3.back, () => SetVector(property, Vector3.back)); + } + + private void SetVector(InspectorProperty property, Vector3 value) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = new float3(value.x, value.y, value.z); + } + }); + } + + private void NormalizeEntries(InspectorProperty property) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = math.normalizesafe((float3)property.ValueEntry.WeakValues[i]); + } + }); + } + } + + public class Float4Drawer : OdinValueDrawer, IDefinesGenericMenuItems + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + // Slide rect + { + var val = this.ValueEntry.SmartValue; + EditorGUI.BeginChangeCheck(); + var vec = SirenixEditorFields.VectorPrefixSlideRect(labelRect, new Vector4(val.x, val.y, val.z, val.w)); + val = new float4(vec.x, vec.y, vec.z, vec.w); + if (EditorGUI.EndChangeCheck()) + { + this.ValueEntry.SmartValue = val; + } + } + + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + this.ValueEntry.Property.Children[3].Draw(showLabels ? GUIHelper.TempContent("W") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + + /// + /// Populates the generic menu for the property. + /// + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + float4 value = (float4)property.ValueEntry.WeakSmartValue; + var vec = new Vector4(value.x, value.y, value.z, value.w); + + if (genericMenu.GetItemCount() > 0) + { + genericMenu.AddSeparator(""); + } + genericMenu.AddItem(new GUIContent("Normalize"), Mathf.Approximately(vec.magnitude, 1f), () => NormalizeEntries(property)); + genericMenu.AddItem(new GUIContent("Zero", "Set the vector to (0, 0, 0, 0)"), vec == Vector4.zero, () => SetVector(property, Vector3.zero)); + genericMenu.AddItem(new GUIContent("One", "Set the vector to (1, 1, 1, 1)"), vec == Vector4.one, () => SetVector(property, Vector4.one)); + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent("Right", "Set the vector to (1, 0, 0, 0)"), (Vector3)vec == Vector3.right, () => SetVector(property, Vector3.right)); + genericMenu.AddItem(new GUIContent("Left", "Set the vector to (-1, 0, 0, 0)"), (Vector3)vec == Vector3.left, () => SetVector(property, Vector3.left)); + genericMenu.AddItem(new GUIContent("Up", "Set the vector to (0, 1, 0, 0)"), (Vector3)vec == Vector3.up, () => SetVector(property, Vector3.up)); + genericMenu.AddItem(new GUIContent("Down", "Set the vector to (0, -1, 0, 0)"), (Vector3)vec == Vector3.down, () => SetVector(property, Vector3.down)); + genericMenu.AddItem(new GUIContent("Forward", "Set the vector property to (0, 0, 1, 0)"), (Vector3)vec == Vector3.forward, () => SetVector(property, Vector3.forward)); + genericMenu.AddItem(new GUIContent("Back", "Set the vector property to (0, 0, -1, 0)"), (Vector3)vec == Vector3.back, () => SetVector(property, Vector3.back)); + } + + private void SetVector(InspectorProperty property, Vector4 value) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = new float4(value.x, value.y, value.z, value.w); + } + }); + } + + private void NormalizeEntries(InspectorProperty property) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = math.normalizesafe((float4)property.ValueEntry.WeakValues[i]); + } + }); + } + } + + + public class Double2Drawer : OdinValueDrawer, IDefinesGenericMenuItems + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + // Slide rect + { + var val = this.ValueEntry.SmartValue; + EditorGUI.BeginChangeCheck(); + var vec = SirenixEditorFields.VectorPrefixSlideRect(labelRect, new Vector2((float)val.x, (float)val.y)); + val = new double2(vec.x, vec.y); + if (EditorGUI.EndChangeCheck()) + { + this.ValueEntry.SmartValue = val; + } + } + + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + + /// + /// Populates the generic menu for the property. + /// + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + double2 value = (double2)property.ValueEntry.WeakSmartValue; + var vec = new Vector2((float)value.x, (float)value.y); + + if (genericMenu.GetItemCount() > 0) + { + genericMenu.AddSeparator(""); + } + genericMenu.AddItem(new GUIContent("Normalize"), Mathf.Approximately(vec.magnitude, 1f), () => NormalizeEntries(property)); + genericMenu.AddItem(new GUIContent("Zero", "Set the vector to (0, 0)"), vec == Vector2.zero, () => SetVector(property, Vector2.zero)); + genericMenu.AddItem(new GUIContent("One", "Set the vector to (1, 1)"), vec == Vector2.one, () => SetVector(property, Vector2.one)); + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent("Right", "Set the vector to (1, 0)"), vec == Vector2.right, () => SetVector(property, Vector2.right)); + genericMenu.AddItem(new GUIContent("Left", "Set the vector to (-1, 0)"), vec == Vector2.left, () => SetVector(property, Vector2.left)); + genericMenu.AddItem(new GUIContent("Up", "Set the vector to (0, 1)"), vec == Vector2.up, () => SetVector(property, Vector2.up)); + genericMenu.AddItem(new GUIContent("Down", "Set the vector to (0, -1)"), vec == Vector2.down, () => SetVector(property, Vector2.down)); + } + + private void SetVector(InspectorProperty property, Vector2 value) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = new double2(value.x, value.y); + } + }); + } + + private void NormalizeEntries(InspectorProperty property) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = math.normalizesafe((double2)property.ValueEntry.WeakValues[i]); + } + }); + } + } + + public class Double3Drawer : OdinValueDrawer, IDefinesGenericMenuItems + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + // Slide rect + { + var val = this.ValueEntry.SmartValue; + EditorGUI.BeginChangeCheck(); + var vec = SirenixEditorFields.VectorPrefixSlideRect(labelRect, new Vector3((float)val.x, (float)val.y, (float)val.z)); + val = new double3(vec.x, vec.y, vec.z); + if (EditorGUI.EndChangeCheck()) + { + this.ValueEntry.SmartValue = val; + } + } + + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + + /// + /// Populates the generic menu for the property. + /// + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + double3 value = (double3)property.ValueEntry.WeakSmartValue; + var vec = new Vector3((float)value.x, (float)value.y, (float)value.z); + + if (genericMenu.GetItemCount() > 0) + { + genericMenu.AddSeparator(""); + } + genericMenu.AddItem(new GUIContent("Normalize"), Mathf.Approximately(vec.magnitude, 1f), () => NormalizeEntries(property)); + genericMenu.AddItem(new GUIContent("Zero", "Set the vector to (0, 0, 0)"), vec == Vector3.zero, () => SetVector(property, Vector3.zero)); + genericMenu.AddItem(new GUIContent("One", "Set the vector to (1, 1, 1)"), vec == Vector3.one, () => SetVector(property, Vector3.one)); + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent("Right", "Set the vector to (1, 0, 0)"), vec == Vector3.right, () => SetVector(property, Vector3.right)); + genericMenu.AddItem(new GUIContent("Left", "Set the vector to (-1, 0, 0)"), vec == Vector3.left, () => SetVector(property, Vector3.left)); + genericMenu.AddItem(new GUIContent("Up", "Set the vector to (0, 1, 0)"), vec == Vector3.up, () => SetVector(property, Vector3.up)); + genericMenu.AddItem(new GUIContent("Down", "Set the vector to (0, -1, 0)"), vec == Vector3.down, () => SetVector(property, Vector3.down)); + genericMenu.AddItem(new GUIContent("Forward", "Set the vector property to (0, 0, 1)"), vec == Vector3.forward, () => SetVector(property, Vector3.forward)); + genericMenu.AddItem(new GUIContent("Back", "Set the vector property to (0, 0, -1)"), vec == Vector3.back, () => SetVector(property, Vector3.back)); + } + + private void SetVector(InspectorProperty property, Vector3 value) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = new double3(value.x, value.y, value.z); + } + }); + } + + private void NormalizeEntries(InspectorProperty property) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = math.normalizesafe((double3)property.ValueEntry.WeakValues[i]); + } + }); + } + } + + public class Double4Drawer : OdinValueDrawer, IDefinesGenericMenuItems + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + // Slide rect + { + var val = this.ValueEntry.SmartValue; + EditorGUI.BeginChangeCheck(); + var vec = SirenixEditorFields.VectorPrefixSlideRect(labelRect, new Vector4((float)val.x, (float)val.y, (float)val.z, (float)val.w)); + val = new double4(vec.x, vec.y, vec.z, vec.w); + if (EditorGUI.EndChangeCheck()) + { + this.ValueEntry.SmartValue = val; + } + } + + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + this.ValueEntry.Property.Children[3].Draw(showLabels ? GUIHelper.TempContent("W") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + + /// + /// Populates the generic menu for the property. + /// + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + double4 value = (double4)property.ValueEntry.WeakSmartValue; + var vec = new Vector4((float)value.x, (float)value.y, (float)value.z, (float)value.w); + + if (genericMenu.GetItemCount() > 0) + { + genericMenu.AddSeparator(""); + } + genericMenu.AddItem(new GUIContent("Normalize"), Mathf.Approximately(vec.magnitude, 1f), () => NormalizeEntries(property)); + genericMenu.AddItem(new GUIContent("Zero", "Set the vector to (0, 0, 0, 0)"), vec == Vector4.zero, () => SetVector(property, Vector3.zero)); + genericMenu.AddItem(new GUIContent("One", "Set the vector to (1, 1, 1, 1)"), vec == Vector4.one, () => SetVector(property, Vector4.one)); + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent("Right", "Set the vector to (1, 0, 0, 0)"), (Vector3)vec == Vector3.right, () => SetVector(property, Vector3.right)); + genericMenu.AddItem(new GUIContent("Left", "Set the vector to (-1, 0, 0, 0)"), (Vector3)vec == Vector3.left, () => SetVector(property, Vector3.left)); + genericMenu.AddItem(new GUIContent("Up", "Set the vector to (0, 1, 0, 0)"), (Vector3)vec == Vector3.up, () => SetVector(property, Vector3.up)); + genericMenu.AddItem(new GUIContent("Down", "Set the vector to (0, -1, 0, 0)"), (Vector3)vec == Vector3.down, () => SetVector(property, Vector3.down)); + genericMenu.AddItem(new GUIContent("Forward", "Set the vector property to (0, 0, 1, 0)"), (Vector3)vec == Vector3.forward, () => SetVector(property, Vector3.forward)); + genericMenu.AddItem(new GUIContent("Back", "Set the vector property to (0, 0, -1, 0)"), (Vector3)vec == Vector3.back, () => SetVector(property, Vector3.back)); + } + + private void SetVector(InspectorProperty property, Vector4 value) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = new double4(value.x, value.y, value.z, value.w); + } + }); + } + + private void NormalizeEntries(InspectorProperty property) + { + property.Tree.DelayActionUntilRepaint(() => + { + for (int i = 0; i < property.ValueEntry.ValueCount; i++) + { + property.ValueEntry.WeakValues[i] = math.normalizesafe((double4)property.ValueEntry.WeakValues[i]); + } + }); + } + } + + public class Int2Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class Int3Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class Int4Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + this.ValueEntry.Property.Children[3].Draw(showLabels ? GUIHelper.TempContent("W") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class UInt2Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class UInt3Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } + + public class UInt4Drawer : OdinValueDrawer + { + private bool isMatrixChild; + + protected override void Initialize() + { + this.isMatrixChild = this.Property.GetAttribute() != null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + Rect labelRect; + Rect contentRect = SirenixEditorGUI.BeginHorizontalPropertyLayout(label, out labelRect); + { + var showLabels = !this.isMatrixChild && SirenixEditorFields.ResponsiveVectorComponentFields && contentRect.width >= 185; + GUIHelper.PushLabelWidth(SirenixEditorFields.SingleLetterStructLabelWidth); + this.ValueEntry.Property.Children[0].Draw(showLabels ? GUIHelper.TempContent("X") : null); + this.ValueEntry.Property.Children[1].Draw(showLabels ? GUIHelper.TempContent("Y") : null); + this.ValueEntry.Property.Children[2].Draw(showLabels ? GUIHelper.TempContent("Z") : null); + this.ValueEntry.Property.Children[3].Draw(showLabels ? GUIHelper.TempContent("W") : null); + GUIHelper.PopLabelWidth(); + + } + SirenixEditorGUI.EndHorizontalPropertyLayout(); + } + } +#endif +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/MathematicsDrawers.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/MathematicsDrawers.cs.meta new file mode 100644 index 0000000..95a3319 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/MathematicsDrawers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 74718b273a32d874a9dc3c58269c36b3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/Sirenix.OdinInspector.Modules.UnityMathematics.asmdef b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/Sirenix.OdinInspector.Modules.UnityMathematics.asmdef new file mode 100644 index 0000000..613c7ac --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/Sirenix.OdinInspector.Modules.UnityMathematics.asmdef @@ -0,0 +1,11 @@ +{ + "name": "Sirenix.OdinInspector.Modules.UnityMathematics", + "references": [ "Unity.Mathematics", "Sirenix.OdinInspector.Attributes", "Sirenix.OdinInspector.Editor", "Sirenix.Utilities", "Sirenix.Utilities.Editor" ], + "includePlatforms": [ "Editor" ], + "excludePlatforms": [], + "allowUnsafeCode": true, + "autoReferenced": true, + "overrideReferences": false, + "precompiledReferences": [ "Sirenix.Utilities.dll", "Sirenix.Utilities.Editor.dll", "Sirenix.OdinInspector.Attributes.dll", "Sirenix.OdinInspector.Editor.dll", "Sirenix.Serialization.dll" ], + "defineConstraints": [] +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/Sirenix.OdinInspector.Modules.UnityMathematics.asmdef.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/Sirenix.OdinInspector.Modules.UnityMathematics.asmdef.meta new file mode 100644 index 0000000..791fd52 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/Sirenix.OdinInspector.Modules.UnityMathematics.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ad968d605628d06499b62cdc30f11cf8 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/manifest.txt b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/manifest.txt new file mode 100644 index 0000000..bc4189a --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/manifest.txt @@ -0,0 +1,8 @@ +ManifestVersion: 1 +ModuleID: Unity.Mathematics +ModuleVersion: 1.0.1.0 +ModuleFiles: + MathematicsDrawers.cs + MathematicsDrawers.cs.meta + Sirenix.OdinInspector.Modules.UnityMathematics.asmdef + Sirenix.OdinInspector.Modules.UnityMathematics.asmdef.meta diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/manifest.txt.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/manifest.txt.meta new file mode 100644 index 0000000..9b3e4a3 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics/manifest.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a61627ab5cd1b6a47b6e619d8eddb898 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Validator.meta b/Assets/Plugins/Sirenix/Odin Validator.meta new file mode 100644 index 0000000..b0e6ffd --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: defdfd1fc0fcfa745a6e46b92b1910cf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Validator/Editor.meta b/Assets/Plugins/Sirenix/Odin Validator/Editor.meta new file mode 100644 index 0000000..0ee65f2 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0be4d688c4cb5564cafdc73933c7888d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Validator/Editor/Config.meta b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config.meta new file mode 100644 index 0000000..da8bda6 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2cdd2ea28c721c94cbbd3e5c7bcc5c5a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/AutomationConfig.asset b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/AutomationConfig.asset new file mode 100644 index 0000000..a995c2f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/AutomationConfig.asset @@ -0,0 +1,38 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1671962818, guid: afbf832bc46149f5a291e87cab63e46d, type: 3} + m_Name: AutomationConfig + m_EditorClassIdentifier: + OnPlayMode: 0 + OnPlayModeIfWarnings: 0 + OnPlayModeIfErrors: 3 + OnPlayModeAlwaysCompleteValidationFully: 0 + OnPlayModeFlashScreen: 0 + OnPlayModeSetup: + Profile: 0 + ProfileAsset: {fileID: 0} + OnBuild: 0 + OnBuildIfWarnings: 0 + OnBuildIfErrors: 3 + OnBuildAlwaysCompleteValidationFully: 0 + OnBuildFlashScreen: 0 + OnBuildSetup: + Profile: 0 + ProfileAsset: {fileID: 0} + OnProjectStartup: 0 + OnProjectStartupIfWarnings: 0 + OnProjectStartupIfErrors: 1 + OnProjectStartupAlwaysCompleteValidationFully: 0 + OnProjectStartupFlashScreen: 0 + OnProjectStartupSetup: + Profile: 0 + ProfileAsset: {fileID: 0} diff --git a/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/AutomationConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/AutomationConfig.asset.meta new file mode 100644 index 0000000..b77ac74 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/AutomationConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 526f86a2fd9fc624b87265163a8f95a6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/GlobalValidationConfig.asset b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/GlobalValidationConfig.asset new file mode 100644 index 0000000..2d17d3c --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/GlobalValidationConfig.asset @@ -0,0 +1,87 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1426575000, guid: afbf832bc46149f5a291e87cab63e46d, type: 3} + m_Name: GlobalValidationConfig + m_EditorClassIdentifier: + ValidateScenesOnSceneLoad: + serializedValue: 0 + changedFromDefault: 0 + ValidateMainProfileOnLoad: + serializedValue: 0 + changedFromDefault: 0 + QueueAssetsOnLoad: + serializedValue: 0 + changedFromDefault: 0 + QueueScenesOnLoad: + serializedValue: 0 + changedFromDefault: 0 + PopulateQueueOnAssetDeleted: + serializedValue: 0 + changedFromDefault: 0 + PopulateQueueOnGameObjectDeleted: + serializedValue: 0 + changedFromDefault: 0 + RunMainValidationSessionOnLoad: + serializedValue: 0 + changedFromDefault: 0 + DeepValidation: + serializedValue: 0 + changedFromDefault: 0 + ContinuouslyValidateVisibleIssues: + serializedValue: 0 + changedFromDefault: 0 + PauseValidationWhileWorkingInSceneView: + serializedValue: 0 + changedFromDefault: 0 + PingOnDoubleClick: + serializedValue: 0 + changedFromDefault: 0 + FocusObjectOnDoubleClick: + serializedValue: 0 + changedFromDefault: 0 + FrameSelection: + serializedValue: 0 + changedFromDefault: 0 + SelectNextIssueOnFix: + serializedValue: 0 + changedFromDefault: 0 + SkipFirstSample: + serializedValue: 0 + changedFromDefault: 0 + ShowWidget: + serializedValue: 0 + changedFromDefault: 0 + DebugMode: + serializedValue: 0 + changedFromDefault: 0 + ShowWidgetOnlyWhenErrorOrWarnings: + serializedValue: 0 + changedFromDefault: 0 + EnableLeakDetection: + serializedValue: 0 + changedFromDefault: 0 + SupressAssetLoadErrorsFromUnityLogger: + serializedValue: 0 + changedFromDefault: 0 + OpenComponentInInspectorAndCloseOthers: + serializedValue: 0 + changedFromDefault: 0 + WatchForChanges: + serializedValue: 0 + changedFromDefault: 0 + ValidateInBackground: + serializedValue: 0 + changedFromDefault: 0 + KeepMainValidationSessionAliveInBackground: + serializedValue: 0 + changedFromDefault: 0 + HasShownValidationConfig: 0 diff --git a/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/GlobalValidationConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/GlobalValidationConfig.asset.meta new file mode 100644 index 0000000..e62a6e8 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/GlobalValidationConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7933350ac1d19b9458b225a9b9acf2ef +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/RuleConfig.asset b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/RuleConfig.asset new file mode 100644 index 0000000..c27f00e --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/RuleConfig.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1434321088, guid: afbf832bc46149f5a291e87cab63e46d, type: 3} + m_Name: RuleConfig + m_EditorClassIdentifier: + projectRules: [] diff --git a/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/RuleConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/RuleConfig.asset.meta new file mode 100644 index 0000000..5791f54 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/RuleConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: beba7a6a585c8904ebf96cae7c149968 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Validator/Editor/Profiles.meta b/Assets/Plugins/Sirenix/Odin Validator/Editor/Profiles.meta new file mode 100644 index 0000000..1d312b3 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Editor/Profiles.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d6149278619e3c745a965c795b941187 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Validator/Editor/Profiles/Main Profile.asset b/Assets/Plugins/Sirenix/Odin Validator/Editor/Profiles/Main Profile.asset new file mode 100644 index 0000000..fc3fc25 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Editor/Profiles/Main Profile.asset @@ -0,0 +1,65 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 217257422, guid: afbf832bc46149f5a291e87cab63e46d, type: 3} + m_Name: Main Profile + m_EditorClassIdentifier: + Include: + - Enabled: 1 + Type: 2 + Asset: + Path: + Filter: + Object: {fileID: 0} + Scene: + Type: 2 + Value: + IncludeAssetDependencies: 1 + AssetBundle: + AddressableGroup: + - Enabled: 1 + Type: 2 + Asset: + Path: + Filter: + Object: {fileID: 0} + Scene: + Type: 1 + Value: + IncludeAssetDependencies: 1 + AssetBundle: + AddressableGroup: + - Enabled: 1 + Type: 2 + Asset: + Path: + Filter: + Object: {fileID: 0} + Scene: + Type: 0 + Value: Assets + IncludeAssetDependencies: 0 + AssetBundle: + AddressableGroup: + - Enabled: 1 + Type: 0 + Asset: + Path: Assets + Filter: + Object: {fileID: 0} + Scene: + Type: 0 + Value: + IncludeAssetDependencies: 0 + AssetBundle: + AddressableGroup: + Exclude: [] + icon: 391 diff --git a/Assets/Plugins/Sirenix/Odin Validator/Editor/Profiles/Main Profile.asset.meta b/Assets/Plugins/Sirenix/Odin Validator/Editor/Profiles/Main Profile.asset.meta new file mode 100644 index 0000000..1c54b93 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Editor/Profiles/Main Profile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1868c7e20173ec14f8bf9a69e97831f3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Validator/EnsureCorrectOdinVersion.cs b/Assets/Plugins/Sirenix/Odin Validator/EnsureCorrectOdinVersion.cs new file mode 100644 index 0000000..42952c7 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/EnsureCorrectOdinVersion.cs @@ -0,0 +1,195 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- +#if UNITY_EDITOR + +namespace Sirenix.OdinValidator.Editor +{ + using System; + using System.IO; + using System.Reflection; + using UnityEditor; + using UnityEngine; + + internal static class EnsureCorrectOdinVersion + { + private const string validatorVersion = "3.3.1.7"; + + private static bool IsHeadlessOrBatchMode { get { return SystemInfo.graphicsDeviceType == UnityEngine.Rendering.GraphicsDeviceType.Null || UnityEditorInternal.InternalEditorUtility.inBatchMode; } } + + [InitializeOnLoadMethod] + private static void Init() + { +#if SIRENIX_INTERNAL + return; +#endif + + if (EditorPrefs.HasKey("PREVENT_SIRENIX_FILE_GENERATION")) + return; + + if (IsHeadlessOrBatchMode) + return; + + if (TryGetOdinInspectorVersion(out var inspectorVersion)) + { + var iVer = Version.Parse(inspectorVersion); + var vVer = Version.Parse(validatorVersion); + + if (iVer.Major == vVer.Major && iVer.Minor == vVer.Minor && iVer.Build == vVer.Build) // Ignore Revision + { + TryInstall(); + } + else + { + var latestVersion = iVer > vVer ? inspectorVersion : validatorVersion; + var oldestProduct = iVer > vVer ? "Odin Validator" : "Odin Inspector"; + var misMatchText = inspectorVersion + " : " + validatorVersion; + + if (TryGetOdinInstallPath(out var path)) + { + var versionMismatchFile = path + "Odin Validator/ignoreVersionMismatch.txt"; + + if (File.Exists(versionMismatchFile)) + { + var misMatch = File.ReadAllText(versionMismatchFile).Trim(); + if (misMatch == misMatchText) + return; + } + } + + if (!EditorUtility.DisplayDialog( + "Odin Version Mismatch", + + "Odin Inspector and Odin Validator need to be on the same version to function correctly.\n" + + $"\n" + + $"Current Odin Inspector: {inspectorVersion}\n" + + $"Current Odin Validator: {validatorVersion}\n" + + $"\n" + + $"Please install {oldestProduct} {latestVersion}", + + "OK", "Ignore until next version mismatch")) + { + var versionMismatchFile = path + "Odin Validator/ignoreVersionMismatch.txt"; + File.WriteAllText(versionMismatchFile, misMatchText); + }; + } + } + else + { + EditorUtility.DisplayDialog( + "Odin Validator requires Odin Inspector", + $"Please install Odin Inspector {validatorVersion}", + + "OK"); + } + } + + private static void TryInstall() + { + if (TryGetOdinInstallPath(out var path)) + { + var tmp_extension = "_tmp"; + var assemblyFiles = new string[] + { + path + "Assemblies/Sirenix.OdinValidator.Editor.dll", + path + "Assemblies/Sirenix.OdinValidator.Editor.dll.meta", + path + "Assemblies/Sirenix.OdinValidator.Editor.xml", + path + "Assemblies/Sirenix.OdinValidator.Editor.xml.meta", + path + "Assemblies/Sirenix.OdinValidator.Editor.pdb", + path + "Assemblies/Sirenix.OdinValidator.Editor.pdb.meta", + }; + + var requireUpdate = File.Exists(assemblyFiles[0] + tmp_extension); + + if (requireUpdate) + { + // Install / update Odin Validator. + AssetDatabase.StartAssetEditing(); + + foreach (var item in assemblyFiles) + { + var oldFile = item; + var newFile = item + tmp_extension; + + if (File.Exists(newFile)) + { + if (File.Exists(oldFile)) + File.Delete(oldFile); + + File.Move(newFile, oldFile); + } + } + + AssetDatabase.StopAssetEditing(); + AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate); + EditorPrefs.SetBool("ODIN_VALIDATOR_SHOW_GETTING_STARTED", true); + } +#if ODIN_INSPECTOR + else if (EditorPrefs.GetBool("ODIN_VALIDATOR_SHOW_GETTING_STARTED", false)) + { + EditorPrefs.SetBool("ODIN_VALIDATOR_SHOW_GETTING_STARTED", false); + EditorApplication.delayCall += () => + { + var t = Sirenix.Serialization.TwoWaySerializationBinder.Default.BindToType("Sirenix.OdinInspector.Editor.GettingStarted.GettingStartedWindow"); + if (t != null) + { + var action = Utilities.Editor.Expressions.ExpressionUtility.ParseAction("ShowWindow(false, true)", true, t, out var _); + action.Invoke(false, true); + } + }; + } +#endif + } + else + { + Debug.LogError("Odin Validator was unable to find Sirenix.Utilities.SirenixAssetPaths.SirenixPluginPath"); + } + } + + private static bool TryGetOdinInstallPath(out string path) + { + var t = Type.GetType("Sirenix.Utilities.SirenixAssetPaths, Sirenix.Utilities"); + + if (t == null) + { + path = null; + return false; + } + + var v = t.GetField("SirenixPluginPath", BindingFlags.Public | BindingFlags.Static); + if (v == null) + { + path = null; + return false; + } + + path = v.GetValue(null) as string; + return true; + } + + private static bool TryGetOdinInspectorVersion(out string version) + { + var t = Type.GetType("Sirenix.OdinInspector.Editor.OdinInspectorVersion, Sirenix.OdinInspector.Editor"); + + if (t == null) + { + version = null; + return false; + } + + var v = t.GetProperty("Version", BindingFlags.Public | BindingFlags.Static); + if (v == null) + { + version = null; + return false; + } + + version = v.GetValue(null) as string; + return true; + } + } +} + +#endif diff --git a/Assets/Plugins/Sirenix/Odin Validator/EnsureCorrectOdinVersion.cs.meta b/Assets/Plugins/Sirenix/Odin Validator/EnsureCorrectOdinVersion.cs.meta new file mode 100644 index 0000000..4b41e57 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/EnsureCorrectOdinVersion.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9454f64e8640a944ca8605d5b465d784 +timeCreated: 1514513487 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Validator/Readme.txt b/Assets/Plugins/Sirenix/Odin Validator/Readme.txt new file mode 100644 index 0000000..5c0862f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Readme.txt @@ -0,0 +1,19 @@ +----------------------------------------------------------------------------------------- + +Thank you for using Odin Validator. + +If there is anything we can help you with, or if you have any feedback, please don't hesitate to reach out! + +----------------------------------------------------------------------------------------- + +Getting Started: https://odininspector.com/tutorials/odin-project-validator/getting-started-with-odin-project-validator +Support: https://odininspector.com/support +Discord: https://discord.gg/AgDmStu + +----------------------------------------------------------------------------------------- + +Odin Validator is published and developed by Sirenix. + +Sirenix: Https://sirenix.net + +----------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Validator/Readme.txt.meta b/Assets/Plugins/Sirenix/Odin Validator/Readme.txt.meta new file mode 100644 index 0000000..3c5a4ad --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Validator/Readme.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 151ca3ac64d79f9478810af1f27c4c57 +timeCreated: 1556895130 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Readme.txt b/Assets/Plugins/Sirenix/Readme.txt new file mode 100644 index 0000000..bd8b1f8 --- /dev/null +++ b/Assets/Plugins/Sirenix/Readme.txt @@ -0,0 +1,35 @@ +------------------------------------ Getting Started ------------------------------------ + +Open up the Getting Started guide from "Tools > Odin Inspector > Getting Started." + + +------------------------------------- Helpful Links ------------------------------------- + +Tutorials: https://odininspector.com/tutorials +API Documentation: https://odininspector.com/documentation +Roadmap: https://odininspector.com/roadmap +Release Notes: https://odininspector.com/patch-notes +Issue Tracker: https://bitbucket.org/sirenix/odin-inspector + + +--------------------------------- Community and Support --------------------------------- + +If you have any issues, suggestions or want advice, then you're more than welcome +to join us on Discord, or reach out to us by any other means. + +Support: https://odininspector.com/support +Community Addons: https://odininspector.com/community-tools +Discord: https://discord.gg/AgDmStu + + +-------------------------------------- Thank you! --------------------------------------- + +We really hope you like using Odin. Be sure to leave a review on the Asset Store, +that helps us out a lot! + +Leave a review: https://assetstore.unity.com/packages/tools/utilities/odin-inspector-and-serializer-89041 + + +Odin Inspector is published and developed by Sirenix. + +Sirenix: Https://sirenix.net \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Readme.txt.meta b/Assets/Plugins/Sirenix/Readme.txt.meta new file mode 100644 index 0000000..e9c250e --- /dev/null +++ b/Assets/Plugins/Sirenix/Readme.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e957a9e8b4f4bce4b8a34e504a8c39d7 +timeCreated: 1533815770 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Popup Circles.uss b/Assets/Popup Circles.uss new file mode 100644 index 0000000..bb1871e --- /dev/null +++ b/Assets/Popup Circles.uss @@ -0,0 +1,50 @@ +.BaseCircle1 { + opacity: 1; + flex-grow: 0; + background-color: rgba(0, 255, 227, 0.18); + border-top-left-radius: 50%; + border-top-right-radius: 50%; + border-bottom-right-radius: 50%; + border-bottom-left-radius: 50%; + border-left-color: rgba(0, 0, 0, 0); + border-right-color: rgba(0, 0, 0, 0); + border-top-color: rgba(0, 0, 0, 0); + border-bottom-color: rgba(0, 0, 0, 0); + translate: 350px 350px; + width: 1000px; + height: 1000px; + max-height: 1000px; + align-items: center; + justify-content: space-between; + overflow: visible; + position: absolute; + min-width: 1000px; + min-height: 1000px; + max-width: 1000px; +} + +.ShrinkGrowCircle1 { + border-top-left-radius: 50%; + border-top-right-radius: 50%; + border-bottom-right-radius: 50%; + border-bottom-left-radius: 50%; + border-left-color: rgb(0, 0, 0); + border-right-color: rgb(0, 0, 0); + border-top-color: rgb(0, 0, 0); + border-bottom-color: rgb(0, 0, 0); + border-top-width: 15px; + border-right-width: 15px; + border-bottom-width: 15px; + border-left-width: 15px; + width: 1000px; + height: 1000px; + max-height: 1600px; + translate: 350px 350px; + justify-content: center; + align-items: center; + overflow: hidden; + max-width: 1600px; + min-width: 1000px; + min-height: 1000px; + position: absolute; +} diff --git a/Assets/Popup Circles.uss.meta b/Assets/Popup Circles.uss.meta new file mode 100644 index 0000000..bf369b2 --- /dev/null +++ b/Assets/Popup Circles.uss.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 524a77eda79b6a746bd37416a5e68a02 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 0 diff --git a/Assets/Resources/Environment.meta b/Assets/Resources/Environment.meta new file mode 100644 index 0000000..f5b3b02 --- /dev/null +++ b/Assets/Resources/Environment.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8b389c7eef38ff44f8ede48255f29cfb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/ActionCircles.prefab b/Assets/Resources/Environment/ActionCircles.prefab new file mode 100644 index 0000000..d54bf03 --- /dev/null +++ b/Assets/Resources/Environment/ActionCircles.prefab @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2353526803929756044 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7262540719585783410} + - component: {fileID: 2754980061684836639} + - component: {fileID: 3292404123058952225} + m_Layer: 0 + m_Name: ActionCircles + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7262540719585783410 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2353526803929756044} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2754980061684836639 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2353526803929756044} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_PanelSettings: {fileID: 11400000, guid: 5d648095474667743b26001c1359e620, type: 2} + m_ParentUI: {fileID: 0} + sourceAsset: {fileID: 9197481963319205126, guid: efa0bbc9af51dab4ba884038e2143cda, type: 3} + m_SortingOrder: 0 + m_WorldSpaceSizeMode: 1 + m_WorldSpaceWidth: 1920 + m_WorldSpaceHeight: 1080 +--- !u!114 &3292404123058952225 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2353526803929756044} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 99e3447aae372aa4a9b94e9a460a0213, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Prefabs/TransformPrediction.prefab.meta b/Assets/Resources/Environment/ActionCircles.prefab.meta similarity index 74% rename from Assets/Packages/FishNet/Demos/Prediction V1/Transform/Prefabs/TransformPrediction.prefab.meta rename to Assets/Resources/Environment/ActionCircles.prefab.meta index 6ef3a43..9981f01 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/Prefabs/TransformPrediction.prefab.meta +++ b/Assets/Resources/Environment/ActionCircles.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f820efff6a2871447b961fc755212ba3 +guid: 94ab3eef2b8bbc14c87ed8070eaddce1 PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Resources/Environment/DamagePopup.cs b/Assets/Resources/Environment/DamagePopup.cs new file mode 100644 index 0000000..aea21ce --- /dev/null +++ b/Assets/Resources/Environment/DamagePopup.cs @@ -0,0 +1,104 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using TMPro; +using FishNet.Object; + +public class DamagePopup : MonoBehaviour +{ + // Create a Damage Popup + public static DamagePopup Create(Vector3 position, int damageAmount, bool isCriticalHit) + { + Debug.Log("Create Position equals " + position); + Transform damagePopupTransform = Instantiate(GameAssets.i.pfDamagePopup, position, Quaternion.identity); + Spawner.instance.SpawnObject(damagePopupTransform.gameObject); + + DamagePopup damagePopup = damagePopupTransform.GetComponent(); + damagePopup.Setup(damageAmount, isCriticalHit); + // damagePopup.transform.LookAt(-Camera.main.transform.position); + + return damagePopup; + } + + private static int sortingOrder; + + private const float DISAPPEAR_TIMER_MAX = 1f; + + private TextMeshPro textMesh; + private float disappearTimer; + private Color textColor; + //private Vector3 moveVector; + public float moveYSpeed = 1f; + private void Awake() + { + textMesh = transform.GetComponent(); + } + public void Setup(int damageAmount, bool isCriticalHit) + { + textMesh.SetText(damageAmount.ToString()); + if (!isCriticalHit) + { + // Normal hit + textMesh.fontSize = 12; + ColorUtility.TryParseHtmlString("#FF5D00", out textColor); + } + else + { + // Critical hit + textMesh.fontSize = 20; + ColorUtility.TryParseHtmlString("#FF0A00", out textColor); + } + textMesh.color = textColor; + disappearTimer = DISAPPEAR_TIMER_MAX; + + sortingOrder++; + textMesh.sortingOrder = sortingOrder; + + //moveVector = new Vector3(1, 1) * 1f; + + } + + private void Update() + { + transform.position += new Vector3(0, moveYSpeed) * Time.deltaTime; + //moveYSpeed -= moveYSpeed * 1f * Time.deltaTime; + + disappearTimer -= Time.deltaTime; + /* + if (disappearTimer > DISAPPEAR_TIMER_MAX * .5F) + { + // First half of the popup lifetime + float increaseScaleAmount = 1f; + transform.localScale += new Vector3(1, 1, 1) * increaseScaleAmount * Time.deltaTime; + } + else + { + //Second half of the popup lifetime + float decreaseScaleAmount = 1f; + transform.localScale -= new Vector3(1, 1, 1) * decreaseScaleAmount * Time.deltaTime; + } + */ + if (disappearTimer < 0) + //Start disappearing + { + float disappearSpeed = 3f; + textColor.a -= disappearSpeed * Time.deltaTime; + textMesh.color = textColor; + if (textColor.a < 0) + { + Destroy(gameObject); + } + } + + UpdateDamagePopup(PlayerManager.instance.localPlayer); + } + + public void UpdateDamagePopup(NetworkPlayerController localPlayer) + { + if (localPlayer != null) + { + //transform.LookAt(localPlayer.localCamera.transform); + transform.rotation = Quaternion.LookRotation(transform.position - localPlayer.localCamera.transform.position); + } + } +} diff --git a/Assets/Resources/Environment/DamagePopup.cs.meta b/Assets/Resources/Environment/DamagePopup.cs.meta new file mode 100644 index 0000000..d6202c7 --- /dev/null +++ b/Assets/Resources/Environment/DamagePopup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 140b929d988a18349994dda2566ef550 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/FirTree.asset b/Assets/Resources/Environment/FirTree.asset new file mode 100644 index 0000000..0c885f5 --- /dev/null +++ b/Assets/Resources/Environment/FirTree.asset @@ -0,0 +1,22 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 452359ef443bb3a4687ce59aa85a85a7, type: 3} + m_Name: FirTree + m_EditorClassIdentifier: + objectName: FirTree + minAmount: 3 + maxAmount: 6 + harvestLevel: 0 + harvestXP: 1 + defaultHealth: 100 + harvestType: 0 + ItemDetails: {fileID: 11400000, guid: 36f97a6d90dba7e43a653f365d6b9253, type: 2} diff --git a/Assets/Resources/Environment/FirTree.asset.meta b/Assets/Resources/Environment/FirTree.asset.meta new file mode 100644 index 0000000..2edc6f8 --- /dev/null +++ b/Assets/Resources/Environment/FirTree.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec166ecbd352366468cbedeff6c4c956 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/FirTree.asset2 b/Assets/Resources/Environment/FirTree.asset2 new file mode 100644 index 0000000..0c885f5 --- /dev/null +++ b/Assets/Resources/Environment/FirTree.asset2 @@ -0,0 +1,22 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 452359ef443bb3a4687ce59aa85a85a7, type: 3} + m_Name: FirTree + m_EditorClassIdentifier: + objectName: FirTree + minAmount: 3 + maxAmount: 6 + harvestLevel: 0 + harvestXP: 1 + defaultHealth: 100 + harvestType: 0 + ItemDetails: {fileID: 11400000, guid: 36f97a6d90dba7e43a653f365d6b9253, type: 2} diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/TransformPrediction.unity.meta b/Assets/Resources/Environment/FirTree.asset2.meta similarity index 74% rename from Assets/Packages/FishNet/Demos/Prediction V1/Transform/TransformPrediction.unity.meta rename to Assets/Resources/Environment/FirTree.asset2.meta index f444295..e3572bd 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Transform/TransformPrediction.unity.meta +++ b/Assets/Resources/Environment/FirTree.asset2.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 23d8c720c2338a54c9787668c81290f6 +guid: 88c59d905d2f4b84aa249a78f78b45b3 DefaultImporter: externalObjects: {} userData: diff --git a/Assets/Resources/Environment/GameAssets.cs b/Assets/Resources/Environment/GameAssets.cs new file mode 100644 index 0000000..ecd7bad --- /dev/null +++ b/Assets/Resources/Environment/GameAssets.cs @@ -0,0 +1,86 @@ +using FishNet.Object; +using FishNet.Object.Synchronizing; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +//using V_AnimationSystem; +using UnityEngine; + +public class GameAssets : NetworkBehaviour +{ + public GameObject gameFirTree; + public Transform pfDamagePopup; + private static GameAssets _i; + + public static GameAssets i + { + get + { + if (_i == null) + { + _i = Instantiate(Resources.Load("GameAssets")); + } + return _i; + } + } + + public readonly SyncList _myFirTreeCollection = new SyncList(); + + public readonly SyncList _pfDamagePopupCollection = new SyncList(); + + + // Create SyncList of GameObjects called _myCollection and include all the GameObjects declared in this class + private void Start() + { + _myFirTreeCollection.Add(gameFirTree); + } + + private void Awake() + { + _myFirTreeCollection.OnChange += _myFirTreeCollection_OnChange; + _pfDamagePopupCollection.OnChange += _pfDamagePopupCollection_OnChange; + + } + + private void Update() + { + + } + private void _myFirTreeCollection_OnChange(SyncListOperation op, int index, GameObject oldItem, GameObject newItem, bool asServer) + { + switch (op) + { + case SyncListOperation.Add: + break; + case SyncListOperation.RemoveAt: + break; + case SyncListOperation.Insert: + break; + case SyncListOperation.Set: + break; + case SyncListOperation.Clear: + break; + case SyncListOperation.Complete: + break; + } + } + + private void _pfDamagePopupCollection_OnChange(SyncListOperation op, int index, GameObject oldItem, GameObject newItem, bool asServer) + { + switch (op) + { + case SyncListOperation.Add: + break; + case SyncListOperation.RemoveAt: + break; + case SyncListOperation.Insert: + break; + case SyncListOperation.Set: + break; + case SyncListOperation.Clear: + break; + case SyncListOperation.Complete: + break; + } + } +} diff --git a/Assets/Resources/Environment/GameAssets.cs.meta b/Assets/Resources/Environment/GameAssets.cs.meta new file mode 100644 index 0000000..51c0aaa --- /dev/null +++ b/Assets/Resources/Environment/GameAssets.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b6c015778e44a2a4a90e177e30bd7632 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/GameAssets.prefab b/Assets/Resources/Environment/GameAssets.prefab new file mode 100644 index 0000000..bcdeeac --- /dev/null +++ b/Assets/Resources/Environment/GameAssets.prefab @@ -0,0 +1,50 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1884577588759541468 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8111833435313545071} + - component: {fileID: 6155639415412850504} + m_Layer: 0 + m_Name: GameAssets + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8111833435313545071 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884577588759541468} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -117.24027, y: 70.1219, z: 45.98854} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &6155639415412850504 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1884577588759541468} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5722941763bee284db9b435276f5fb73, type: 3} + m_Name: + m_EditorClassIdentifier: + gameFirTree: {fileID: 7343025877141621927, guid: 3242852651343d745a43181d6ff59d87, + type: 3} + pfDamagePopup: {fileID: 7296286881993273554, guid: a44388a05daaec54280394b1e66160c4, + type: 3} diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/PredictedBullet.prefab.meta b/Assets/Resources/Environment/GameAssets.prefab.meta similarity index 74% rename from Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/PredictedBullet.prefab.meta rename to Assets/Resources/Environment/GameAssets.prefab.meta index b8038ee..6db3544 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/PredictedBullet.prefab.meta +++ b/Assets/Resources/Environment/GameAssets.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4e1673ccc2acac543871855a0e8bed71 +guid: ffd04ad134e56f5459a6eb07963ca4b8 PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Resources/Environment/HarvestObject.cs b/Assets/Resources/Environment/HarvestObject.cs new file mode 100644 index 0000000..8e24d45 --- /dev/null +++ b/Assets/Resources/Environment/HarvestObject.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +//using Systems.Inventory; +using UnityEngine; +using Systems.Inventory; + +[CreateAssetMenu(fileName = "HarvestObject", menuName = "ScriptableObjects/HarvestObject", order = 1)] +public class HarvestObject : ScriptableObject +{ + public enum HarvestLevel + { + tierZero, + tierOne, + tierTwo, + tierThree, + tierFour + } + + public enum HarvestType + { + Wood, + Stone, + Metal, + Food, + Tree, + Other + } + + public string objectName; + public int minAmount; + public int maxAmount; + public HarvestLevel harvestLevel; + public int harvestXP; + public int defaultHealth; + public HarvestType harvestType; + public ItemDetails ItemDetails; +} \ No newline at end of file diff --git a/Assets/Resources/Environment/HarvestObject.cs.meta b/Assets/Resources/Environment/HarvestObject.cs.meta new file mode 100644 index 0000000..7c74735 --- /dev/null +++ b/Assets/Resources/Environment/HarvestObject.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 452359ef443bb3a4687ce59aa85a85a7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/NetworkPlayerController.cs b/Assets/Resources/Environment/NetworkPlayerController.cs new file mode 100644 index 0000000..d3a0165 --- /dev/null +++ b/Assets/Resources/Environment/NetworkPlayerController.cs @@ -0,0 +1,28 @@ +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using UnityEngine; +using FishNet.Object; + +public class NetworkPlayerController : NetworkBehaviour +{ + // This goes on each of your players, you probably have a script like this named differently + public Camera localCamera; + /* + private void Awake() + { + // Get your camera based off your player script's transform in hierarchy + localCamera = GetComponentInChildren(); + } + */ + public override void OnStartClient() + { + base.OnStartClient(); + if (!IsOwner) return; + // Set your client's version of PlayerManager's player if you're the owner + PlayerManager.instance.SetPlayer(this); + localCamera = GetComponentInChildren(); + } + + // Other script stuff goes below +} diff --git a/Assets/Resources/Environment/NetworkPlayerController.cs.meta b/Assets/Resources/Environment/NetworkPlayerController.cs.meta new file mode 100644 index 0000000..1b955b8 --- /dev/null +++ b/Assets/Resources/Environment/NetworkPlayerController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 395208fc7a118c14eb1f128b53170387 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/OreCutting.cs b/Assets/Resources/Environment/OreCutting.cs new file mode 100644 index 0000000..68241a4 --- /dev/null +++ b/Assets/Resources/Environment/OreCutting.cs @@ -0,0 +1,184 @@ +using FishNet.Demo.AdditiveScenes; +using FishNet.Object; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using Unity.VisualScripting; +using UnityEditor.PackageManager; +using UnityEngine; +using static UnityEngine.GraphicsBuffer; + +public class OreCutting : NetworkBehaviour, IOreDamageable +{ + [SerializeField] private Camera PlayerCamera; + public float actionRange = 200f; + public LayerMask actionMask; + //public Inventory playerInventory; + + [SerializeField] private GameObject fxOreHit; + [SerializeField] private GameObject fxOreHitBlocks; + + + public int tempOreMaxDamage = 30; + public int tempOreMinDamage = 10; + + public float criticalHitChance = 30; + public float criticalHitMultiplier = 1.20f; + public enum OreStatus + { + WhoreOre, + ThreeQuarterOre, + HalfOre, + QuarterOre, + EmptyOre + } + + // Start is called before the first frame update + void Start() + { + } + + //https://www.youtube.com/watch?v=ql4prUAasEg&t=516s + private void AnimationEvent_OnHit() + { + Vector3 colliderSize = Vector3.one * .3f; + Collider[] colliderArray = Physics.OverlapBox(PlayerCamera.transform.position + PlayerCamera.transform.forward * 1.5f, colliderSize); + foreach (Collider collider in colliderArray) + { + if (collider.TryGetComponent(out IOreDamageable oreDamageable)) + { + // Make damageAmount equal to the damage of the axe + int damageAmount = UnityEngine.Random.Range(10, 30); + //DamagePopup.Create(hitArea.transform.position, damageAmount, damageAmount > 14); + + // Damage Ore + oreDamageable.Damage(damageAmount); + + // Shake Camera + //OreShake.GenerateImpulse(); + + // Spawn FX + //Instantiate(fxOreHit, hitArea.transform.position, Quaternion.identity); + //Instantiate(fxOreHitBlocks, hitArea.transform.position, Quaternion.identity); + } + } + } + + public override void OnStartClient() + { + base.OnStartClient(); + + if (IsOwner) + { + //PlayerCamera = Camera.main; + + //Debug.Log("Owner"); + } + else + { + //Debug.Log("Not Owner"); + } + } + + private void Update() + { + if (Input.GetMouseButtonDown(0)) + { + //if (Animator != null) Animator.SetTrigger("Attack"); + //FunctionTimer.Create(AnimationEvent_OnHit, 0.5f); + + //Ray CameraRay = PlayerCamera.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0f)); + + Ray ray = PlayerCamera.ScreenPointToRay(Input.mousePosition); + //RaycastHit hit; + Debug.Log("apple"); + Debug.DrawRay(PlayerCamera.transform.position, PlayerCamera.ScreenToWorldPoint(Input.mousePosition), Color.green); + Debug.Log("banana"); + + if (Physics.Raycast(ray, out RaycastHit HitInfo, 200f)) + { + Debug.Log("Kiwi"); + Debug.Log("HitInfo.collider.gameObject: " + HitInfo.collider.gameObject); + if (HitInfo.collider.gameObject.GetComponent()) + { + Debug.Log("Peach"); + GameObject localPlayer = PlayerBehaviour.instance.gameObject; + + Vector3 directionToTarget = localPlayer.transform.position - HitInfo.transform.position; + float angle = Vector3.Angle(localPlayer.transform.forward, directionToTarget); + + + // Print angle -- I forget what I was going to use this for. Maybe for the damage popup? + //Debug.Log("angle: " + angle); + /* + if (angle > 90) + { + Debug.Log("angle is greater than 90"); + // Cut the Ore here + } + */ + + + Debug.Log("Orange"); + Debug.Log("HitInfo.transform.gameObject: " + HitInfo.transform.gameObject); + GameObject objectToAction = HitInfo.transform.gameObject; + + if (objectToAction.TryGetComponent(out ResourceNode resourceNode)) + { + if (objectToAction.TryGetComponent(out OreHealth oreHealth)) + { + //DamageOre(oreHealth, resourceNode, objectToAction, HitInfo); + StartMiningEvent(oreHealth, resourceNode, objectToAction, HitInfo, gameObject); + } + } + } + } + } + } + + public void StartMiningEvent(OreHealth oreHealth, ResourceNode resourceNode, GameObject objectToAction, RaycastHit HitInfo, GameObject player) + { + GameObject miningEvent = GameObject.Find("MiningEvent"); + miningEvent.GetComponent().enabled = true; + //miningEvent.GetComponent().circles = 1; + + // Return CompleteMining() value of MiningEvent + miningEvent.GetComponent().StartMiningEvent(oreHealth, resourceNode, objectToAction, HitInfo, this.LocalConnection, player); + } + + public static void DamageOre(OreHealth oreHealth, ResourceNode resourceNode, GameObject objectToAction, RaycastHit HitInfo, MiningEvent.MiningScore miningScore, FishNet.Connection.NetworkConnection localConnection, GameObject player) + { + if (miningScore == MiningEvent.MiningScore.Good || miningScore == MiningEvent.MiningScore.Excellent) + { + bool isCriticalHit = false; + + int damage = 100; + + /*** FOR ASSIGNING CRITICAL HIT - WORKS BUT REMOVED + if (isCriticalHit == true) + { + damage = Random.Range(tempOreMaxDamage + 1, Mathf.RoundToInt((float)(tempOreMaxDamage * criticalHitMultiplier))); + } + else + { + damage = Random.Range(tempOreMinDamage, tempOreMaxDamage); + } + */ + + Debug.Log("Hit was good, doing damage of " + damage + " and critical bool = " + isCriticalHit); + //oreHealth.AffectOre(resourceNode, objectToAction, this.LocalConnection, playerInventory, damage, isCriticalHit, HitInfo.point); + oreHealth.AffectOre(resourceNode, objectToAction, localConnection, damage, player, isCriticalHit, HitInfo.point); + } + else + { + int damage = 0; + oreHealth.AffectOre(resourceNode, objectToAction, localConnection, damage, player, false, HitInfo.point); + } + } + + public void Damage(int amount) + { + // *** TODO *** + //Remove health from player + } +} diff --git a/Assets/Resources/Environment/OreCutting.cs.meta b/Assets/Resources/Environment/OreCutting.cs.meta new file mode 100644 index 0000000..89b7349 --- /dev/null +++ b/Assets/Resources/Environment/OreCutting.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 129900639f8c2d94c94b28e5be311e7a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/OreDamageable.cs b/Assets/Resources/Environment/OreDamageable.cs new file mode 100644 index 0000000..8013242 --- /dev/null +++ b/Assets/Resources/Environment/OreDamageable.cs @@ -0,0 +1,8 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public interface IOreDamageable +{ + void Damage(int amount); +} diff --git a/Assets/Resources/Environment/OreDamageable.cs.meta b/Assets/Resources/Environment/OreDamageable.cs.meta new file mode 100644 index 0000000..b3b1891 --- /dev/null +++ b/Assets/Resources/Environment/OreDamageable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 20aca3ef715f498448c2e47776913472 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/OreHealth.cs b/Assets/Resources/Environment/OreHealth.cs new file mode 100644 index 0000000..fabb897 --- /dev/null +++ b/Assets/Resources/Environment/OreHealth.cs @@ -0,0 +1,237 @@ +using FishNet.Object; +using FishNet.Transporting; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using static OreCutting; + + + +public class OreHealth : NetworkBehaviour, IOreDamageable +{ + //public int oretooreCollisionMinDamage = 3; + //public int oretooreCollisionMaxDamage = 15; + //int oretooreCollisionDamageBase; + + public ResourceNode resourceNode; + + private void OnCollisionEnter(Collision collision) + { + if (collision.gameObject.TryGetComponent(out IOreDamageable oreDamageable)) + { + { + if (collision.relativeVelocity.magnitude > 1f) + { + Debug.Log("Ore collision magnitude: " + collision.relativeVelocity.magnitude); + int damageAmount = Mathf.RoundToInt(collision.relativeVelocity.magnitude); + + DamagePopup.Create(collision.GetContact(0).point, damageAmount, damageAmount > 20); + oreDamageable.Damage(damageAmount); + + Damage(damageAmount); + } + } + } + } + + public void SplitOre(ResourceNode resourceNode, GameObject oreObject) + { + Debug.Log("Ore part name: " + oreObject.name); + + oreObject.SetActive(false); + } + + /* + // Cut the damn thing + public void SplitOre(ResourceNode resourceNode, GameObject orePart, OreStatus oreStatus, bool hasStump) + { + Debug.Log("Ore part name: " + orePart.name); + + switch (oreStatus) + { + + case OreStatus.WholeOre: + orePart.SetActive(false); + orePart.transform.parent.Find("Fir Ore Divided").gameObject.SetActive(true); + break; + case OreStatus.TopAndBottomOre: + Destroy(orePart.transform.GetComponent()); + orePart.transform.GetComponent().enabled = false; + orePart.transform.GetComponent().enabled = false; + + GameObject lowerHalfOre = orePart.transform.Find("Lower Half").gameObject; + lowerHalfOre.SetActive(true); + + GameObject upperHalfOre = orePart.transform.Find("Top Half").gameObject; + upperHalfOre.SetActive(true); + + break; + case OreStatus.BottomOre: + // Find game object with tag of ParentOre + // Split log in half + Debug.Log("Ore name: " + orePart.name); + Debug.Log("BottomOre Status? How did you get here?"); + break; + case OreStatus.TopOre: + // Find game object with tag of ParentOre + // Split log in half + Debug.Log("Ore name: " + orePart.name); + Debug.Log("TopOre Status? How did you get here?"); + break; + case OreStatus.Stump: + // Find game object with tag of ParentOre + // Split log in half + Debug.Log("Ore name: " + orePart.name); + Debug.Log("Stump status? How did you get here?"); + break; + default: + Debug.Log("No ore status selected. How did you get here?"); + break; + } + } + */ + + public bool IsOreFullyHarvested(GameObject objectToAction) + { + Transform rootObjectToAction = objectToAction.transform.root; + + // #################### REMOVE REDUNDENCY IN CHECKS #################### + + /* + // print status of everything in the following if statement + if (rootObjectToAction.Find("Fir Ore Divided/Stump").gameObject.activeSelf == true) + { + return false; + } + else if (rootObjectToAction.Find("Fir Ore Divided/Top and Bottom Half/Top Half").gameObject.activeSelf == true) + { + return false; + } + + else if (rootObjectToAction.Find("Fir Ore Divided/Top and Bottom Half/Lower Half").gameObject.activeSelf == true) + { + return false; + } + + else if (rootObjectToAction.Find("Fir Ore Whole").gameObject.activeSelf == true) + { + return false; + } + + else if (rootObjectToAction.Find("Fir Ore Divided/Top and Bottom Half").gameObject.activeSelf == true) + { + return false; + } + else + { + Debug.Log("Ore is fully harvested."); + return true; + } + */ + + return true; + } + + public void AffectOre(ResourceNode resourceNode, GameObject objectToAction, FishNet.Connection.NetworkConnection localConnection, int damage, GameObject player, bool criticalHit = false, Vector3? hitPoint = null) + { + //fullyHarvest = IsOreFullyHarvested(objectToAction); + //resourceNode.Harvest(localConnection, playerInventory, fullyHarvest); + + + Debug.Log("Ore damage: " + damage); + //debug resourceNode.health.Value + Debug.Log("Ore resource node health: " + resourceNode.health.Value); + + Damage(damage); + Debug.Log("Ore resource node health after damage: " + resourceNode.health.Value); + if (resourceNode.health.Value <= 0) + { + resourceNode.Harvest(localConnection, player); + } + } + + /* + //public void AffectOre(ResourceNode resourceNode, GameObject objectToAction, FishNet.Connection.NetworkConnection localConnection, Inventory playerInventory, int damage, bool criticalHit = false, Vector3? hitPoint = null) + public void AffectOre(ResourceNode resourceNode, GameObject objectToAction, FishNet.Connection.NetworkConnection localConnection, int damage, bool criticalHit = false, Vector3? hitPoint = null) + { + Damage(damage); + if (hitPoint != null) + { + Debug.Log("Hit location not null"); + Debug.Log("hintPoint val = " + hitPoint.Value); + DamagePopup.Create(hitPoint.Value, damage, criticalHit); + } + else + { + Debug.Log("Hit location is null. Using objects position."); + DamagePopup.Create(objectToAction.transform.position, damage, criticalHit); + } + + + if (resourceNode.health.Value <= 0) + { + bool fullyHarvest = false; + switch (objectToAction.tag) + { + case "WholeOre": + // Look if ore has a stump + //if (objectToAction.transform.Find("Stump") != null) + //{ + SplitOre(resourceNode, objectToAction, OreStatus.WholeOre, true); + //} + break; + case "Stump": + objectToAction.SetActive(false); + fullyHarvest = IsOreFullyHarvested(objectToAction); + //resourceNode.Harvest(localConnection, playerInventory, fullyHarvest); + resourceNode.Harvest(localConnection, fullyHarvest); + break; + case "TopAndBottomOre": + SplitOre(resourceNode, objectToAction, OreStatus.TopAndBottomOre, true); + break; + case "TopOre": + objectToAction.SetActive(false); + // Get bottom ore + GameObject parentOre = objectToAction.transform.parent.gameObject; + GameObject bottomOre = parentOre.transform.Find("Lower Half").gameObject; + + // check if bottomOre is active. If it is deactivated, the deactivate the parent game object as well + if (bottomOre.activeSelf == false) + { + parentOre.SetActive(false); + } + fullyHarvest = IsOreFullyHarvested(objectToAction); + //resourceNode.Harvest(localConnection, playerInventory, fullyHarvest); + resourceNode.Harvest(localConnection, fullyHarvest); + break; + case "BottomOre": + objectToAction.SetActive(false); + // Get bottom ore + GameObject parentOre2 = objectToAction.transform.parent.gameObject; + GameObject topOre = parentOre2.transform.Find("Top Half").gameObject; + // check if bottomOre is active. If it is deactivated, the deactivate the parent game object as well + if (topOre.activeSelf == false) + { + parentOre2.SetActive(false); + } + fullyHarvest = IsOreFullyHarvested(objectToAction); + //resourceNode.Harvest(localConnection, playerInventory, fullyHarvest); + resourceNode.Harvest(localConnection, fullyHarvest); + break; + default: + Debug.Log("How did you get here?"); + break; + } + } + else if (resourceNode.health.Value > 0) + { + + } + //} + } + */ + public void Damage(int amount) + { + resourceNode.health.Value -= amount; + } +} \ No newline at end of file diff --git a/Assets/Resources/Environment/OreHealth.cs.meta b/Assets/Resources/Environment/OreHealth.cs.meta new file mode 100644 index 0000000..2bb23bc --- /dev/null +++ b/Assets/Resources/Environment/OreHealth.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5d63150d91d56f44d8bd995388cc83c6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/ResourceNode.cs b/Assets/Resources/Environment/ResourceNode.cs new file mode 100644 index 0000000..7fd858f --- /dev/null +++ b/Assets/Resources/Environment/ResourceNode.cs @@ -0,0 +1,169 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using FishNet.Object; +using FishNet.Connection; +using FishNet.Object.Synchronizing; +using static UnityEngine.Rendering.PostProcessing.SubpixelMorphologicalAntialiasing; +using Systems.Inventory; + +public class ResourceNode : NetworkBehaviour +{ + public HarvestObject harvestObject; + [HideInInspector] + public readonly SyncVar harvestAmount = new SyncVar(); + [HideInInspector] + public readonly SyncVar health = new SyncVar(); + //public ItemSO itemSO; + [HideInInspector] + //[SyncVar] public NetItem netItem; + + public readonly SyncList _myCollection = new SyncList(); + + private void Awake() + { + + Debug.Log("Pomme before onchange awake harvest amount = " + harvestAmount.Value); + _myCollection.OnChange += _myCollection_OnChange; + Debug.Log("Pomme after onchange awake harvest amount = " + harvestAmount.Value); + } + public override void OnStartServer() + { + + harvestAmount.Value = Random.Range(harvestObject.minAmount, harvestObject.maxAmount); + Debug.Log("Pomme harvest amount = " + harvestAmount.Value); + health.Value = harvestObject.defaultHealth; + base.OnStartServer(); + } + // Start is called before the first frame update + void Start() + { + if (IsServerInitialized) + { + if (harvestObject.harvestType == HarvestObject.HarvestType.Tree) + { + _myCollection.Add(gameObject); + } + } + } + + private void _myCollection_OnChange(SyncListOperation op, int index, GameObject oldItem, GameObject newItem, bool asServer) + { + switch (op) + { + /* An object was added to the list. Index + * will be where it was added, which will be the end + * of the list, while newItem is the value added. */ + case SyncListOperation.Add: + Debug.Log("Added " + newItem.name + " to the list."); + break; + /* An object was removed from the list. Index + * is from where the object was removed. oldItem + * will contain the removed item. */ + case SyncListOperation.RemoveAt: + Debug.Log("Removed " + oldItem.name + " from the list."); + break; + /* An object was inserted into the list. Index + * is where the object was inserted. newItem + * contains the item inserted. */ + case SyncListOperation.Insert: + Debug.Log("Inserted " + newItem.name + " to the list."); + break; + /*An object replaced another. Index + * is where the object was replaced. oldItem + * is the item that was replaced, while + * newItem is the item which now has it's place. */ + case SyncListOperation.Set: + Debug.Log("Set " + newItem.name + " to the list."); + break; + /* All objects have been cleared. Index, oldValue, + * and newValue are default. */ + case SyncListOperation.Clear: + Debug.Log("Cleared the list."); + break; + /* When complete calls all changes have been + * made to the collection. You may use this + * to refresh information in relation to + * the list changes, rather than doing so + * after every entry change. Like Clear + * Index, oldItem, and newItem are all default. */ + case SyncListOperation.Complete: + Debug.Log("Completed the list."); + break; + + } + } + + public bool IsFullyHarvested() + { + if (this.health.Value <= 0) + { + return true; + } + return false; + } + + //public void Harvest(NetworkConnection conn, Inventory playerInventory, bool fullyHarvest = false) + [ServerRpc(RequireOwnership = false)] + public void Harvest(NetworkConnection conn, GameObject player, bool fullyHarvest = true) + { + Debug.Log("Pomme harvest Function amount = " + harvestAmount.Value); + + //InventoryData item = new InventoryData(harvestObject.itemSO.Id, harvestAmount.Value, 1); + Debug.Log("Trying to Harvest."); + //HarvestClient(conn, playerInventory); + if (IsFullyHarvested()) + { + HarvestClient(conn, player, harvestAmount.Value); + base.Despawn(DespawnType.Pool); + Debug.Log("Resource harvested."); + } + else + { + Debug.Log("Failed to harvest. Health = " + health.Value); + } + //Debug.Log("Destroyed"); + } + + [TargetRpc] + //public void HarvestClient(NetworkConnection conn, Inventory playerInventory) + public void HarvestClient(NetworkConnection conn, GameObject player, int harvestAmount) + { + //Debug.Log(harvestAmount + harvestObject.objectName + " harvested"); + + //netItem = new NetItem(itemSO.Id, itemSO.MaxStack, harvestAmount); + + + /********** Add to inventory to Glorify **********/ + Debug.Log("Add to inventory to Glorify"); + + Debug.Log("Harvest amount = " + harvestAmount); + Item newItem = harvestObject.ItemDetails.Create(harvestAmount); + + /* + Item[] Items; + Items[0] = newItem; + int Capacity; + int Coins; + */ + + InventoryController invCont = player.GetComponent().controller; + + Debug.Log(invCont); + Debug.Log(newItem); + + invCont.AddItem(newItem); + + //InventoryData inventoryData = new InventoryData(1, Items, 10, 1); + + //Inventory.AddItem(harvestObject.ItemDetails); + + //player.GetComponent().Bind(item); + + ///playerInventory.RequestAddItemServerRpc(netItem, conn); + + + //NetItem netItem = new NetItem(harvestObject.name, harvestAmount); + //playerInventory.TryAddItem + } +} diff --git a/Assets/Resources/Environment/ResourceNode.cs.meta b/Assets/Resources/Environment/ResourceNode.cs.meta new file mode 100644 index 0000000..52409db --- /dev/null +++ b/Assets/Resources/Environment/ResourceNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 46b3957d9c1f5c84189501ad4a67df4c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/RockOre.asset b/Assets/Resources/Environment/RockOre.asset new file mode 100644 index 0000000..c594890 --- /dev/null +++ b/Assets/Resources/Environment/RockOre.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 452359ef443bb3a4687ce59aa85a85a7, type: 3} + m_Name: RockOre + m_EditorClassIdentifier: + objectName: RockOre + minAmount: 3 + maxAmount: 6 + harvestLevel: 0 + harvestXP: 1 + defaultHealth: 100 + harvestType: 1 diff --git a/Assets/Resources/Environment/RockOre.asset.meta b/Assets/Resources/Environment/RockOre.asset.meta new file mode 100644 index 0000000..b1598ce --- /dev/null +++ b/Assets/Resources/Environment/RockOre.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 853e86514be7c1a4aa043d205c8a38f2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/Slider.prefab b/Assets/Resources/Environment/Slider.prefab new file mode 100644 index 0000000..90bfd7c --- /dev/null +++ b/Assets/Resources/Environment/Slider.prefab @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2041216804697686561 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3798598020933561136} + - component: {fileID: 3508457503602657023} + - component: {fileID: 4995945698143301397} + m_Layer: 0 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3798598020933561136 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2041216804697686561} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 2511.0715, y: 1382.5839, z: 487.88623} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &3508457503602657023 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2041216804697686561} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_PanelSettings: {fileID: 11400000, guid: 5d648095474667743b26001c1359e620, type: 2} + m_ParentUI: {fileID: 0} + sourceAsset: {fileID: 9197481963319205126, guid: 02c2657e209dc614eba911bb85d9ab3e, type: 3} + m_SortingOrder: 0 + m_WorldSpaceSizeMode: 1 + m_WorldSpaceWidth: 1920 + m_WorldSpaceHeight: 1080 +--- !u!114 &4995945698143301397 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2041216804697686561} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b28eb8fbca39f154cb19f5602047a4d1, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/RigidbodyPrediction.prefab.meta b/Assets/Resources/Environment/Slider.prefab.meta similarity index 74% rename from Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/RigidbodyPrediction.prefab.meta rename to Assets/Resources/Environment/Slider.prefab.meta index 1df735c..e385d44 100644 --- a/Assets/Packages/FishNet/Demos/Prediction V1/Rigidbody/Prefabs/RigidbodyPrediction.prefab.meta +++ b/Assets/Resources/Environment/Slider.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d904f93bc171bb144ba33c5155282f6f +guid: f3c0dcfb6b9e3604384d366625517cdf PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Resources/Environment/TreeCutting.cs b/Assets/Resources/Environment/TreeCutting.cs new file mode 100644 index 0000000..e63ef0e --- /dev/null +++ b/Assets/Resources/Environment/TreeCutting.cs @@ -0,0 +1,261 @@ +using FishNet.Demo.AdditiveScenes; +using FishNet.Object; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using Unity.VisualScripting; +using UnityEditor.PackageManager; +using UnityEngine; +using static UnityEngine.GraphicsBuffer; + +public class TreeCutting : NetworkBehaviour, ITreeDamageable +{ + [SerializeField] private Camera PlayerCamera; + public float actionRange = 200f; + public LayerMask actionMask; + //public Inventory playerInventory; + + [SerializeField] private GameObject fxTreeHit; + [SerializeField] private GameObject fxTreeHitBlocks; + + + public int tempTreeMaxDamage = 30; + public int tempTreeMinDamage = 10; + + public float criticalHitChance = 30; + public float criticalHitMultiplier = 1.20f; + + public GameObject player; + + /* + public enum TreeStatus + { + WholeTree, + TopTree, + BottomTree, + TopAndBottomTree, + Stump + } + */ + + // Start is called before the first frame update + void Start() + { + } + + //https://www.youtube.com/watch?v=ql4prUAasEg&t=516s + /* + private void AnimationEvent_OnHit() + { + Vector3 colliderSize = Vector3.one * .3f; + Collider[] colliderArray = Physics.OverlapBox(PlayerCamera.transform.position + PlayerCamera.transform.forward * 1.5f, colliderSize); + foreach (Collider collider in colliderArray) + { + if (collider.TryGetComponent(out ITreeDamageable treeDamageable)) + { + // Make damageAmount equal to the damage of the axe + //int damageAmount = UnityEngine.Random.Range(10, 30); + //DamagePopup.Create(hitArea.transform.position, damageAmount, damageAmount > 14); + + // Damage Tree + //treeDamageable.Damage(damageAmount); + StartCuttingEvent(treeHealth, resourceNode, objectToAction, HitInfo); + + // Shake Camera + //treeShake.GenerateImpulse(); + + // Spawn FX + //Instantiate(fxTreeHit, hitArea.transform.position, Quaternion.identity); + //Instantiate(fxTreeHitBlocks, hitArea.transform.position, Quaternion.identity); + } + } + } + */ + + public void StartCuttingEvent(TreeHealth treeHealth, ResourceNode resourceNode, GameObject objectToAction, RaycastHit HitInfo, GameObject player) + { + //int damageAmount = 100; + + GameObject cuttingEvent = GameObject.Find("TreeCuttingEvent"); + cuttingEvent.GetComponent().enabled = true; + //miningEvent.GetComponent().circles = 1; + + // Return CompleteMining() value of MiningEvent + Debug.Log("Start Event Tree Cutting"); + cuttingEvent.GetComponent().StartCuttingEvent(treeHealth, resourceNode, objectToAction, HitInfo, this.LocalConnection, player); + + // Start cutting tree + } + + public static void DamageTree(TreeHealth treeHealth, ResourceNode resourceNode, GameObject objectToAction, RaycastHit HitInfo, TreeCuttingEvent.TreeCuttingScore treeCuttingScore, FishNet.Connection.NetworkConnection localConnection, GameObject player) + { + if (treeCuttingScore == TreeCuttingEvent.TreeCuttingScore.Good || treeCuttingScore == TreeCuttingEvent.TreeCuttingScore.Excellent) + { + Debug.LogError("TreeCuttingScore is Good or Excellent"); + bool isCriticalHit = false; + + int damage = 100; + + /*** FOR ASSIGNING CRITICAL HIT - WORKS BUT REMOVED + if (isCriticalHit == true) + { + damage = Random.Range(tempOreMaxDamage + 1, Mathf.RoundToInt((float)(tempOreMaxDamage * criticalHitMultiplier))); + } + else + { + damage = Random.Range(tempOreMinDamage, tempOreMaxDamage); + } + */ + + //Debug.Log("Hit was good, doing damage of " + damage + " and critical bool = " + isCriticalHit); + //oreHealth.AffectOre(resourceNode, objectToAction, this.LocalConnection, playerInventory, damage, isCriticalHit, HitInfo.point); + treeHealth.AffectTree(resourceNode, objectToAction, localConnection, damage, player, isCriticalHit, HitInfo.point); + } + else + { + int damage = 0; + treeHealth.AffectTree(resourceNode, objectToAction, localConnection, damage, player, false, HitInfo.point); + } + } + + public override void OnStartClient() + { + base.OnStartClient(); + + if (IsOwner) + { + //PlayerCamera = Camera.main; + + //Debug.Log("Owner"); + } + else + { + //Debug.Log("Not Owner"); + } + } + + /* + private void Update() + { + if (Input.GetMouseButtonDown(0)) + { + //if (Animator != null) Animator.SetTrigger("Attack"); + //FunctionTimer.Create(AnimationEvent_OnHit, 0.5f); + + //Ray CameraRay = PlayerCamera.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0f)); + + Ray ray = PlayerCamera.ScreenPointToRay(Input.mousePosition); + RaycastHit hit; + Debug.Log("apple"); + Debug.DrawRay(PlayerCamera.transform.position, PlayerCamera.ScreenToWorldPoint(Input.mousePosition), Color.green); + Debug.Log("banana"); + + if (Physics.Raycast(ray, out RaycastHit HitInfo, 200f)) + { + Debug.Log("Kiwi"); + Debug.Log("HitInfo.collider.gameObject: " + HitInfo.collider.gameObject); + if (HitInfo.collider.gameObject.GetComponent()) + { + + + + Debug.Log("Peach"); + GameObject localPlayer = PlayerBehaviour.instance.gameObject; + + Vector3 directionToTarget = localPlayer.transform.position - HitInfo.transform.position; + float angle = Vector3.Angle(localPlayer.transform.forward, directionToTarget); + + // Print angle + Debug.Log("angle: " + angle); + + if (angle > 90) + { + Debug.Log("angle is greater than 90"); + // Cut the tree here + } + + + Debug.Log("Orange"); + Debug.Log("HitInfo.transform.gameObject: " + HitInfo.transform.gameObject); + GameObject objectToAction = HitInfo.transform.gameObject; + + if (objectToAction.TryGetComponent(out ResourceNode resourceNode)) + { + if (objectToAction.TryGetComponent(out TreeHealth treeHealth)) + { + /*** + bool isCriticalHit = Random.Range(0, 100) < criticalHitChance; + + int damage; + if (isCriticalHit == true) + { + damage = Random.Range(tempTreeMaxDamage + 1, Mathf.RoundToInt((float)(tempTreeMaxDamage * criticalHitMultiplier))); + } + else + { + damage = Random.Range(tempTreeMinDamage, tempTreeMaxDamage); + } + */ + //treeHealth.AffectTree(resourceNode, objectToAction, this.LocalConnection, playerInventory, damage, isCriticalHit, HitInfo.point); + //treeHealth.AffectTree(resourceNode, objectToAction, this.LocalConnection, damage, isCriticalHit, HitInfo.point); + + // How can I ensure treeHealth, resourceNode, objectToAction, and HitInfo objects are null before using it in StartCuttingEvent? + /* + + if (treeHealth == null) + { + Debug.LogError("treeHealth is null"); + } + if (resourceNode == null) + { + Debug.LogError("resourceNode is null"); + } + if (objectToAction == null) + { + Debug.LogError("objectToAction is null"); + } + // + if (HitInfo.collider == null) + { + Debug.LogError("HitInfo is null"); + } + + + + + + + StartCuttingEvent(treeHealth, resourceNode, objectToAction, HitInfo); + + // Check if the variables in the previous line are initialized + + } + } + + + /* Delete me? + else if (objectToAction.transform.parent.TryGetComponent(out ResourceNode resourceNodeParent)) + { + AffectTree(resourceNodeParent, objectToAction.transform.parent.gameObject); + Debug.Log("Apple 2"); + } + else if (objectToAction.transform.parent.parent.TryGetComponent(out ResourceNode resourceNodeParentParent)) + { + AffectTree(resourceNodeParentParent, objectToAction.transform.parent.parent.gameObject); + Debug.Log("Apple 3"); + } + */ + /* + } + } + } + } + */ + + + public void Damage(int amount) + { + // *** TODO *** + //Remove health from player + } +} diff --git a/Assets/Resources/Environment/TreeCutting.cs.meta b/Assets/Resources/Environment/TreeCutting.cs.meta new file mode 100644 index 0000000..7306299 --- /dev/null +++ b/Assets/Resources/Environment/TreeCutting.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 74fcb1b826d5e4e468f021d661154680 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/TreeDamageable.cs b/Assets/Resources/Environment/TreeDamageable.cs new file mode 100644 index 0000000..f0ffc4b --- /dev/null +++ b/Assets/Resources/Environment/TreeDamageable.cs @@ -0,0 +1,8 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public interface ITreeDamageable +{ + void Damage(int amount); +} diff --git a/Assets/Resources/Environment/TreeDamageable.cs.meta b/Assets/Resources/Environment/TreeDamageable.cs.meta new file mode 100644 index 0000000..efb0398 --- /dev/null +++ b/Assets/Resources/Environment/TreeDamageable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3ca2dfcd868ebec478160768c284ef18 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/TreeHealth.cs b/Assets/Resources/Environment/TreeHealth.cs new file mode 100644 index 0000000..3736b96 --- /dev/null +++ b/Assets/Resources/Environment/TreeHealth.cs @@ -0,0 +1,237 @@ +using FishNet.Object; +using FishNet.Transporting; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using static TreeCutting; + + + +public class TreeHealth : NetworkBehaviour, ITreeDamageable +{ + //public int treetotreeCollisionMinDamage = 3; + //public int treetotreeCollisionMaxDamage = 15; + //int treetotreeCollisionDamageBase; + + public ResourceNode resourceNode; + + /* + private void OnCollisionEnter(Collision collision) + { + if (collision.gameObject.TryGetComponent(out ITreeDamageable treeDamageable)) + { + { + if (collision.relativeVelocity.magnitude > 1f) + { + Debug.Log("Tree collision magnitude: " + collision.relativeVelocity.magnitude); + int damageAmount = Mathf.RoundToInt(collision.relativeVelocity.magnitude); + + DamagePopup.Create(collision.GetContact(0).point, damageAmount, damageAmount > 20); + treeDamageable.Damage(damageAmount); + + Damage(damageAmount); + } + } + } + } + */ + + public void SplitTree(ResourceNode resourceNode, GameObject treeObject) + { + Debug.Log("Tree part name: " + treeObject.name); + + treeObject.SetActive(false); + } + + /* + // Cut the damn thing + public void SplitTree(ResourceNode resourceNode, GameObject treePart, TreeStatus treeStatus, bool hasStump) + { + Debug.Log("Tree part name: " + treePart.name); + + switch (treeStatus) + { + + case TreeStatus.WholeTree: + treePart.SetActive(false); + treePart.transform.parent.Find("Fir Tree Divided").gameObject.SetActive(true); + break; + case TreeStatus.TopAndBottomTree: + Destroy(treePart.transform.GetComponent()); + treePart.transform.GetComponent().enabled = false; + treePart.transform.GetComponent().enabled = false; + + GameObject lowerHalfTree = treePart.transform.Find("Lower Half").gameObject; + lowerHalfTree.SetActive(true); + + GameObject upperHalfTree = treePart.transform.Find("Top Half").gameObject; + upperHalfTree.SetActive(true); + + break; + case TreeStatus.BottomTree: + // Find game object with tag of ParentTree + // Split log in half + Debug.Log("Tree name: " + treePart.name); + Debug.Log("BottomTree Status? How did you get here?"); + break; + case TreeStatus.TopTree: + // Find game object with tag of ParentTree + // Split log in half + Debug.Log("Tree name: " + treePart.name); + Debug.Log("TopTree Status? How did you get here?"); + break; + case TreeStatus.Stump: + // Find game object with tag of ParentTree + // Split log in half + Debug.Log("Tree name: " + treePart.name); + Debug.Log("Stump status? How did you get here?"); + break; + default: + Debug.Log("No tree status selected. How did you get here?"); + break; + } + } + */ + + public bool IsTreeFullyHarvested(GameObject objectToAction) + { + Transform rootObjectToAction = objectToAction.transform.root; + + // #################### REMOVE REDUNDENCY IN CHECKS #################### + + /* + // print status of everything in the following if statement + if (rootObjectToAction.Find("Fir Tree Divided/Stump").gameObject.activeSelf == true) + { + return false; + } + else if (rootObjectToAction.Find("Fir Tree Divided/Top and Bottom Half/Top Half").gameObject.activeSelf == true) + { + return false; + } + + else if (rootObjectToAction.Find("Fir Tree Divided/Top and Bottom Half/Lower Half").gameObject.activeSelf == true) + { + return false; + } + + else if (rootObjectToAction.Find("Fir Tree Whole").gameObject.activeSelf == true) + { + return false; + } + + else if (rootObjectToAction.Find("Fir Tree Divided/Top and Bottom Half").gameObject.activeSelf == true) + { + return false; + } + else + { + Debug.Log("Tree is fully harvested."); + return true; + } + */ + + return true; + } + + public void AffectTree(ResourceNode resourceNode, GameObject objectToAction, FishNet.Connection.NetworkConnection localConnection, int damage, GameObject player, bool criticalHit = false, Vector3? hitPoint = null) + { + //fullyHarvest = IsTreeFullyHarvested(objectToAction); + //resourceNode.Harvest(localConnection, playerInventory, fullyHarvest); + + + Debug.Log("Affect tree damage: " + damage); + Damage(damage); + Debug.Log("Tree resource node health: " + resourceNode.health.Value); + if (resourceNode.health.Value <= 0) + { + Debug.Log("Harvest resource"); + resourceNode.Harvest(localConnection, player); + } + } + + /* + //public void AffectTree(ResourceNode resourceNode, GameObject objectToAction, FishNet.Connection.NetworkConnection localConnection, Inventory playerInventory, int damage, bool criticalHit = false, Vector3? hitPoint = null) + public void AffectTree(ResourceNode resourceNode, GameObject objectToAction, FishNet.Connection.NetworkConnection localConnection, int damage, bool criticalHit = false, Vector3? hitPoint = null) + { + Damage(damage); + if (hitPoint != null) + { + Debug.Log("Hit location not null"); + Debug.Log("hintPoint val = " + hitPoint.Value); + DamagePopup.Create(hitPoint.Value, damage, criticalHit); + } + else + { + Debug.Log("Hit location is null. Using objects position."); + DamagePopup.Create(objectToAction.transform.position, damage, criticalHit); + } + + + if (resourceNode.health.Value <= 0) + { + bool fullyHarvest = false; + switch (objectToAction.tag) + { + case "WholeTree": + // Look if tree has a stump + //if (objectToAction.transform.Find("Stump") != null) + //{ + SplitTree(resourceNode, objectToAction, TreeStatus.WholeTree, true); + //} + break; + case "Stump": + objectToAction.SetActive(false); + fullyHarvest = IsTreeFullyHarvested(objectToAction); + //resourceNode.Harvest(localConnection, playerInventory, fullyHarvest); + resourceNode.Harvest(localConnection, fullyHarvest); + break; + case "TopAndBottomTree": + SplitTree(resourceNode, objectToAction, TreeStatus.TopAndBottomTree, true); + break; + case "TopTree": + objectToAction.SetActive(false); + // Get bottom tree + GameObject parentTree = objectToAction.transform.parent.gameObject; + GameObject bottomTree = parentTree.transform.Find("Lower Half").gameObject; + + // check if bottomTree is active. If it is deactivated, the deactivate the parent game object as well + if (bottomTree.activeSelf == false) + { + parentTree.SetActive(false); + } + fullyHarvest = IsTreeFullyHarvested(objectToAction); + //resourceNode.Harvest(localConnection, playerInventory, fullyHarvest); + resourceNode.Harvest(localConnection, fullyHarvest); + break; + case "BottomTree": + objectToAction.SetActive(false); + // Get bottom tree + GameObject parentTree2 = objectToAction.transform.parent.gameObject; + GameObject topTree = parentTree2.transform.Find("Top Half").gameObject; + // check if bottomTree is active. If it is deactivated, the deactivate the parent game object as well + if (topTree.activeSelf == false) + { + parentTree2.SetActive(false); + } + fullyHarvest = IsTreeFullyHarvested(objectToAction); + //resourceNode.Harvest(localConnection, playerInventory, fullyHarvest); + resourceNode.Harvest(localConnection, fullyHarvest); + break; + default: + Debug.Log("How did you get here?"); + break; + } + } + else if (resourceNode.health.Value > 0) + { + + } + //} + } + */ + public void Damage(int amount) + { + resourceNode.health.Value -= amount; + } +} \ No newline at end of file diff --git a/Assets/Resources/Environment/TreeHealth.cs.meta b/Assets/Resources/Environment/TreeHealth.cs.meta new file mode 100644 index 0000000..2a146bd --- /dev/null +++ b/Assets/Resources/Environment/TreeHealth.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4c3c7b356154e4c4581c27a8b6947d77 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/TreeSyncList.cs b/Assets/Resources/Environment/TreeSyncList.cs new file mode 100644 index 0000000..fb5f094 --- /dev/null +++ b/Assets/Resources/Environment/TreeSyncList.cs @@ -0,0 +1,56 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using FishNet.Object.Synchronizing; +using FishNet.Object; + +public class TreeSyncList : NetworkBehaviour +{ + public GameObject wholeTree; + public GameObject firTreeDivided; + public GameObject stump; + public GameObject topAndBottomHalf; + public GameObject topHalf; + public GameObject lowerHalf; + + public readonly SyncList _myCollection = new SyncList(); + + // Create SyncList of GameObjects called _myCollection and include all the GameObjects declared in this class + private void Start() + { + _myCollection.Add(wholeTree); + _myCollection.Add(firTreeDivided); + _myCollection.Add(stump); + _myCollection.Add(topAndBottomHalf); + _myCollection.Add(topHalf); + _myCollection.Add(lowerHalf); + } + + private void Awake() + { + _myCollection.OnChange += _myCollection_OnChange; + } + + private void Update() + { + + } + private void _myCollection_OnChange(SyncListOperation op, int index, GameObject oldItem, GameObject newItem, bool asServer) + { + switch (op) + { + case SyncListOperation.Add: + break; + case SyncListOperation.RemoveAt: + break; + case SyncListOperation.Insert: + break; + case SyncListOperation.Set: + break; + case SyncListOperation.Clear: + break; + case SyncListOperation.Complete: + break; + } + } +} \ No newline at end of file diff --git a/Assets/Resources/Environment/TreeSyncList.cs.meta b/Assets/Resources/Environment/TreeSyncList.cs.meta new file mode 100644 index 0000000..6ea7534 --- /dev/null +++ b/Assets/Resources/Environment/TreeSyncList.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c3870e09e18c423428a2333e7537a71b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Environment/WholeTreeHealthController.cs b/Assets/Resources/Environment/WholeTreeHealthController.cs new file mode 100644 index 0000000..75175a2 --- /dev/null +++ b/Assets/Resources/Environment/WholeTreeHealthController.cs @@ -0,0 +1,46 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class WholeTreeHealthController : MonoBehaviour +{ + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } + + void WholeTree(GameObject treePart, ResourceNode resourceNode) + { + // Find game object with tag of Stump + GameObject stump = treePart.transform.Find("Stump").gameObject; + + resourceNode._myCollection.Add(stump); + + stump.transform.parent = null; + Rigidbody stumpRB = stump.AddComponent(); + stumpRB.isKinematic = true; + + // Get rigidbody of tree + Rigidbody treeRB = treePart.GetComponent(); + treeRB.isKinematic = false; + + float randomPositionXAxis = Random.Range(-0.2f, 0.2f); + float randomPositionYAxis = Random.Range(-0.2f, 0.2f); + treePart.transform.position += new Vector3(randomPositionXAxis, randomPositionYAxis, 0); + + // Generate random small tree rotation + float randomRotationXAxis = Random.Range(-1.2f, 1.2f); + float randomRotationYAxis = Random.Range(-1.2f, 1.2f); + float randomRotationZAxis = Random.Range(-2f, 2f); + + treePart.transform.Rotate(randomRotationXAxis, randomRotationYAxis, randomRotationZAxis); + treePart.transform.Find("Leaves").gameObject.SetActive(false); + } +} diff --git a/Assets/Resources/Environment/WholeTreeHealthController.cs.meta b/Assets/Resources/Environment/WholeTreeHealthController.cs.meta new file mode 100644 index 0000000..bd9b02d --- /dev/null +++ b/Assets/Resources/Environment/WholeTreeHealthController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d46fe1dd52d90154c86ef9141e7d4947 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Input Actions/PlayerControls.inputactions b/Assets/Resources/Input Actions/PlayerControls.inputactions index 1af7903..a536288 100644 --- a/Assets/Resources/Input Actions/PlayerControls.inputactions +++ b/Assets/Resources/Input Actions/PlayerControls.inputactions @@ -18,7 +18,7 @@ "name": "Jump", "type": "Button", "id": "218923f9-156d-4a05-9148-a1c459ae2dc4", - "expectedControlType": "Button", + "expectedControlType": "", "processors": "", "interactions": "", "initialStateCheck": false @@ -265,7 +265,7 @@ "name": "Submit", "type": "Button", "id": "f1ace226-b61f-4e27-9fda-c9237994485a", - "expectedControlType": "Button", + "expectedControlType": "", "processors": "", "interactions": "", "initialStateCheck": false @@ -716,6 +716,28 @@ "isComposite": false, "isPartOfComposite": false }, + { + "name": "", + "id": "24a400f7-398f-4c73-b9fa-29c14ba76da6", + "path": "/leftButton", + "interactions": "", + "processors": "", + "groups": "", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "42e20af3-f103-4061-8edb-8d5a8f044c5b", + "path": "", + "interactions": "", + "processors": "", + "groups": "", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, { "name": "", "id": "38c99815-14ea-4617-8627-164d27641299", @@ -1073,6 +1095,17 @@ "isOR": false } ] + }, + { + "name": "Mouse", + "bindingGroup": "Mouse", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] } ] } \ No newline at end of file diff --git a/Assets/Resources/Inventory.meta b/Assets/Resources/Inventory.meta new file mode 100644 index 0000000..afdf679 --- /dev/null +++ b/Assets/Resources/Inventory.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5b7029b2d9b9cfb4e9ff768d346307b1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Inventory/Unity-Inventory-System-master.meta b/Assets/Resources/Inventory/Unity-Inventory-System-master.meta new file mode 100644 index 0000000..96196c6 --- /dev/null +++ b/Assets/Resources/Inventory/Unity-Inventory-System-master.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2955018fbad5d024193e25462c9dc45a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Inventory/Unity-Inventory-System-master/.gitignore b/Assets/Resources/Inventory/Unity-Inventory-System-master/.gitignore new file mode 100644 index 0000000..1cf4537 --- /dev/null +++ b/Assets/Resources/Inventory/Unity-Inventory-System-master/.gitignore @@ -0,0 +1,86 @@ +# This .gitignore file should be placed at the root of your Unity project directory +# +# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore +# +/[Ll]ibrary/ +/[Tt]emp/ +/[Oo]bj/ +/[Bb]uild/ +/[Bb]uildFullScreen/ +/[Bb]uilds/ +/[Ll]ogs/ +/[Uu]ser[Ss]ettings/ +/CCDBuildData/ + +# Ignore everything under Assets except the _Project folder +Assets/* +!Assets/_Project/ + +# MemoryCaptures can get excessive in size. +# They also could contain extremely sensitive data +/[Mm]emoryCaptures/ + +# Recordings can get excessive in size +/[Rr]ecordings/ + +# Uncomment this line if you wish to ignore the asset store tools plugin +# /[Aa]ssets/AssetStoreTools* + +# Autogenerated Jetbrains Rider plugin +/[Aa]ssets/Plugins/Editor/JetBrains* + +# Visual Studio cache directory +.vs/ + +# Gradle cache directory +.gradle/ + +# Autogenerated VS/MD/Consulo solution and project files +ExportedObj/ +.consulo/ +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd +*.pdb +*.mdb +*.opendb +*.VC.db + +# Unity3D generated meta files +*.pidb.meta +*.pdb.meta +*.mdb.meta + +# Unity3D generated file on crash reports +sysinfo.txt + +# Builds +*.apk +*.aab +*.unitypackage +*.app + +# Crashlytics generated file +crashlytics-build.properties + +# Packed Addressables +/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* + +# Temporary auto-generated Android Assets +/[Aa]ssets/[Ss]treamingAssets/aa.meta +/[Aa]ssets/[Ss]treamingAssets/aa/* + +# Custom +Assets/SceneDependencyCache* +Assets/NetCodeGenerated* +.idea/ +.DS_Store +RiderScriptEditorPersistedState.asset +Packages/packages-lock.json diff --git a/Assets/Resources/Inventory/Unity-Inventory-System-master/Assets.meta b/Assets/Resources/Inventory/Unity-Inventory-System-master/Assets.meta new file mode 100644 index 0000000..99acfee --- /dev/null +++ b/Assets/Resources/Inventory/Unity-Inventory-System-master/Assets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e4de905809766884c9699a93db681d48 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Inventory/Unity-Inventory-System-master/Packages.meta b/Assets/Resources/Inventory/Unity-Inventory-System-master/Packages.meta new file mode 100644 index 0000000..3ece2ad --- /dev/null +++ b/Assets/Resources/Inventory/Unity-Inventory-System-master/Packages.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 866fe80f6c969a346b79555abd7694f7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Inventory/Unity-Inventory-System-master/Packages/manifest.json b/Assets/Resources/Inventory/Unity-Inventory-System-master/Packages/manifest.json new file mode 100644 index 0000000..b32c2b6 --- /dev/null +++ b/Assets/Resources/Inventory/Unity-Inventory-System-master/Packages/manifest.json @@ -0,0 +1,53 @@ +{ + "dependencies": { + "com.eflatun.scenereference": "git+https://github.com/starikcetin/Eflatun.SceneReference.git#4.0.0", + "com.unity.addressables": "1.21.20", + "com.unity.ai.navigation": "2.0.0", + "com.unity.collab-proxy": "2.2.0", + "com.unity.editorcoroutines": "1.0.0", + "com.unity.ide.rider": "3.0.28", + "com.unity.inputsystem": "1.7.0", + "com.unity.postprocessing": "3.4.0", + "com.unity.profiling.core": "1.0.2", + "com.unity.render-pipelines.universal": "16.0.5", + "com.unity.services.ccd.management": "2.1.0", + "com.unity.shadergraph": "16.0.5", + "com.unity.test-framework": "1.3.9", + "com.unity.timeline": "1.8.6", + "com.unity.ugui": "2.0.0", + "com.unity.visualeffectgraph": "16.0.5", + "com.unity.visualscripting": "1.8.0", + "com.unity.modules.accessibility": "1.0.0", + "com.unity.modules.ai": "1.0.0", + "com.unity.modules.androidjni": "1.0.0", + "com.unity.modules.animation": "1.0.0", + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.cloth": "1.0.0", + "com.unity.modules.director": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.particlesystem": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.physics2d": "1.0.0", + "com.unity.modules.screencapture": "1.0.0", + "com.unity.modules.terrain": "1.0.0", + "com.unity.modules.terrainphysics": "1.0.0", + "com.unity.modules.tilemap": "1.0.0", + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.uielements": "1.0.0", + "com.unity.modules.umbra": "1.0.0", + "com.unity.modules.unityanalytics": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.unitywebrequestassetbundle": "1.0.0", + "com.unity.modules.unitywebrequestaudio": "1.0.0", + "com.unity.modules.unitywebrequesttexture": "1.0.0", + "com.unity.modules.unitywebrequestwww": "1.0.0", + "com.unity.modules.vehicles": "1.0.0", + "com.unity.modules.video": "1.0.0", + "com.unity.modules.vr": "1.0.0", + "com.unity.modules.wind": "1.0.0", + "com.unity.modules.xr": "1.0.0" + } +} diff --git a/Assets/Resources/Inventory/Unity-Inventory-System-master/Packages/manifest.json.meta b/Assets/Resources/Inventory/Unity-Inventory-System-master/Packages/manifest.json.meta new file mode 100644 index 0000000..66b6bd4 --- /dev/null +++ b/Assets/Resources/Inventory/Unity-Inventory-System-master/Packages/manifest.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bd4736a899c99de4098be65d4e58292c +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Inventory/Unity-Inventory-System-master/README.md b/Assets/Resources/Inventory/Unity-Inventory-System-master/README.md new file mode 100644 index 0000000..a0883e8 --- /dev/null +++ b/Assets/Resources/Inventory/Unity-Inventory-System-master/README.md @@ -0,0 +1,23 @@ +# Unity Inventory System (UI Toolkit) + +![Inventory1](https://github.com/adammyhre/Unity-Inventory-System/assets/38876398/9cd5e87d-c053-4997-81a3-b162491b87c7) + +## Overview + +Welcome to the Unity Inventory System built with UI Toolkit! This project compliments our 2024 YouTube video series - check it out! + +### Requirements + +- **Unity 2023.2 or above** +- Addressables 1.19.19 or above +- [Eflatun.SceneReference](https://github.com/starikcetin/Eflatun.SceneReference) open source library by S. Tarık Çetin + +## YouTube + +- [Episode 1: Building Prodedural UI with Drag and Drop](https://youtu.be/MOiXqKFHAIs) +- [Episode 2: Logic, Data and Data Binding](https://youtu.be/g2a4ZK8cEso) +- [Episode 3: Save/Load Data Persistence](https://youtu.be/z1sMhGIgfoo) +- [Episode 4: Awaitable Async Multi-Scene Loading](https://youtu.be/JFP-cCFID7o) +- [Episode 5: Addressable Scenes](https://youtu.be/jDdq8hG0xqk) + +Join us on the **git-amend** [YouTube channel](https://www.youtube.com/@git-amend?sub_confirmation=1) for weekly updates and other cool stuff. diff --git a/Assets/Resources/Inventory/Unity-Inventory-System-master/README.md.meta b/Assets/Resources/Inventory/Unity-Inventory-System-master/README.md.meta new file mode 100644 index 0000000..ee01f27 --- /dev/null +++ b/Assets/Resources/Inventory/Unity-Inventory-System-master/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 55488bb08949da749ade7b7b87aef1d7 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Materials/Arrow_Attacking.mat b/Assets/Resources/Materials/Arrow_Attacking.mat index aa4b4d0..dbf7007 100644 --- a/Assets/Resources/Materials/Arrow_Attacking.mat +++ b/Assets/Resources/Materials/Arrow_Attacking.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -32,7 +32,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -135,3 +136,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/Resources/Materials/Arrow_Normal.mat b/Assets/Resources/Materials/Arrow_Normal.mat index 7bbd499..8e0a502 100644 --- a/Assets/Resources/Materials/Arrow_Normal.mat +++ b/Assets/Resources/Materials/Arrow_Normal.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -32,7 +32,8 @@ Material: m_CustomRenderQueue: 2000 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -135,3 +136,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/Resources/Materials/EmissiveFire.mat b/Assets/Resources/Materials/EmissiveFire.mat index d7cb235..8174b02 100644 --- a/Assets/Resources/Materials/EmissiveFire.mat +++ b/Assets/Resources/Materials/EmissiveFire.mat @@ -20,7 +20,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -121,6 +122,7 @@ Material: - _EmissionColor: {r: 0, g: 0.34782404, b: 2, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &1541689474613413769 MonoBehaviour: m_ObjectHideFlags: 11 @@ -133,4 +135,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/Resources/Materials/Face.mat b/Assets/Resources/Materials/Face.mat index f16e629..d85634f 100644 --- a/Assets/Resources/Materials/Face.mat +++ b/Assets/Resources/Materials/Face.mat @@ -19,7 +19,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -120,6 +121,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &6804232151260670803 MonoBehaviour: m_ObjectHideFlags: 11 @@ -132,4 +134,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/Resources/Materials/Floor.mat b/Assets/Resources/Materials/Floor.mat index 81c2979..6238369 100644 --- a/Assets/Resources/Materials/Floor.mat +++ b/Assets/Resources/Materials/Floor.mat @@ -19,7 +19,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -82,6 +83,7 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: + - _AddPrecomputedVelocity: 0 - _AlphaClip: 0 - _AlphaToMask: 0 - _Blend: 0 @@ -116,10 +118,11 @@ Material: - _ZWrite: 1 m_Colors: - _BaseColor: {r: 0.4716981, g: 0.4716981, b: 0.4716981, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.4716981, g: 0.4716981, b: 0.4716981, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &8756309408578067536 MonoBehaviour: m_ObjectHideFlags: 11 @@ -132,4 +135,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/Resources/Materials/Hand Painted Rocks Road (Blocky).mat b/Assets/Resources/Materials/Hand Painted Rocks Road (Blocky).mat index a0291e4..bea1616 100644 --- a/Assets/Resources/Materials/Hand Painted Rocks Road (Blocky).mat +++ b/Assets/Resources/Materials/Hand Painted Rocks Road (Blocky).mat @@ -21,7 +21,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -122,6 +123,7 @@ Material: - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &4593449896437681548 MonoBehaviour: m_ObjectHideFlags: 11 @@ -134,4 +136,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/Resources/Materials/Plains Floor Plan.mat b/Assets/Resources/Materials/Plains Floor Plan.mat index 59080ed..7ce2206 100644 --- a/Assets/Resources/Materials/Plains Floor Plan.mat +++ b/Assets/Resources/Materials/Plains Floor Plan.mat @@ -19,7 +19,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -49,7 +50,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 268af972c02890f48b867fdc22888a86, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: @@ -120,6 +121,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &5708220758190671581 MonoBehaviour: m_ObjectHideFlags: 11 @@ -132,4 +134,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/Assets/Resources/Materials/Smoke.mat b/Assets/Resources/Materials/Smoke.mat index 99cbc8d..73f6294 100644 --- a/Assets/Resources/Materials/Smoke.mat +++ b/Assets/Resources/Materials/Smoke.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -32,7 +32,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -133,3 +134,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/Resources/Prefabs/Characters/Player.prefab b/Assets/Resources/Prefabs/Characters/GlorifyPlayer.prefab similarity index 76% rename from Assets/Resources/Prefabs/Characters/Player.prefab rename to Assets/Resources/Prefabs/Characters/GlorifyPlayer.prefab index 94dcbe3..da4604b 100644 --- a/Assets/Resources/Prefabs/Characters/Player.prefab +++ b/Assets/Resources/Prefabs/Characters/GlorifyPlayer.prefab @@ -21,12 +21,12 @@ GameObject: - component: {fileID: 3153021733640087511} - component: {fileID: 112930543655376551} m_Layer: 6 - m_Name: Player + m_Name: GlorifyPlayer m_TagString: Player m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &66217266422708091 Transform: m_ObjectHideFlags: 0 @@ -82,7 +82,6 @@ CharacterController: serializedVersion: 2 m_Bits: 0 m_LayerOverridePriority: 0 - m_IsTrigger: 0 m_ProvidesContacts: 0 m_Enabled: 1 serializedVersion: 3 @@ -108,8 +107,57 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 66217266422708035} _networkObjectCache: {fileID: 66217266422708035} - playerTargeting: {fileID: 0} - playerMovement: {fileID: 0} + meshShatter: {fileID: 0} + player: + _value: + name: + ID: 0 + targetType: 0 + characterRace: 0 + targetStatus: 0 + combatStatus: 0 + actionState: 0 + level: 0 + maxHealth: 0 + currentHealth: 0 + maxMana: 0 + currentMana: 0 + armor: 0 + minAutoAttackDamage: 0 + maxAutoAttackDamage: 0 + autoAttackRange: 0 + speed: 0 + autoAttackCooldown: 0 + autoAttackTimer: 0 + networkObject: {fileID: 0} + currentTarget: {fileID: 0} + aggroList: [] + weaknesses: + resistances: + immunities: + classEnum: 0 + playerBehaviour: {fileID: 0} + strength: 0 + dexterity: 0 + intelligence: 0 + criticalStrike: 0 + haste: 0 + wisdom: 0 + vitality: 0 + leech: 0 + avoidance: 0 + constitution: 0 + dodge: 0 + block: 0 + parry: 0 + maxExperience: 0 + currentExperience: 0 + isSafe: 0 + regenerationCooldownTimer: 0 + spells: [] + passives: [] + informationText: {fileID: 0} + nameplate: {fileID: 0} --- !u!114 &66217266422708039 MonoBehaviour: m_ObjectHideFlags: 0 @@ -203,8 +251,7 @@ MonoBehaviour: _componentIndexCache: 2 _addedNetworkObject: {fileID: 66217266422708035} _networkObjectCache: {fileID: 66217266422708035} - currentTarget: - _value: {fileID: 0} + currentTarget: {fileID: 0} arrowPrefab: {fileID: 4033213462839429708, guid: 5fb0f4d12717fd34e9b5cf442b8a994e, type: 3} normalArrowMaterial: {fileID: 2100000, guid: 895439f95aac2e143ae136c4b204a913, type: 2} autoAttackArrowMaterial: {fileID: 2100000, guid: 412d8b84ba7553144abfd28349cada64, type: 2} @@ -225,6 +272,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -273,6 +323,8 @@ MonoBehaviour: - {fileID: 3153021733640087511} - {fileID: 112930543655376551} - {fileID: 3649542575295749448} + - {fileID: 7695065616657874987} + - {fileID: 7810011195234826528} - {fileID: 66217267334442835} k__BackingField: {fileID: 0} k__BackingField: [] @@ -286,11 +338,19 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 3 + _enablePrediction: 0 + _predictionType: 0 + _graphicalObject: {fileID: 0} + _enableStateForwarding: 1 + _networkTransform: {fileID: 0} + _ownerInterpolation: 1 + _enableTeleport: 0 + _teleportThreshold: 1 + k__BackingField: 1 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 - k__BackingField: 2921712479052097104 + k__BackingField: 10345206396141332278 --- !u!114 &7643392635919447686 MonoBehaviour: m_ObjectHideFlags: 0 @@ -408,7 +468,6 @@ MonoBehaviour: _componentIndexCache: 5 _addedNetworkObject: {fileID: 66217266422708035} _networkObjectCache: {fileID: 66217266422708035} - playerMovement: {fileID: 66217266422708039} --- !u!1 &66217267334442839 GameObject: m_ObjectHideFlags: 0 @@ -421,6 +480,7 @@ GameObject: - component: {fileID: 66217267334442837} - component: {fileID: 66217267334442836} - component: {fileID: 66217267334442835} + - component: {fileID: 5577524641105121082} m_Layer: 0 m_Name: Player Camera m_TagString: MainCamera @@ -514,7 +574,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 376d7706786a86b48a99a6010b5255f7, type: 3} m_Name: m_EditorClassIdentifier: - _componentIndexCache: 7 + _componentIndexCache: 9 _addedNetworkObject: {fileID: 66217266422708035} _networkObjectCache: {fileID: 66217266422708035} thisCamera: {fileID: 66217267334442837} @@ -536,6 +596,50 @@ MonoBehaviour: collisionLayers: serializedVersion: 2 m_Bits: 4294967295 +--- !u!114 &5577524641105121082 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 66217267334442839} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 --- !u!1001 &66217266544444469 PrefabInstance: m_ObjectHideFlags: 0 @@ -659,6 +763,24 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 1782702501690864755, guid: 60770bdb4dc667c45bea53db0339dc05, type: 3} insertIndex: -1 addedObject: {fileID: 3649542575295749448} + - targetCorrespondingSourceObject: {fileID: 1782702501690864755, guid: 60770bdb4dc667c45bea53db0339dc05, type: 3} + insertIndex: -1 + addedObject: {fileID: 7695065616657874987} + - targetCorrespondingSourceObject: {fileID: 1782702501690864755, guid: 60770bdb4dc667c45bea53db0339dc05, type: 3} + insertIndex: -1 + addedObject: {fileID: 7810011195234826528} + - targetCorrespondingSourceObject: {fileID: 1782702501690864755, guid: 60770bdb4dc667c45bea53db0339dc05, type: 3} + insertIndex: -1 + addedObject: {fileID: 1704406811756266448} + - targetCorrespondingSourceObject: {fileID: 1782702501690864755, guid: 60770bdb4dc667c45bea53db0339dc05, type: 3} + insertIndex: -1 + addedObject: {fileID: 1184767612733159659} + - targetCorrespondingSourceObject: {fileID: 1782702501690864755, guid: 60770bdb4dc667c45bea53db0339dc05, type: 3} + insertIndex: -1 + addedObject: {fileID: 674960947956105323} + - targetCorrespondingSourceObject: {fileID: 1782702501690864755, guid: 60770bdb4dc667c45bea53db0339dc05, type: 3} + insertIndex: -1 + addedObject: {fileID: 835522194698018794} m_SourcePrefab: {fileID: 100100000, guid: 60770bdb4dc667c45bea53db0339dc05, type: 3} --- !u!137 &570208842181567079 stripped SkinnedMeshRenderer: @@ -711,6 +833,136 @@ MonoBehaviour: _interpolation: 2 _clientAuthoritative: 1 _sendToOwner: 0 +--- !u!114 &7695065616657874987 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1753639932139335750} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 74fcb1b826d5e4e468f021d661154680, type: 3} + m_Name: + m_EditorClassIdentifier: + _componentIndexCache: 7 + _addedNetworkObject: {fileID: 66217266422708035} + _networkObjectCache: {fileID: 66217266422708035} + PlayerCamera: {fileID: 66217267334442837} + actionRange: 200 + actionMask: + serializedVersion: 2 + m_Bits: 8 + fxTreeHit: {fileID: 0} + fxTreeHitBlocks: {fileID: 0} + tempTreeMaxDamage: 30 + tempTreeMinDamage: 10 + criticalHitChance: 30 + criticalHitMultiplier: 1.2 + player: {fileID: 0} +--- !u!114 &7810011195234826528 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1753639932139335750} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 129900639f8c2d94c94b28e5be311e7a, type: 3} + m_Name: + m_EditorClassIdentifier: + _componentIndexCache: 8 + _addedNetworkObject: {fileID: 66217266422708035} + _networkObjectCache: {fileID: 66217266422708035} + PlayerCamera: {fileID: 66217267334442837} + actionRange: 200 + actionMask: + serializedVersion: 2 + m_Bits: 1024 + fxOreHit: {fileID: 0} + fxOreHitBlocks: {fileID: 0} + tempOreMaxDamage: 30 + tempOreMinDamage: 10 + criticalHitChance: 30 + criticalHitMultiplier: 1.2 +--- !u!114 &1704406811756266448 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1753639932139335750} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7222d1b71a06d9f4fbefd34c63d8d3cb, type: 3} + m_Name: + m_EditorClassIdentifier: + PlayerCamera: {fileID: 66217267334442837} + actionRange: 200 + actionMask: + serializedVersion: 2 + m_Bits: 0 + treeCutting: {fileID: 7695065616657874987} + oreCutting: {fileID: 7810011195234826528} +--- !u!114 &1184767612733159659 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1753639932139335750} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_PanelSettings: {fileID: 11400000, guid: 5d648095474667743b26001c1359e620, type: 2} + m_ParentUI: {fileID: 0} + sourceAsset: {fileID: 9197481963319205126, guid: 0f205fa7295c3c24b82d923f307911f3, type: 3} + m_SortingOrder: 0 + m_WorldSpaceSizeMode: 1 + m_WorldSpaceWidth: 1920 + m_WorldSpaceHeight: 1080 +--- !u!114 &674960947956105323 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1753639932139335750} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fefaff733aa1d6f44a6b0f6f1116442f, type: 3} + m_Name: + m_EditorClassIdentifier: + document: {fileID: 1184767612733159659} + styleSheet: {fileID: 7433441132597879392, guid: fc215d101591745428c6a37c26584315, type: 3} + panelName: Inventory +--- !u!114 &835522194698018794 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1753639932139335750} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 273621cfd5068344d91daa1117a669c0, type: 3} + m_Name: + m_EditorClassIdentifier: + customSprite: {fileID: 21300000, guid: e4ca642b79973d043b14336c846b1f11, type: 3} + view: {fileID: 674960947956105323} + capacity: 20 + startingItems: + - {fileID: 11400000, guid: 36f97a6d90dba7e43a653f365d6b9253, type: 2} + - {fileID: 11400000, guid: 36f97a6d90dba7e43a653f365d6b9253, type: 2} + k__BackingField: + Part1: 363456522 + Part2: 1332054855 + Part3: 1766417343 + Part4: 3629344109 + controller: {fileID: 0} --- !u!137 &2008662535309358004 stripped SkinnedMeshRenderer: m_CorrespondingSourceObject: {fileID: 1948778455749293953, guid: 60770bdb4dc667c45bea53db0339dc05, type: 3} diff --git a/Assets/Resources/Prefabs/Characters/Player.prefab.meta b/Assets/Resources/Prefabs/Characters/GlorifyPlayer.prefab.meta similarity index 100% rename from Assets/Resources/Prefabs/Characters/Player.prefab.meta rename to Assets/Resources/Prefabs/Characters/GlorifyPlayer.prefab.meta diff --git a/Assets/Resources/Rendering/URP.asset b/Assets/Resources/Rendering/URP.asset index 9379812..eb5d569 100644 --- a/Assets/Resources/Rendering/URP.asset +++ b/Assets/Resources/Rendering/URP.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} m_Name: URP m_EditorClassIdentifier: - k_AssetVersion: 11 - k_AssetPreviousVersion: 11 + k_AssetVersion: 12 + k_AssetPreviousVersion: 12 m_RendererType: 1 m_RendererData: {fileID: 0} m_RendererDataList: @@ -33,6 +33,14 @@ MonoBehaviour: m_EnableLODCrossFade: 1 m_LODCrossFadeDitheringType: 1 m_ShEvalMode: 0 + m_LightProbeSystem: 0 + m_ProbeVolumeMemoryBudget: 1024 + m_ProbeVolumeBlendingMemoryBudget: 256 + m_SupportProbeVolumeGPUStreaming: 0 + m_SupportProbeVolumeDiskStreaming: 0 + m_SupportProbeVolumeScenarios: 0 + m_SupportProbeVolumeScenarioBlending: 0 + m_ProbeVolumeSHBands: 1 m_MainLightRenderingMode: 1 m_MainLightShadowsSupported: 1 m_MainLightShadowmapResolution: 2048 @@ -67,21 +75,30 @@ MonoBehaviour: m_SupportsLightLayers: 0 m_DebugLevel: 0 m_StoreActionsOptimization: 0 - m_EnableRenderGraph: 0 m_UseAdaptivePerformance: 1 m_ColorGradingMode: 0 m_ColorGradingLutSize: 32 + m_AllowPostProcessAlphaOutput: 0 m_UseFastSRGBLinearConversion: 0 m_SupportDataDrivenLensFlare: 1 + m_SupportScreenSpaceLensFlare: 1 + m_GPUResidentDrawerMode: 0 + m_SmallMeshScreenPercentage: 0 + m_GPUResidentDrawerEnableOcclusionCullingInCameras: 0 m_ShadowType: 1 m_LocalShadowsSupported: 0 m_LocalShadowsAtlasResolution: 256 m_MaxPixelLights: 0 m_ShadowAtlasResolution: 256 m_VolumeFrameworkUpdateMode: 0 - m_Textures: - blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} - bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} + m_VolumeProfile: {fileID: 0} + apvScenesData: + obsoleteSceneBounds: + m_Keys: [] + m_Values: [] + obsoleteHasProbeVolumes: + m_Keys: [] + m_Values: m_PrefilteringModeMainLightShadows: 1 m_PrefilteringModeAdditionalLight: 4 m_PrefilteringModeAdditionalLightShadows: 1 @@ -92,6 +109,7 @@ MonoBehaviour: m_PrefilterDebugKeywords: 0 m_PrefilterWriteRenderingLayers: 0 m_PrefilterHDROutput: 0 + m_PrefilterAlphaOutput: 0 m_PrefilterSSAODepthNormals: 0 m_PrefilterSSAOSourceDepthLow: 0 m_PrefilterSSAOSourceDepthMedium: 0 @@ -110,5 +128,9 @@ MonoBehaviour: m_PrefilterSoftShadows: 0 m_PrefilterScreenCoord: 0 m_PrefilterNativeRenderPass: 0 + m_PrefilterUseLegacyLightmaps: 0 m_ShaderVariantLogLevel: 0 m_ShadowCascades: 0 + m_Textures: + blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} + bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} diff --git a/Assets/Resources/UI Resources.meta b/Assets/Resources/UI Resources.meta new file mode 100644 index 0000000..025b6c1 --- /dev/null +++ b/Assets/Resources/UI Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 39609075806209b48af9b5a014d13c67 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI Resources/CustomControls.asset b/Assets/Resources/UI Resources/CustomControls.asset new file mode 100644 index 0000000..9c49205 --- /dev/null +++ b/Assets/Resources/UI Resources/CustomControls.asset @@ -0,0 +1,46 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 19101, guid: 0000000000000000e000000000000000, type: 0} + m_Name: CustomControls + m_EditorClassIdentifier: + themeUss: {fileID: 4413694071827464959, guid: dba632c7063a1764fa23894a11ba8b86, type: 3} + m_DisableNoThemeWarning: 0 + m_TargetTexture: {fileID: 0} + m_RenderMode: 0 + m_WorldSpaceLayer: 0 + m_ScaleMode: 2 + m_ReferenceSpritePixelsPerUnit: 100 + m_PixelsPerUnit: 100 + m_Scale: 1 + m_ReferenceDpi: 96 + m_FallbackDpi: 96 + m_ReferenceResolution: {x: 3840, y: 2160} + m_ScreenMatchMode: 0 + m_Match: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 + m_BindingLogLevel: 0 + m_ClearDepthStencil: 1 + m_ClearColor: 0 + m_ColorClearValue: {r: 0, g: 0, b: 0, a: 0} + m_VertexBudget: 0 + m_DynamicAtlasSettings: + m_MinAtlasSize: 64 + m_MaxAtlasSize: 4096 + m_MaxSubTextureSize: 64 + m_ActiveFilters: -1 + m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0} + m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0} + m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0} + m_ICUDataAsset: {fileID: 0} + forceGammaRendering: 0 + textSettings: {fileID: 0} diff --git a/Assets/Resources/UI Resources/CustomControls.asset.meta b/Assets/Resources/UI Resources/CustomControls.asset.meta new file mode 100644 index 0000000..1b69a55 --- /dev/null +++ b/Assets/Resources/UI Resources/CustomControls.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5d648095474667743b26001c1359e620 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI Resources/CustomControls.uss b/Assets/Resources/UI Resources/CustomControls.uss new file mode 100644 index 0000000..1afbccf --- /dev/null +++ b/Assets/Resources/UI Resources/CustomControls.uss @@ -0,0 +1,108 @@ +#MySlider Label { + display: none; + -unity-background-image-tint-color: rgb(112, 109, 102); + width: 100%; + height: 20%; + background-color: rgb(0, 0, 0); + background-image: none; + top: 0; + position: relative; + flex-grow: 1; + margin-left: 0; + margin-right: 0; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; + padding-right: 0; + padding-top: 0; + padding-bottom: 0; + flex-direction: row; +} + +#MySlider #unity-drag-container { + background-color: rgba(255, 0, 0, 0); + position: relative; + flex-grow: 1; + top: auto; + border-left-width: 0; + border-right-width: 0; + border-top-width: 0; + border-bottom-width: 0; + padding-left: 0; + padding-right: 0; + padding-top: 0; + padding-bottom: 0; + margin-top: 0; + margin-bottom: 0; + margin-right: 0; + margin-left: 0; + border-top-left-radius: 15px; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px; + border-bottom-left-radius: 15px; + flex-direction: row; + width: 100%; + height: 100%; +} + +#MySlider #unity-tracker { + background-color: rgb(0, 20, 255); + top: var(--0px); + flex-grow: 0; + position: relative; + border-left-width: 0; + border-right-width: 0; + border-top-width: 0; + border-bottom-width: 0; + margin-left: 0; + margin-right: 0; + margin-top: 325px; + margin-bottom: 0; + flex-direction: row; + width: 100%; + height: 100px; + justify-content: center; +} + +#MySlider #unity-dragger { + width: 20px; + height: 100px; + top: auto; + margin-left: 0; + margin-right: 0; + margin-top: 325px; + margin-bottom: 0; + background-color: rgb(255, 0, 243); + padding-top: 0; + padding-bottom: 0; + flex-direction: column; +} + +.left { + width: 33.33333%; + height: 100%; + -unity-background-image-tint-color: rgb(255, 0, 0); + background-color: rgb(255, 0, 0); + flex-grow: 1; +} + +.middle { + background-color: rgb(255, 244, 0); + -unity-background-image-tint-color: rgb(255, 243, 0); + width: 33.33333%; + height: 100%; + flex-grow: 1; +} + +.right { + width: 33.33333%; + background-color: rgb(0, 255, 0); + height: 100%; + flex-grow: 1; +} + +#MySlider #VisualElement { + flex-grow: 0; + flex-direction: row; + height: 100%; +} diff --git a/Assets/Resources/UI Resources/CustomControls.uss.meta b/Assets/Resources/UI Resources/CustomControls.uss.meta new file mode 100644 index 0000000..d9c4d7d --- /dev/null +++ b/Assets/Resources/UI Resources/CustomControls.uss.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e933c6b9dfc619c488379a91469b1bc7 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 0 diff --git a/Assets/Resources/UI Resources/CustomSlider.meta b/Assets/Resources/UI Resources/CustomSlider.meta new file mode 100644 index 0000000..c26bae9 --- /dev/null +++ b/Assets/Resources/UI Resources/CustomSlider.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: afead30ba577fc544803f341fba432ab +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI Resources/CustomSlider/CardFrame01_Demo_Slider_Fill_Blue.png b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_Demo_Slider_Fill_Blue.png new file mode 100644 index 0000000..22736c2 Binary files /dev/null and b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_Demo_Slider_Fill_Blue.png differ diff --git a/Assets/Resources/UI Resources/CustomSlider/CardFrame01_Demo_Slider_Fill_Blue.png.meta b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_Demo_Slider_Fill_Blue.png.meta new file mode 100644 index 0000000..0f0a46d --- /dev/null +++ b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_Demo_Slider_Fill_Blue.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: 4dd2f1dd02955e5479d34a0b87da1b2b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI Resources/CustomSlider/CardFrame01_Demo_Slider_Fill_Green.png b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_Demo_Slider_Fill_Green.png new file mode 100644 index 0000000..1956859 Binary files /dev/null and b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_Demo_Slider_Fill_Green.png differ diff --git a/Assets/Resources/UI Resources/CustomSlider/CardFrame01_Demo_Slider_Fill_Green.png.meta b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_Demo_Slider_Fill_Green.png.meta new file mode 100644 index 0000000..79960d9 --- /dev/null +++ b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_Demo_Slider_Fill_Green.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: 5d8396bbe9647ea4e8b2452a4775bb8c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider2.png b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider2.png new file mode 100644 index 0000000..66570e8 Binary files /dev/null and b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider2.png differ diff --git a/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider2.png.meta b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider2.png.meta new file mode 100644 index 0000000..d57b59a --- /dev/null +++ b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider2.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: 12a5a2c058a1e364a93ee9e689cda011 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider3.png b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider3.png new file mode 100644 index 0000000..e309779 Binary files /dev/null and b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider3.png differ diff --git a/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider3.png.meta b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider3.png.meta new file mode 100644 index 0000000..2e448ac --- /dev/null +++ b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider3.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: 849efa8ed6de1754bb42a4696e2ab1f5 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider4.png b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider4.png new file mode 100644 index 0000000..ffea6ae Binary files /dev/null and b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider4.png differ diff --git a/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider4.png.meta b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider4.png.meta new file mode 100644 index 0000000..385ff5e --- /dev/null +++ b/Assets/Resources/UI Resources/CustomSlider/CardFrame01_White_Slider4.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: bd75645e89d833a43a654d867e12298f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI Resources/CustomSlider/CustomSlider.cs b/Assets/Resources/UI Resources/CustomSlider/CustomSlider.cs new file mode 100644 index 0000000..88ca687 --- /dev/null +++ b/Assets/Resources/UI Resources/CustomSlider/CustomSlider.cs @@ -0,0 +1,179 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Experimental.AI; +using UnityEngine.UIElements; + +public class CustomSlider : MonoBehaviour +{ + //Root Visual Element + private VisualElement m_Root; + + //Slider + private Slider m_Slider; + + //Dragger + private VisualElement m_Dragger; + + //Bar + private VisualElement m_Bar; + + //Tracker + private VisualElement m_Tracker; + + //New Dragger + private VisualElement m_NewDragger; + + //Color Elements + private VisualElement m_Left; + private VisualElement m_Right; + private VisualElement m_Middle; + + private bool sliderDirection = true; + float changeAmount = 2f; + + private float m_Dragger_Size; + private float m_Dragger_Size_Relative; + + // Start is called before the first frame update + void Start() + { + // Get references to necessary visual elements + m_Root = GetComponent().rootVisualElement; + m_Slider = m_Root.Q("MySlider"); + m_Dragger = m_Slider.Q("unity-dragger"); + m_Tracker = m_Slider.Q("unity-tracker"); + + //Make all VisualElements PickingMode.Ignore so mouse clicks don't move slider + m_Root.pickingMode = PickingMode.Ignore; + m_Slider.pickingMode = PickingMode.Ignore; + m_Tracker.pickingMode = PickingMode.Ignore; + m_Dragger.pickingMode = PickingMode.Ignore; + m_Slider.Q